forked from wesgarland/ctx-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
117 lines (117 loc) · 3.58 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
module.exports = {
'env': {
'browser': true,
'commonjs': true,
'es2021': true,
'node': true
},
'extends': 'eslint:recommended',
'parserOptions': {
'ecmaVersion': 13
},
globals: {
dcpConfig: true
},
'rules': {
'indent': [
'warn',
2,
{
'SwitchCase': 1,
'ignoredNodes': ['CallExpression', 'ForStatement'],
}
],
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'warn',
'single'
],
'func-call-spacing': [
'off', 'never'
],
'no-prototype-builtins': 'off',
'quotes': ['warn', 'single', 'avoid-escape'],
'no-unused-vars': ['warn', { 'vars': 'all', 'args': 'none', 'ignoreRestSiblings': false }],
'no-empty': [ 'warn' ],
'no-trailing-spaces': [
'off', {
skipBlankLines: true,
ignoreComments: true
}
],
'no-multi-spaces': [
'off',
],
'prettier/prettier': [
'off',
],
'vars-on-top': [
'error',
],
'no-var': [
'off',
],
'spaced-comment': [
'warn',
],
'brace-style': [
/* 'warn', 'allman', { 'allowSingleLine': true } */
'off'
],
'no-eval': [
'error',
],
'object-curly-spacing': [
'warn',
'always'
],
'no-dupe-keys': [ 'warn' ],
'no-constant-condition': [ 'warn' ],
'no-extra-boolean-cast': [ 'warn' ],
'no-sparse-arrays': [ 'off' ],
'no-inner-declarations': [ 'off' ],
'no-loss-of-precision': [ 'warn' ],
'require-atomic-updates': [ 'warn' ], /* watch for false positives, remove if (m)any */
'eqeqeq': [ 'warn', 'always' ],
'no-dupe-keys': [ 'warn' ],
'no-dupe-class-members': [ 'warn' ],
'no-fallthrough': [ 'warn', { commentPattern: 'fall[ -]*through' }],
'no-invalid-this': [ 'error' ],
'no-return-assign': [ 'error' ],
'no-return-await': [ 'warn' ],
'no-unused-expressions': [ 'warn', { allowShortCircuit: true, allowTernary: true } ],
'prefer-promise-reject-errors': [ 'error' ],
'no-throw-literal': [ 'error' ],
'semi': [ 'off', { omitLastInOneLineBlock: true }], /* does not work right with exports.X = function allmanStyle */
'semi-style': [ 'warn', 'last' ],
'semi-spacing': [ 'error', {'before': false, 'after': true}],
'no-extra-semi': [ 'warn' ],
'no-tabs': [ 'error' ],
'symbol-description': [ 'error' ],
'operator-linebreak': [ 'warn', 'before' ],
'new-cap': [ 'warn' ],
'consistent-this': [ 'error', 'that' ],
'no-use-before-define': [ 'error', { functions: false, classes: false } ],
'no-shadow': [ 'error' ],
'no-label-var': [ 'error' ],
'radix': [ 'error' ],
'no-self-compare': [ 'error' ],
'require-await': [ 'error' ],
'require-yield': [ 'error' ],
'no-promise-executor-return': [ 'off' ],
'no-template-curly-in-string': [ 'warn' ],
'no-unmodified-loop-condition': [ 'warn' ],
'no-unused-private-class-members': [ 'warn' ],
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
"no-implicit-coercion": [1, {
disallowTemplateShorthand: false,
boolean: true,
number: true,
string: true,
allow: ['!!'] /* really only want to allow if(x) and if(!x) but not if(!!x) */
}],
}
};