This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
102 lines (91 loc) · 3.07 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
module.exports = {
env: {
es2021: true
},
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint"
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
'@typescript-eslint/comma-dangle': 'off',
'@typescript-eslint/array-type': ['error'],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': ['warn', {
allowExpressions: true,
}],
'@typescript-eslint/member-delimiter-style': ['error'],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/type-annotation-spacing': ['error'],
'@typescript-eslint/typedef': ['error', {
arrowParameter: true,
propertyDeclaration: true,
variableDeclarationIgnoreFunction: true,
}],
'@typescript-eslint/unified-signatures': ['error'],
'array-bracket-spacing': ['error', 'never'],
'arrow-body-style': 'off',
'ban-ts-comment': 'off',
camelcase: 'off',
'class-methods-use-this': 'off',
'eol-last': 'error',
'generator-star-spacing': 'off',
'global-require': 'warn',
'guard-for-in': 'error',
'import/extensions': 'off',
'import/named': 'off',
'import/no-cycle': 'off',
'import/no-duplicates': 'off',
indent: [
'error',
4,
{
SwitchCase: 1,
},
],
'lines-between-class-members': ['error', 'always', {
exceptAfterSingleLine: true,
}],
'max-classes-per-file': 'off',
'max-len': 'off',
'multiline-comment-style': 'error',
'no-alert': 'off',
'no-await-in-loop': 'off',
'no-continue': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-fallthrough': 'off',
'no-new': 'off',
'no-param-reassign': ['warn', {props: false}],
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'no-return-assign': ['warn', 'except-parens'],
'no-trailing-spaces': 'error',
'no-underscore-dangle': 'off',
'no-use-before-define': 'off',
'no-useless-constructor': 'off',
'no-shadow': 'off',
'object-curly-newline': ['error', {
ImportDeclaration: 'never',
}],
'object-curly-spacing': ['error', 'never'],
'prefer-destructuring': ['error', {
array: false,
object: true,
}],
semi: ['error', 'always'],
'sort-imports': 'error',
}
};