-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
50 lines (48 loc) · 1.7 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
{
"extends": [
"@earlorg/eslint-config/base",
"@earlorg/eslint-config/base-react-jsx",
"@earlorg/eslint-config/base-typescript",
"@earlorg/eslint-config/perf-react-jsx",
"plugin:import/typescript"
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx", ".json"]
},
"typescript": true
}
},
"ignorePatterns": ["**/report/*.js","src/server-nest/db/models/**"],
"rules": {
// note you must disable the base rule as it can report incorrect errors
// https://stackoverflow.com/questions/63818415/react-was-used-before-it-was-defined/64024916#64024916
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["off"],
"@typescript-eslint/no-explicit-any": "off",
"prefer-arrow-callback": "off",
"quotes": ["error", "single", { "avoidEscape": true }],
// TO BE REMOVED later
"no-multiple-empty-lines": "off",
"react/jsx-props-no-spreading": "off",
"react/static-property-placement": "off",
"max-classes-per-file": "off",
"class-methods-use-this": "off",
"no-useless-constructor": "off",
"max-len": ["error", { "code": 120, "tabWidth": 2, "ignoreUrls": true, "ignoreStrings": true, "ignorePattern": "d=.*" }],
// https://github.com/typescript-eslint/typescript-eslint/issues/455
"@typescript-eslint/indent": "off",
// exception for react functional arrow components
"react/function-component-definition": ["error", {
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}]
},
"globals": {
"React": "writable",
"EventListener": "readonly",
"JSX": "readonly",
"ESModule": "readonly"
}
}