-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
149 lines (149 loc) · 3.79 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
"env": {
"es2021": true,
"node": true,
"jest": true
},
"extends": [
"airbnb-base",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:jest/style",
"plugin:jest-formatting/recommended",
"plugin:prettier/recommended",
"plugin:import/typescript",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"jest",
"jest-formatting",
"prettier",
"import-helpers"
],
"settings": {
"import/resolver": {
"typescript": {}
},
"jest": {
"version": 29
}
},
"rules": {
"prettier/prettier": ["error", {
"printWidth": 120,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always"
}],
"arrow-body-style": ["error", "as-needed"],
"implicit-arrow-linebreak": "off",
"camelcase":"off",
"class-methods-use-this": "off",
"no-useless-constructor": "off",
"no-console": ["warn", { "allow": ["warn", "error"] }],
"no-unused-expressions": "off",
"no-use-before-define": "off",
"no-unneeded-ternary": "error",
"no-unused-vars": "off",
"no-underscore-dangle": "off",
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-param-reassign": ["error", {
"props": true,
"ignorePropertyModificationsForRegex": ["^draft", "result", "acc"]
}],
"no-shadow": "off",
"prefer-template": "error",
"@typescript-eslint/array-type": [
"warn",
{ "default": "array-simple", "readonly": "array-simple" }
],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"{}": false
},
"extendDefaults": true
}
],
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": ["warn", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_$|[iI]gnored"
}],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-interface": [
"error",
{
"allowSingleExtends": true
}
],
"@typescript-eslint/no-shadow": ["error"],
"import/prefer-default-export": "off",
"import/no-duplicates": "off",
"import/no-named-as-default": "off",
"import/no-useless-path-segments": ["error", { "noUselessIndex": true }],
"import/no-extraneous-dependencies": ["error", {
"devDependencies": [
"**/test.ts?(x)",
"**/*.test.ts?(x)",
"**/spec.ts?(x)",
"**/*.spec.ts?(x)"
]
}],
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
],
"import-helpers/order-imports": [
"warn",
{
"newlinesBetween": "always",
"groups": [
"module",
["parent", "sibling"],
"index"
],
"alphabetize": { "order": "ignore", "ignoreCase": true }
}
],
"import/no-anonymous-default-export": [
"error",
{
"allowArray": true,
"allowArrowFunction": false,
"allowAnonymousClass": false,
"allowAnonymousFunction": false,
"allowCallExpression": true,
"allowLiteral": true,
"allowObject": true
}
]
},
"overrides": [
{
"files": ["!src/*"],
"rules": {
"import/no-extraneous-dependencies": "off",
"import-helpers/order-imports": "off",
"@typescript-eslint/no-var-requires": "off"
}
}
]
}