-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
61 lines (60 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
module.exports = {
parserOptions: {
ecmaVersion: 8,
sourceType: "module",
ecmaFeatures: {
jsx: true
}
},
parser: "babel-eslint",
plugins: ["babel", "react"],
extends: "eslint:recommended",
env: {
es6: true,
browser: true,
commonjs: true
},
globals: {
process: true,
describe: true,
it: true,
__dirname: true,
expect: true,
jest: true,
beforeAll: true,
afterEach: true
},
rules: {
"object-shorthand": "error",
"generator-star-spacing": ["error", "after"],
camelcase: ["off", { properties: "always" }],
eqeqeq: ["error", "smart"],
"linebreak-style": ["error", "unix"],
"new-cap": "off",
"no-array-constructor": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-param-reassign": "error",
"no-sequences": "error",
"no-shadow-restricted-names": "error",
"no-unneeded-ternary": "error",
"no-unused-expressions": "error",
"no-unused-vars": ["error", { args: "none" }],
"no-use-before-define": ["error", "nofunc"],
"no-var": "error",
"prefer-arrow-callback": "error",
"prefer-spread": "error",
"prefer-template": "error",
"wrap-iife": ["error", "inside"],
yoda: ["error", "never"],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-no-undef": ["error", { allowGlobals: true }],
"react/jsx-no-bind": ["error", { allowArrowFunctions: true }],
"react/jsx-key": "error",
"react/no-unknown-property": "error",
"react/no-string-refs": "error",
"react/no-direct-mutation-state": "error",
"no-console": "off"
},
};