-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.yaml
128 lines (128 loc) · 3.93 KB
/
.eslintrc.yaml
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
118
119
120
121
122
123
124
125
126
127
128
# Some of these rules were copied from the original tslint.json, while others are used to silence or
# extend the recommended configs to match tslint:recommended.
env:
node: true
extends:
- 'eslint:recommended'
- 'plugin:@typescript-eslint/recommended'
overrides:
# Rules that require type information or conflict with `standard` should not be applied to js
# files, only ts files.
- files: '*.ts'
parserOptions:
project: ./tsconfig.json
rules:
# While TSLint had true and false, ESLint uses 'error' and 'off'.
'@typescript-eslint/comma-dangle':
- error
- arrays: always-multiline
exports: always-multiline
functions: only-multiline
imports: always-multiline
objects: always-multiline
'@typescript-eslint/explicit-member-accessibility':
- error
- overrides:
constructors: no-public
'@typescript-eslint/naming-convention':
- error
- format:
- camelCase
- PascalCase
leadingUnderscore: allowSingleOrDouble
selector: variable
'@typescript-eslint/no-floating-promises': error
'@typescript-eslint/no-shadow': error
'@typescript-eslint/no-throw-literal': error
'@typescript-eslint/no-unnecessary-qualifier': error
'@typescript-eslint/no-unnecessary-type-assertion': error
'@typescript-eslint/no-var-requires': error
'@typescript-eslint/quotes':
- error
- double
- allowTemplateLiterals: true
avoidEscape: true
'@typescript-eslint/return-await': error
'@typescript-eslint/semi': error
# TSLint is incompatible with TS 5 :/
# '@typescript-eslint/tslint/config':
# - error
# # As TSLint is poorly supported, only the TSLint-exclusive rules go here. Any rules with
# # ESLint equivalents should use those instead.
# - rules:
# match-default-export-name: true
# no-duplicate-super: true
# no-redundant-jsdoc: true
# no-unnecessary-callback-wrapper: true
# # There is an ESLint equivalent, sort-imports, but it's too different for the old
# # configuration to be replicated.
# ordered-imports: true
# use-isnan: true
no-throw-literal: 'off'
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: 2022
plugins:
- '@typescript-eslint/eslint-plugin'
# - '@typescript-eslint/tslint'
rules:
'@typescript-eslint/array-type': error
'@typescript-eslint/prefer-function-type': error
'@typescript-eslint/indent':
- error
- 2
'@typescript-eslint/member-ordering':
- error
- default:
- public-static-field
- protected-static-field
- private-static-field
- public-instance-field
- protected-instance-field
- private-instance-field
- public-constructor
- protected-constructor
- private-constructor
- private-instance-method
- protected-instance-method
- public-instance-method
'@typescript-eslint/method-signature-style':
- error
- method
'@typescript-eslint/no-explicit-any': 'off'
'@typescript-eslint/no-inferrable-types': 'off'
'@typescript-eslint/no-unused-vars': 'off'
'@typescript-eslint/no-var-requires': 'off'
'@typescript-eslint/prefer-for-of': error
'@typescript-eslint/unified-signatures': error
arrow-parens:
- error
- as-needed
arrow-body-style: error
curly:
- error
- multi-line
dot-notation: error
eqeqeq:
- error
- always
- 'null': ignore
func-names: error
max-len:
- error
- code: 100
ignoreUrls: true
no-eval: error
no-irregular-whitespace: 'off'
no-new-wrappers: error
no-prototype-builtins: 'off'
no-throw-literal: error
no-trailing-spaces:
- error
- ignoreComments: true
no-var: error
object-shorthand: error
one-var:
- error
- never
radix: error