-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
71 lines (71 loc) · 2.1 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
module.exports = {
parser: 'babel-eslint',
plugins: ['react'],
extends: ['eslint:recommended'],
env: {
'commonjs': true,
'browser': true,
'node': true,
'es6': true,
'jest': true
},
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true
},
sourceType: 'module'
},
rules: {
'strict': 0,
'no-var': 'error',
'no-with': 'error',
'no-undef': 'warn',
'no-tabs': 'error',
'no-eval': 'error',
'no-alert': 'warn',
'no-console': 'off',
'camelcase': 'error',
'no-debugger': 'warn',
'semi': [2, 'always'],
'quotes': [2, 'single'],
'prefer-const': 'error',
'no-lonely-if': 'error',
'no-unused-vars': 'warn',
'no-extra-semi': 'error',
'react/jsx-key': 'error',
'no-else-return': 'error',
'no-unreachable': 'error',
'prefer-template': 'error',
'no-const-assign': 'error',
'max-params': ['error', 3],
'constructor-super': 'warn',
'no-empty-function': 'error',
'comma-dangle': [2, 'never'],
'react/jsx-uses-vars': 'error',
'spaced-comment': [2, 'always'],
'no-this-before-super': 'error',
'no-duplicate-imports': 'error',
'react/jsx-uses-react': 'error',
'react/jsx-no-duplicate-props': [2],
'react/jsx-closing-tag-location': 'warn',
'react/jsx-first-prop-new-line': 'warn',
'react/no-direct-mutation-state': 'error',
'react/jsx-closing-bracket-location': 'warn',
'react/default-props-match-prop-types': 'error',
'indent': ['warn', 4, {
SwitchCase: 1
}],
'react/prop-types': [2, {
ignore: ['children']
}],
'react/prefer-stateless-function': [1, {
'ignorePureComponents' : true
}],
'space-before-function-paren': ['error', {
'asyncArrow': 'ignore',
'anonymous': 'never',
'named': 'never'
}]
}
};