-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
69 lines (67 loc) · 1.94 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
module.exports = {
parser: 'babel-eslint',
env: {
browser: true,
es6: true,
mocha: true,
node: true,
},
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:jest/recommended',
],
settings: {
react: {
version: 'detect',
},
},
plugins: [ 'react', 'react-hooks', 'jest' ],
rules: {
// General
'array-callback-return': [ 'warn' ],
'eqeqeq': [ 'warn', 'always', { null: 'ignore' } ],
'new-parens': [ 'warn' ],
'no-array-constructor': [ 'warn' ],
'no-caller': [ 'warn' ],
'no-cond-assign': [ 'warn', 'always' ],
'no-console': [ 'warn', { allow: [ 'warn', 'error', 'reportException' ] } ],
'no-eval': [ 'warn' ],
'no-extend-native': [ 'warn' ],
'no-extra-bind': [ 'warn' ],
'no-implied-eval': [ 'warn' ],
'no-iterator': [ 'warn' ],
'no-lone-blocks': [ 'warn' ],
'no-loop-func': [ 'warn' ],
'no-multi-str': [ 'warn' ],
'no-native-reassign': [ 'warn' ],
'no-new-wrappers': [ 'warn' ],
'no-script-url': [ 'warn' ],
'no-self-compare': [ 'warn' ],
'no-shadow-restricted-names': [ 'warn' ],
'no-template-curly-in-string': [ 'warn' ],
'no-throw-literal': [ 'warn' ],
'no-unused-vars': [ 'warn', { 'args': 'none', ignoreRestSiblings: true } ],
'no-use-before-define': [ 'warn' ],
'no-useless-computed-key': [ 'warn' ],
'no-useless-concat': [ 'warn' ],
'no-useless-constructor': [ 'warn' ],
'no-useless-rename': [ 'warn' ],
'no-whitespace-before-property': [ 'warn' ],
'no-unreachable': [ 'warn' ],
'no-constant-condition': [ 'warn' ],
// React
'react/prop-types': [ 'off' ],
'react/no-unescaped-entities': [ 'off' ],
'react/jsx-key': [ 'off' ],
'react/style-prop-object': [ 'warn' ],
// React Hooks
'react-hooks/rules-of-hooks': [ 'error' ],
},
};