-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
87 lines (87 loc) · 2.87 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
module.exports = {
'settings': {
'react': {
'version': 'detect'
}
},
'plugins': ['react'],
'parser': 'babel-eslint',
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module',
'ecmaFeatures': {
'jsx': true
}
},
'env': {
'es6': true,
'browser': true,
'commonjs': true
},
'rules': {
'no-cond-assign': 'error',
'no-constant-condition': 'error',
'no-dupe-args': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-empty-character-class': 'error',
'no-empty': 'warn',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-semi': 'error',
'no-func-assign': 'error',
'no-inner-declarations': 'error',
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-obj-calls': 'error',
'no-regex-spaces': 'error',
'no-sparse-arrays': 'error',
'no-unexpected-multiline': 'error',
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-caller': 'error',
'no-case-declarations': 'error',
'no-else-return': 'error',
'no-empty-pattern': 'error',
'no-redeclare': 'error',
'no-delete-var': 'error',
'no-lonely-if': 'error',
'no-self-assign': 'error',
'no-multiple-empty-lines': ['warn', {'max': 1}],
'space-infix-ops': 'error',
'spaced-comment': 'warn',
'comma-spacing': 'error',
'comma-style': 'error',
'comma-dangle': 'error',
'semi': 'error',
'semi-spacing': 'error',
'key-spacing': 'error',
'curly': 'error',
'use-isnan': 'error',
'valid-typeof': 'error',
'accessor-pairs': 'error',
'eqeqeq': 'error',
'radix': 'error',
'quotes': ['error', 'single'],
'indent': ['warn', 4, {'SwitchCase': 1, 'MemberExpression': 2, 'ignoredNodes': ['TemplateLiteral']}],
'keyword-spacing': 'error',
'arrow-spacing': 'error',
'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
'space-unary-ops': ['error', {'words': true, 'nonwords': false}],
'jsx-quotes': 'error',
'react/no-array-index-key': 'warn',
'react/no-deprecated': 'error',
'react/no-find-dom-node': 'error',
'react/no-is-mounted': 'error',
'react/no-multi-comp': 'error',
'react/no-string-refs': 'error',
// 'react/no-unused-prop-types': 'error',
'react/prop-types': 'warn',
'react/prefer-es6-class': 'error',
'react/jsx-uses-vars': 'warn',
'react/jsx-uses-react': 'error'
}
}