-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
120 lines (119 loc) · 3.25 KB
/
.eslintrc
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
109
110
111
112
113
114
115
116
117
118
119
120
{
"env": {
"browser": true,
"node": true,
"jest": true,
},
"extends": [
"airbnb"
],
"plugins": [
"no-only-tests",
"react-hooks"
],
"parser": "@typescript-eslint/parser",
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-var-requires": "warn",
"react/prop-types": "off"
}
},
{
"files": ["*.test.js", "*.spec.js", "*.test.jsx", "*.spec.jsx"],
"extends": [
"plugin:jest/recommended"
],
"plugins": ["jest"]
}
],
"rules": {
"arrow-parens": 0,
"arrow-body-style": "warn",
"indent": 0,
"no-param-reassign": "warn",
"no-plusplus": "warn",
"max-len": [
"off",
{
"code": 100,
"comments": 120
}
],
"object-curly-newline": 0,
"object-curly-spacing": 0,
"import/prefer-default-export": 0,
"react/forbid-prop-types": 0,
"jsx-a11y/anchor-is-valid": 0, // Common exception to this is Next.js <Link passHref>
"react/react-in-jsx-scope": 0, // Next.js imports React automatically
"react/jsx-filename-extension": [
1,
{
"extensions": [
".jsx",
".tsx"
]
}
],
"no-console": "warn",
"react/jsx-indent-props": "off",
"react/jsx-indent": "off",
"jsx-quotes": 0,
"quotes": [
"off",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"linebreak-style": ["off", "windows"],
"no-async-promise-executor": "warn",
"global-require": "warn",
"no-underscore-dangle": "off",
"no-only-tests/no-only-tests": "error",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"@typescript-eslint/no-var-requires": "off",
"no-restricted-syntax": "warn",
"react/jsx-props-no-spreading": "warn",
"no-nested-ternary": "warn",
"import/no-extraneous-dependencies": [
"error",
{"devDependencies": [
"**/*.test.js",
"**/*.spec.js",
"**/*.test.jsx",
"**/*.spec.jsx",
"./client/setupTests.js"
]}
],
"import/no-unresolved": "error",
"import/no-named-as-default": "off",
"import/no-named-as-default-member": "off",
"camelcase": "off"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}