forked from aMarCruz/skip-regex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
140 lines (134 loc) · 3.72 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
const OFF = 0
const WARN = 1
const ERROR = 2
const ON = 2
const YES = true
module.exports = {
root: YES,
plugins: [],
parserOptions: {
ecmaVersion: 5,
impliedStrict: YES,
sourceType: 'module',
},
// https://github.com/sindresorhus/globals/blob/master/globals.json
env: {
node: YES,
},
// https://github.com/eslint/eslint/blob/master/conf/eslint-recommended.js
extends: [
'eslint:recommended',
],
rules: {
'array-bracket-spacing': ERROR,
'array-callback-return': ON,
'arrow-parens': ON,
'arrow-spacing': ON,
'block-scoped-var': ON,
'block-spacing': ERROR,
'brace-style': [ON, '1tbs', { allowSingleLine: true }],
'comma-spacing': ERROR,
'comma-style': [ON, 'last'],
'complexity': [ON, 18], // default is 20
'computed-property-spacing': ERROR,
'consistent-return': ON,
'consistent-this': [ON, '_self'],
'curly': ON,
'dot-location': [ON, 'property'],
'dot-notation': WARN,
'eol-last': ON,
'eqeqeq': [ON, 'smart'],
'func-call-spacing': ERROR,
'guard-for-in': WARN,
'handle-callback-err': [ON, '^err(or)?$'],
'indent': [ON, 2, { flatTernaryExpressions: YES, SwitchCase: 1 }],
'jsx-quotes': [ON, 'prefer-double'],
'key-spacing': [ON, { mode: 'minimum' }],
'keyword-spacing': ON,
'linebreak-style': [ON, 'unix'],
'max-params': [ON, 3],
'new-parens': ON,
'no-alert': ON,
'no-array-constructor': ON,
'no-caller': ON,
'no-catch-shadow': ON,
'no-confusing-arrow': [ON, { allowParens: YES }],
'no-console': ON,
'no-div-regex': ON,
'no-duplicate-imports': [ON, { includeExports: YES }],
'no-else-return': ON,
'no-empty': OFF,
'no-eval': ON,
'no-extend-native': ON,
'no-extra-bind': ON,
'no-floating-decimal': ON,
'no-implicit-globals': ON,
'no-implied-eval': ON,
'no-iterator': ON,
'no-label-var': ON,
'no-lone-blocks': ON,
'no-lonely-if': ON,
'no-loop-func': ON,
'no-multi-str': ON,
'no-multiple-empty-lines': [ON, { max: 2 }],
'no-native-reassign': ON,
'no-new-func': ON,
'no-new-object': ON,
'no-new-wrappers': ON,
'no-new': ON,
'no-octal-escape': ON,
'no-proto': ON,
'no-prototype-builtins': ON,
'no-return-assign': [ON, 'except-parens'],
'no-script-url': ON,
'no-self-compare': ON,
'no-sequences': ON,
'no-shadow-restricted-names': ON,
'no-shadow': ON,
'no-spaced-func': ON,
'no-tabs': ON,
'no-template-curly-in-string': ON,
'no-throw-literal': ON,
'no-trailing-spaces': ON,
'no-undef-init': ON,
'no-unmodified-loop-condition': ON,
'no-unneeded-ternary': ON,
'no-unused-expressions': ON,
'no-use-before-define': [ON, 'nofunc'],
'no-useless-call': ON,
'no-useless-computed-key': ON,
'no-useless-rename': ON,
'no-useless-return': ON,
'no-whitespace-before-property': ON,
'no-with': ON,
'object-curly-spacing': [ON, 'always'],
'one-var-declaration-per-line': ON,
'operator-linebreak': ERROR,
'prefer-const': [ON, { destructuring: 'all' }],
'prefer-numeric-literals': ON,
'prefer-promise-reject-errors': ON,
'quote-props': [ON, 'consistent'],
'quotes': [ON, 'single', 'avoid-escape'],
'radix': ON,
'semi-spacing': ERROR,
'semi': [ON, 'never'],
'space-before-blocks': ERROR,
'space-before-function-paren': [ON, 'always'],
'space-in-parens': ERROR,
'space-infix-ops': ERROR,
'space-unary-ops': ERROR,
'switch-colon-spacing': [ON, { after: YES }],
'template-curly-spacing': ERROR,
'unicode-bom': [ON, 'never'],
'wrap-iife': [ON, 'inside'],
'yoda': ERROR,
},
overrides: [
{
files: ['test/**'],
env: {
mocha: YES,
},
},
],
}