-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
60 lines (60 loc) · 1.99 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
module.exports = {
// So parent files don't get applied
root: true,
env: {
es6: true,
browser: true,
node: true,
},
extends: 'airbnb',
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
},
plugins: [
'babel',
'mocha',
'flowtype',
],
rules: {
'array-bracket-spacing': 'off', // use babel plugin rule
'arrow-body-style': 'off',
'arrow-parens': ['error', 'always'],
'consistent-this': ['error', 'self'],
'func-names': 'off',
'newline-per-chained-call': 'off',
'no-console': 'error', // airbnb have on warning
'no-nested-ternary': 'off',
'no-param-reassign': 'off', // wishlist, one day
'no-prototype-builtins': 'off',
'no-restricted-syntax': 'off',
'no-return-assign': 'off',
'no-use-before-define': ['error', { functions: false, classes: true }],
'object-curly-spacing': 'off', // use babel plugin rule
'operator-linebreak': ['error', 'after'],
'quotes': ['error', 'single', 'avoid-escape'],
'babel/object-curly-spacing': ['error', 'always'],
'babel/array-bracket-spacing': ['error', 'never'],
'import/no-unresolved': 'off',
'import/no-named-as-default': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'react/jsx-filename-extension': ['error', {extensions: ['.js']}],
'react/forbid-prop-types': 'off',
'react/no-unused-prop-types': 'off',
'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',
'flowtype/define-flow-type': 1,
'flowtype/require-valid-file-annotation': ['error', 'always'],
'flowtype/require-parameter-type': 'off',
'flowtype/require-return-type': 'off',
'flowtype/semi': ['error', 'always'],
'flowtype/space-after-type-colon': 'error',
'flowtype/space-before-type-colon': 'error',
},
};