-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
91 lines (91 loc) · 2.29 KB
/
.eslintrc.js
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
module.exports = {
globals: {
process: "readonly",
},
env: {
browser: true,
es6: true,
commonjs: true,
jest: true,
},
parser: "@typescript-eslint/parser",
plugins: [
"import",
"react-hooks",
"jsx-a11y",
"react",
"jest",
"no-only-tests",
"@typescript-eslint",
"better-styled-components",
],
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"next",
"next/core-web-vitals",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
settings: {
"import/extensions": [".js", ".jsx", ".ts", ".tsx", ".json"],
"import/ignore": ["\\.css$"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
react: {
version: "detect",
},
},
overrides: [
{
files: ["*.{ts,tsx}"],
rules: {
"no-undef": "off",
},
},
],
rules: {
strict: [2, "never"],
"no-case-declarations": 1,
"no-undef": 2,
"no-var": 1,
"no-unused-vars": [2, { vars: "all", args: "none" }],
"no-empty": [1, { allowEmptyCatch: true }],
curly: [1, "all"],
eqeqeq: [1, "smart"],
"import/no-commonjs": 1,
"no-console": 0,
"react/no-is-mounted": 2,
"react/prefer-es6-class": 2,
"react/display-name": 1,
"react/prop-types": 2,
"react/no-did-mount-set-state": 0,
"react/no-did-update-set-state": 0,
"react/no-find-dom-node": 0,
"react/no-children-prop": 2,
"react/no-string-refs": 2,
"react/no-unescaped-entities": 2,
"react/jsx-no-target-blank": 2,
"react/jsx-key": 2,
"react/jsx-filename-extension": [
1,
{ extensions: [".js", ".jsx", ".ts", ".tsx"] },
],
"react/react-in-jsx-scope": "off",
"prefer-const": [1, { destructuring: "all" }],
"jest/no-disabled-tests": 1,
"jest/no-focused-tests": 2,
"jest/prefer-to-have-length": 1,
"no-useless-escape": 0,
"no-only-tests/no-only-tests": "error",
complexity: ["error", { max: 54 }],
"@next/next/no-img-element": 1,
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/no-namespace": 1,
"better-styled-components/sort-declarations-alphabetically": 2,
},
};