-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
52 lines (51 loc) · 1.17 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
const warnOnDev = process.env.NODE_ENV === 'production' ? 'error' : 'off';
module.exports = {
"settings": {
"react": {
"version": "detect"
}
},
"parser": "babel-eslint",
"plugins": ["prettier"],
extends: [
"airbnb-base",
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
],
"env": {
"browser": true,
"node": true,
"jest": true
},
"rules": {
"prettier/prettier": "warn",
"no-bitwise": ["error", { "allow": ["<<", "|"] }],
"no-unused-vars": ["warn", { "vars": "all" }],
"quotes": [
"error",
"single"
],
"no-shadow": ["error", {
"builtinGlobals": false,
"hoist": "functions",
}],
"no-param-reassign": ["error", {
"props": true,
}],
"no-use-before-define": ["error", {
"functions": false,
"classes": true
}],
"eqeqeq": ["error", "smart"],
"consistent-return": ["warn"],
"prefer-destructuring": ["error", {
"object": true,
"array": false
}],
"import/no-extraneous-dependencies": ["off"],
"no-console": warnOnDev,
"no-debugger": warnOnDev,
"newline-before-return": ["warn"],
}
};