-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
61 lines (58 loc) · 1.38 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
module.exports = {
extends: ['eslint:recommended'],
env: {
// commonjs:true,
es6: true,
node: true,
mocha: true,
},
globals: {
ROOT_PATH: true,
CustomError: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['prettier'],
rules: {
'prettier/prettier': ['error'],
'no-cond-assign': 'off',
'no-constant-condition': 'off',
'no-mixed-spaces-and-tabs': 'off',
'no-regex-spaces': 'off',
'no-unused-vars': 'off',
'no-useless-escape': 'off',
'require-atomic-updates': 'off',
'prefer-const': 'warn',
'brace-style': 'error',
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'ignore',
exports: 'ignore',
functions: 'ignore',
},
],
eqeqeq: 'error',
'func-call-spacing': 'error',
'key-spacing': 'error',
'keyword-spacing': 'error',
'no-array-constructor': 'error',
'no-duplicate-imports': 'error',
'no-eval': 'error',
'no-floating-decimal': 'error',
'no-implied-eval': 'error',
'no-new-object': 'error',
'no-param-reassign': 'error',
'no-path-concat': 'error',
'no-return-await': 'error',
'no-self-compare': 'error',
'no-trailing-spaces': 'error',
'no-var': 'error',
quotes: ['error', 'single'],
yoda: 'error',
},
};