-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
108 lines (103 loc) · 2.41 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
module.exports = {
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"plugins": [
"babel",
"@typescript-eslint",
"import",
"react",
"react-hooks",
"jest"
],
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
{
"files": ["*.js", "*.jsx"],
"rules": {
"@typescript-eslint/explicit-function-return-type": 0
}
},
{
"files": ["*.ts", ".tsx"],
"rules": {
"no-undef": 0,
"import/no-unresolved": 0,
"import/namespace": 0,
"import/named": 0,
"import/default": 0
}
}
],
"parserOptions": {
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true,
"react": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
// General Rules
"no-console": 0,
"no-debugger": 0,
"eqeqeq": ["error","always"],
"spaced-comment": ["error", "always"],
"arrow-spacing": ["error", { "before": true, "after": true }],
"no-var": "error",
"no-extra-semi": "error",
"no-unused-vars": "error",
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"jsx-quotes":["error", "prefer-double"],
"no-mixed-spaces-and-tabs": "error",
// React rules
"react/no-typos": 1,
"react/no-unescaped-entities": 1,
"react/prop-types": 0,
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
// React-hooks rules
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": 0,
// Typescript rules
"@typescript-eslint/interface-name-prefix": ["warn", { "prefixWithI": "always" }],
"@typescript-eslint/no-explicit-any": 0,
// Jest rules
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error"
},
"settings": {
"react": {
"pragma": "React",
"version": "detect",
},
"import/resolver": {
"babel-module": {},
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
}
}
}
}