-
Notifications
You must be signed in to change notification settings - Fork 30
/
.eslintrc.js
97 lines (94 loc) · 3.51 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
88
89
90
91
92
93
94
95
96
97
/* @flow */
/* eslint-disable import/no-commonjs */
module.exports = {
'extends': "@krakenjs/eslint-config-grumbler/eslintrc-browser",
'rules': {
'no-empty-function': 'off',
'no-restricted-globals': 'off',
'no-warning-comments': 'off',
'require-await': 'off',
// stylistic issues
'array-bracket-spacing': [ 'error', 'always' ],
'block-spacing': 'error',
'brace-style': 'off',
'camelcase': 'off',
'comma-spacing': [ 'error', { 'before': false, 'after': true } ],
'comma-style': [ 'error', 'last' ],
'computed-property-spacing': 'off',
'consistent-this': [ 'error', 'self' ],
'eol-last': 'error',
'func-names': [ 'error', 'as-needed' ],
'func-style': [ 'off', 'declaration' ],
'id-blacklist': 'off',
'id-length': 'off',
'id-match': 'off',
'indent': [ 'error', 2],
'jsx-quotes': 'off',
'key-spacing': [ 'error', { 'afterColon': true }],
'keyword-spacing': 'error',
'linebreak-style': [ 'error', 'unix' ],
'lines-around-comment': 'off',
'max-depth': [ 'error', 5 ],
'max-len': [ 'off', 120, 4],
'max-nested-callbacks': [ 'error', 4],
'max-params': ['error', 5],
'max-statements': 'off',
'new-cap': 'off',
'new-parens': 'error',
'newline-after-var': 'off',
'newline-before-return': 'off',
'newline-per-chained-call': 'off',
'no-array-constructor': 'error',
'no-bitwise': 'error',
'no-continue': 'off',
'no-inline-comments': 'off',
'no-lonely-if': 'off',
'no-mixed-spaces-and-tabs': [ 'error', true],
'no-multiple-empty-lines': 'error',
'no-negated-condition': 'off',
'no-nested-ternary': 'error',
'no-new-object': 'error',
'no-restricted-syntax': 'off',
'no-spaced-func': 'error',
'no-ternary': 'off',
'no-trailing-spaces': [ 'error', { 'skipBlankLines': true } ],
'no-underscore-dangle': 'off',
'no-unneeded-ternary': 'off',
'no-whitespace-before-property': 'error',
'object-curly-spacing': [ 'error', 'always' ],
'one-var': 'off',
'one-var-declaration-per-line': [ 'error', 'always' ],
'operator-assignment': [ 'error', 'always' ],
'operator-linebreak': 'off',
'padded-blocks': 'off',
'quotes': [ 'error', 'single', { 'allowTemplateLiterals': true } ],
'require-jsdoc': 'off',
'semi-spacing': 'error',
'semi': 'error',
'sort-imports': 'off',
'sort-vars': 'off',
'space-before-blocks': [ 'error', 'always' ],
'space-before-function-paren': 'off',
'space-in-parens': [ 'error', 'never' ],
'space-infix-ops': 'error',
'space-unary-ops': [ 'error', { 'words': true, 'nonwords': false } ],
'spaced-comment': 'error',
'wrap-regex': 'error',
'lines-between-class-members': 'off',
'max-classes-per-file': 'off',
'max-lines-per-function': 'off',
'multiline-comment-style': 'off',
'prefer-object-spread': 'error',
// plugins
'compat/compat': 'off',
'flowtype/no-weak-types': [ 'error', { 'any': false, 'Object': false, 'Function': false } ],
'import/no-default-export': 'off',
'promise/no-native': 'off',
},
"overrides": [{
"files": [ "*.test.js" ],
"rules": {
'import/no-nodejs-modules': 'off'
}
}],
};