forked from sghall/react-move
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
59 lines (59 loc) · 1.8 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
module.exports = {
root: true,
env: {
es6: true,
browser: true,
node: true,
mocha: true,
},
extends: 'airbnb',
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
},
plugins: [
'babel',
'mocha',
'flowtype',
],
rules: {
'arrow-body-style': 'off',
'no-plusplus': 'off',
'arrow-parens': ['error', 'always'], // airbnb use as-needed
'consistent-this': ['error', 'self'],
'object-curly-spacing': 'off', // use babel plugin rule
'babel/object-curly-spacing': ['error', 'always'],
'import/no-unresolved': 'off',
'import/no-named-as-default': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'react/no-unused-prop-types': 'off', // buggy
'react/require-default-props': 'off', // airbnb use error
'react/forbid-prop-types': 'off', // airbnb use error
'react/jsx-filename-extension': ['error', {extensions: ['.js']}], // airbnb is using .jsx
'react/no-direct-mutation-state': 'error', // airbnb is disabling this rule
'react/sort-comp': [2, {
order: [
'static-methods',
'lifecycle',
'everything-else',
'/^render.+$/',
'render'
],
}],
'mocha/handle-done-callback': 'error',
'mocha/no-exclusive-tests': 'error',
'mocha/no-global-tests': 'error',
'mocha/no-pending-tests': 'error',
'mocha/no-skipped-tests': 'error',
'jsx-a11y/no-static-element-interactions': 'off',
'flowtype/require-valid-file-annotation': ['error', 'always'],
'flowtype/require-parameter-type': 'off',
'flowtype/require-return-type': 'off',
'flowtype/space-after-type-colon': 'off',
'flowtype/space-before-type-colon': 'off',
'flowtype/type-id-match': 'off',
},
};