-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
75 lines (75 loc) · 2.26 KB
/
.eslintrc.json
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"env": {
"es2022": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["tsconfig.json", "server/tsconfig.json", "ui/tsconfig.json"]
},
"plugins": ["react", "@typescript-eslint", "simple-import-sort", "import", "@dword-design/import-alias"],
"rules": {
"simple-import-sort/imports": "error",
"import/no-relative-packages": "error",
"import/no-useless-path-segments": ["error"],
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.test.ts",
"**/*.test.tsx",
"**/tests/**/*.ts",
"**/tests/*.ts",
"**/fixtures/**/*.ts",
"**/tsup.config.ts",
"**/vitest.workspace.ts"
]
}
]
},
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@typescript-eslint/consistent-type-imports": ["error", { "prefer": "type-imports" }],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
]
// "@typescript-eslint/no-var-requires": "off",
// "@typescript-eslint/explicit-module-boundary-types": "off",
// "@typescript-eslint/no-explicit-any": "off"
}
}
],
"settings": {
"import/resolver": {
"typescript": {
"project": ["server/tsconfig.json", "ui/tsconfig.json"]
}
},
"react": {
"version": "detect"
}
},
"ignorePatterns": ["ui/public/dsfr/*", "extension/*"]
}