-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
75 lines (73 loc) · 1.73 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
module.exports = {
parser: "babel-eslint",
env: {
browser: true,
amd: true,
node: true,
es6: true,
jest: true,
"jest/globals": true
},
overrides: [
{
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
extends: [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
rules: {
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/ban-ts-comment": "off",
"react/prop-types": "off",
"react/no-unescaped-entities": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"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"
}
}
],
plugins: ["react-hooks", "jest", "jsx-a11y"],
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
settings: {
react: {
version: "detect"
}
},
rules: {
"arrow-body-style": ["error", "as-needed"],
"object-curly-spacing": [
2,
"always",
{ "objectsInObjects": true }
],
"jsx-quotes": ["error", "prefer-double"],
"no-multiple-empty-lines": "error",
"no-trailing-spaces": "error",
"curly": "error",
"comma-dangle": ["error", "never"],
"prettier/prettier": [
"error",
{
"endOfLine": "auto",
"printWidth": 110,
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"trailingComma": "none"
}
]
}
};