This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
89 lines (89 loc) · 3 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: {
// commonjs: true,
es6: true,
node: true,
jest: true
},
globals: {
__DEV__: true,
__VERSION__: true,
__COMMIT_SHA__: true,
__BUILD_DATE__: true
},
plugins: ['@typescript-eslint/eslint-plugin', 'eslint-plugin-tsdoc', 'prettier'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended', 'prettier'],
parser: '@typescript-eslint/parser',
reportUnusedDisableDirectives: true,
parserOptions: {
/* enabling "project" field is a performance hit
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md#performance
*/
sourceType: 'module'
},
rules: {
'indent': 'off',
'tsdoc/syntax': 'warn',
'@typescript-eslint/no-unused-vars': [2, { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'semi': 'error',
'quote-props': ['error', 'consistent'],
'generator-star-spacing': ['error', { before: false, after: true }],
'space-before-function-paren': 'off',
'no-dupe-class-members': 'off',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'off',
'prettier/prettier': ['error'],
'lines-between-class-members': ['error', 'always'],
'padding-line-between-statements': ['error', { blankLine: 'always', prev: '*', next: 'return' }],
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowTypedFunctionExpressions: true
}
],
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'explicit',
overrides: {
constructors: 'no-public'
}
}
],
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description'
}
],
'@typescript-eslint/no-non-null-assertion': [2],
'@typescript-eslint/no-explicit-any': [2, { ignoreRestArgs: true }],
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'semi',
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: false
},
multilineDetection: 'brackets'
}
],
'@typescript-eslint/indent': ['error', 4],
'@typescript-eslint/no-empty-interface': 'off'
},
overrides: [
{
files: ['*.js', '*.jsx'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-var-requires': 'off'
}
}
]
};