-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
128 lines (128 loc) · 5 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"overrides": [
{
"files": ["*.astro"],
"extends": ["plugin:astro/recommended", "plugin:astro/jsx-a11y-recommended"],
"parser": "astro-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"extraFileExtensions": [".astro"]
}
},
{
"files": ["*.ts"],
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaVersion": "latest",
"sourceType": "module"
},
"env": {
"browser": true,
"es2020": true
},
"settings": {
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".js", ".jsx", ".ts", ".tsx"]
},
"import/resolver": {
"typescript": {},
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx", ".json"],
"paths": ["src"]
}
}
},
"rules": {
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description",
"minimumDescriptionLength": 10
}
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"disallowTypeAnnotations": true
}
],
"@typescript-eslint/method-signature-style": ["error", "method"],
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/strict-boolean-expressions": [
"error",
{
"allowString": false,
"allowNumber": false,
"allowNullableObject": false,
"allowNullableBoolean": false,
"allowNullableString": false,
"allowNullableNumber": false,
"allowAny": false,
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false
}
],
"@typescript-eslint/triple-slash-reference": "warn",
"import/exports-last": "error",
"import/extensions": [
"error",
"never",
{
"json": "always"
}
],
"import/first": "error",
"import/group-exports": "error",
"import/no-duplicates": "error",
"import/no-absolute-path": "error",
"import/no-cycle": "error",
"import/no-namespace": "error",
"import/no-mutable-exports": "error",
"import/no-self-import": "error",
"import/no-unresolved": "warn",
"import/no-unused-modules": [
"off",
{
"missingExports": false,
"unusedExports": false,
"ignoreExports": ["src/**/*.test.*"]
}
],
"import/no-useless-path-segments": "error",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"groups": ["builtin", "external", "internal", "parent", "sibling", "index", "object"],
"newlines-between": "always",
"pathGroups": [
{
"pattern": "react",
"group": "builtin",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["builtin"]
}
]
}
}
]
}