-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
74 lines (72 loc) · 2.27 KB
/
.eslintrc
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
{
'extends': [ 'plugin:react/recommended' ],
'env': {
'es6': true
},
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module',
'ecmaFeatures': {
'jsx': true
}
},
'plugins': [ 'react' ],
'rules': {
'indent': ['error', 2],
// ECMAScript 6
'arrow-body-style': 'error',
'arrow-parens': [ 'error', 'as-needed' ],
'arrow-spacing': 'error',
'generator-star-spacing': 'error',
'no-confusing-arrow': 'error',
'no-duplicate-imports': 'error',
'no-restricted-imports': 'error',
'no-useless-computed-key': 'error',
'no-useless-constructor': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'prefer-reflect': 'off',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'require-yield': 'error',
'sort-imports': [ 'error', { 'ignoreCase': true }],
'template-curly-spacing': 'error',
'yield-star-spacing': 'error',
// React
'react/forbid-prop-types': 'error',
'react/no-multi-comp': [ 'error', { 'ignoreStateless': true }],
'react/no-set-state': 'off',
'react/no-string-refs': 'off',
'react/prefer-es6-class': 'error',
'react/prefer-stateless-function': 'off',
'react/require-extension': 'error',
'react/require-render-return': 'error',
'react/self-closing-comp': 'error',
'react/sort-comp': 'error',
'react/sort-prop-types': 'error',
'react/wrap-multilines': 'error',
'react/no-find-dom-node': 'error',
// JSX
'react/jsx-boolean-value': 'error',
'react/jsx-closing-bracket-location': 'error',
'react/jsx-curly-spacing': [ 'error', 'always' ],
'react/jsx-equals-spacing': 'error',
'react/jsx-first-prop-new-line': 'error',
'react/jsx-handler-names': 'error',
'react/jsx-indent-props': [ 'error', 2 ],
'react/jsx-indent': [ 'error', 2 ],
'react/jsx-key': 'error',
'react/jsx-max-props-per-line': [ 'error', { 'maximum': 3 }],
'react/jsx-no-bind': [ 'error', {
'ignoreRefs': true
}],
'react/jsx-no-literals': 'off',
'react/jsx-no-target-blank': 'error',
'react/jsx-pascal-case': 'error',
'react/jsx-sort-props': 'error',
'react/jsx-space-before-closing': 'error'
}
}