This repository has been archived by the owner on Oct 2, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path.eslintrc.js
117 lines (115 loc) · 3.77 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: ['airbnb-base', 'prettier'],
plugins: ['prettier'],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 12
},
rules: {
/* ======================================= */
/* POSSIBLE ERRORS ----------------------- */
// These rules relate to possible syntax or
// logic errors in the code.
/* ======================================= */
'for-direction': ['error'],
'getter-return': ['error'],
'no-async-promise-executor': ['off'],
'no-await-in-loop': ['off'],
'no-compare-neg-zero': ['error'],
'no-cond-assign': ['error', 'except-parens'],
'no-constant-condition': ['error', { checkLoops: true }],
'no-control-regex': ['error'],
'no-debugger': ['error'],
'no-dupe-args': ['error'],
'no-dupe-else-if': ['error'],
'no-dupe-keys': ['error'],
'no-duplicate-case': ['error'],
'no-empty': ['error', { allowEmptyCatch: true }],
'no-empty-character-class': ['error'],
'no-ex-assign': ['error'],
'no-extra-boolean-cast': ['error', { enforceForLogicalOperands: true }],
'no-extra-parens': ['off'],
'no-extra-semi': ['error'],
'no-func-assign': ['error'],
'no-import-assign': ['error'],
'no-inner-declarations': ['off'],
'no-invalid-regexp': ['error', { allowConstructorFlags: ['u', 'y'] }],
'no-irregular-whitespace': [
'error',
{
skipStrings: true,
skipComments: true,
skipRegExps: true,
skipTemplates: true
}
],
'no-loss-of-precision': ['error'],
'no-misleading-character-class': ['error'],
'no-obj-calls': ['error'],
'no-promise-executor-return': ['error'],
'no-prototype-builtins': ['error'],
'no-regex-spaces': ['error'],
'no-setter-return': ['error'],
'no-sparse-arrays': ['error'],
'no-template-curly-in-string': ['error'],
'no-unexpected-multiline': ['error'],
'no-unreachable': ['error'],
'no-unreachable-loop': ['error'],
'no-unsafe-finally': ['error'],
'no-unsafe-negation': ['error'],
'use-isnan': ['error'],
'valid-typeof': ['error'],
/* BEST PRACTICES ---------------------- */
// These rules relate to better ways of
// doing things to help avoid problems
// in the codebase.
/* ===================================== */
'accessor-pairs': ['error'],
'array-callback-return': ['error'],
'block-scoped-var': ['error'],
'consistent-return': ['error'],
'curly': ['error', 'all'],
'default-case': ['error'],
'default-case-last': ['error'],
'default-param-last': ['error'],
'dot-location': ['error', 'property'],
'dot-notation': ['error'],
'eqeqeq': ['error'],
'grouped-accessor-pairs': ['error', 'getBeforeSet'],
'no-case-declarations': ['off'],
'no-constructor-return': ['error'],
'no-div-regex': ['error'],
'no-else-return': ['off'],
'no-empty-function': ['error'],
'no-empty-pattern': ['off'],
'no-eq-null': ['error'],
'no-eval': ['error'],
'no-extend-native': ['off'],
'no-fallthrough': ['off'],
'no-floating-decimal': ['error'],
'no-global-assign': ['error'],
'no-invalid-this': ['error'],
'no-nested-ternary': ['off'],
'prefer-destructuring': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/ban-ts-comment': ['off'],
'@typescript-eslint/no-var-requires': ['off'],
/* VARIABLES --------------------------- */
// These rules relate to variables and
// variable declarations.
/* ===================================== */
'no-unused-vars': ['off'],
'@typescript-eslint/no-unused-vars': ['off'],
'no-undef': ['error'],
'no-use-before-define': ['error']
},
globals: {
NodeJS: 'readonly'
}
};