-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
71 lines (68 loc) · 1.94 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
{
"root": true,
"env": {
"browser": true,
"es6": true
},
"extends": [
"airbnb",
"eslint:recommended",
"next",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2019,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint"],
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"node": {
"extensions": [".ts", ".tsx", ".js", ".jsx", ".json"]
}
}
},
"rules": {
"import/extensions": 0,
"import/prefer-default-export": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"react/jsx-props-no-spreading": 0,
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/anchor-has-content": 0,
"react/jsx-one-expression-per-line": [1, { "allow": "single-child" }],
// https://github.com/immerjs/immer/issues/189#issuecomment-506396244
// As it warns mutating dom element and no other choice...
"no-param-reassign": 0,
// TS rule youu beaches ;)
"react/prop-types": "off",
"react/require-default-props": "off",
// note you must disable the base rule as it can report incorrect errors
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"],
// note you must disable the base rule as it can report incorrect errors
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
// Airbnb bug https://stackoverflow.com/questions/69928061/struggling-with-typescript-react-eslint-and-simple-arrow-functions-components
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function"
}
]
}
}