-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
53 lines (50 loc) · 1.21 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
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": ["next", "eslint:recommended", "prettier"],
"settings": {
"react": {
"version": "detect"
}
},
"globals": {
"analytics": true,
"FB": true,
"ga": true,
"google": true,
"gtag": true
},
"rules": {
// "no-console": ["warn", 0],
"no-console": ["warn", { "allow": ["warn", "error"] }],
"indent": "off", // conflicts with prettier
"linebreak-style": ["error", "unix"],
"no-unused-vars": "warn",
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"semi": ["error", "always"],
// Import
"import/order": [
"error",
{ "alphabetize": { "order": "asc", "caseInsensitive": true } }
],
// React
"react/prop-types": 0,
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off",
// NextJs specific fix: allow jsx syntax in js files
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }], //should add ".ts" if typescript project
"react/display-name": 1,
// React Hooks
"react-hooks/exhaustive-deps": "off"
}
}