-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
96 lines (96 loc) · 3.86 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
const IndentSpaces = 4;
module.exports = {
parserOptions: {
sourceType: 'script'
, ecmaFeatures: {
impliedStrict: true
}
, ecmaVersion: 2020
}
, extends: [ 'eslint:recommended', 'plugin:node/recommended' ]
, env: {
node: true
, mocha: true
, es2020: true
}
, rules: {
'array-bracket-spacing': [ 'error', 'always' ]
, 'arrow-spacing': [ 'error', { 'before': true, 'after': true } ]
, 'block-scoped-var': 'error'
, 'brace-style': [ 'error', 'stroustrup' ]
, 'camelcase': 'error'
, 'comma-spacing': [ 'error', { 'after': true } ]
, 'comma-style': [ 'error', 'first' ]
, 'curly': [ 'warn' ]
, 'default-case': 'error'
, 'dot-location': [ 'error', 'property' ]
, 'dot-notation': [ 'error' ]
, 'eqeqeq': [ 'error', 'smart' ]
, 'func-call-spacing': [ 'error', 'never' ]
, 'handle-callback-err': 'error'
, 'indent': [ 'error', IndentSpaces, { 'MemberExpression': 1, 'ArrayExpression': 1, 'ObjectExpression': 1 } ]
, 'keyword-spacing': [ 'error', { 'overrides': { 'if': { 'after': false }, 'for': { 'after': false }, 'while': { 'after': false } } } ]
, 'line-comment-position': [ 'error', { 'position': 'above' } ]
, 'newline-per-chained-call': [ 'error', { 'ignoreChainWithDepth': 2 } ]
, 'no-alert': [ 'error' ]
, 'no-caller': 'error'
, 'no-console': 'warn'
, 'no-div-regex': 'error'
, 'no-duplicate-imports': [ 'error', { includeExports: true } ]
, 'no-else-return': [ 'error', { allowElseIf: false } ]
, 'no-empty-function': 'error'
, 'no-eq-null': 'error'
, 'no-floating-decimal': 'error'
, 'no-implicit-coercion': [ 'error' ]
, 'no-irregular-whitespace': [ 'error', { skipComments: true } ]
, 'no-lone-blocks': [ 'error' ]
, 'no-lonely-if': 'error'
, 'no-magic-numbers': [ 'error', { ignore: [ 2, 1, 0, -1 ], ignoreArrayIndexes: true } ]
, 'no-multi-spaces': 'error'
, 'no-param-reassign': [ 'error', { props: false } ]
, 'no-path-concat': 'error'
, 'no-return-await': 'error'
, 'no-script-url': 'error'
, 'no-self-compare': [ 'error' ]
, 'no-tabs': 'error'
, 'no-trailing-spaces': 'error'
, 'no-unneeded-ternary': [ 'error' ]
, 'no-unsafe-negation': [ 'error' ]
, 'no-unused-vars': [ 'error', { args: 'all', caughtErrors: 'all' } ]
, 'no-useless-return': 'error'
, 'no-var': 'error'
, 'no-whitespace-before-property': 'error'
, 'object-curly-spacing': [ 'error', 'always' ]
, 'one-var': [ 'error', { var: 'always', let: 'never', const: 'never' } ]
, 'prefer-const': 'error'
, 'prefer-destructuring': [
'error'
, {
VariableDeclarator: {
array: false
, object: true,
}
, AssignmentExpression: {
array: true
, object: false,
},
}
, {
enforceForRenamedProperties: false,
}
, ]
, 'prefer-template': 'error'
, quotes: [ 'error', 'single', { allowTemplateLiterals: true } ]
, semi: [ 'error', 'always', { omitLastInOneLineBlock: true } ]
, 'space-before-blocks': [ 'error', 'always' ]
, 'space-in-parens': [ 'error', 'never' ]
, 'space-infix-ops': [ 'error' ]
, 'space-unary-ops': [ 'error', { words: true, nonwords: false } ]
, 'spaced-comment': [ 'error', 'always' ]
, yoda: 'error'
, 'node/callback-return': 'warn'
, 'node/global-require': 'warn'
, 'node/no-deprecated-api': 'warn'
, 'node/no-unpublished-require': 'off'
}
};