-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
36 lines (35 loc) · 1.02 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import js from '@eslint/js';
import ts from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';
export default ts.config(
{ files: ['/src/**/*.{ts}'] },
{ ignores: ['**/*.{js,mjs,cjs}', 'drizzle.config.ts'] },
js.configs.recommended,
stylistic.configs.customize({
semi: true,
indent: 2,
arrowParens: true,
commaDangle: "always-multiline",
}),
ts.configs.eslintRecommended,
...ts.configs.recommendedTypeChecked,
...ts.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
project: ["tsconfig.json"],
},
},
},
{
rules: {
"@stylistic/comma-spacing": ["warn"],
"@stylistic/array-bracket-spacing": ["warn"],
"@typescript-eslint/restrict-template-expressions": ["off"],
"@typescript-eslint/no-unused-vars": ["warn", { caughtErrors: "none" }],
"@typescript-eslint/prefer-nullish-coalescing": ["error", { ignorePrimitives: true }],
}
}
);