-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
80 lines (79 loc) · 2.16 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
/** @type {import("eslint").Linter.Config} */
const config = {
env: {
browser: true,
node: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
createDefaultProgram: true,
},
plugins: ['eslint-plugin-no-null', '@typescript-eslint', 'prettier', 'unused-imports'],
root: true,
rules: {
'@typescript-eslint/dot-notation': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-shadow': [
'error',
{
hoist: 'all',
},
],
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/quotes': 'off',
'@typescript-eslint/typedef': [
'error',
{
propertyDeclaration: true,
memberVariableDeclaration: true,
variableDeclarationIgnoreFunction: true,
},
],
'@typescript-eslint/prefer-literal-enum-member': 'error',
'@typescript-eslint/prefer-enum-initializers': 'error',
curly: 'error',
'default-case': 'error',
'dot-notation': 'off',
eqeqeq: ['error', 'smart'],
'id-denylist': ['off', 'any', 'Number', 'number', 'String', 'string', 'Boolean', 'boolean', 'Undefined', 'undefined'],
'id-match': 'off',
'no-bitwise': 'error',
'no-caller': 'error',
'no-console': 'off',
'no-debugger': 'error',
'no-empty': 'error',
'no-empty-function': 'off',
'no-eval': 'error',
'no-fallthrough': 'off',
'no-new-wrappers': 'error',
'no-null/no-null': 'off',
'no-underscore-dangle': 'off',
'no-unused-expressions': 'off',
'no-unused-labels': 'error',
'no-var': 'error',
'no-duplicate-imports': 'error',
radix: 'off',
'prettier/prettier': ['error'],
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-floating-promises': 'warn',
},
extends: ['prettier'],
};
module.exports = config;