-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
37 lines (37 loc) · 1020 Bytes
/
.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
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['alloy', 'alloy/typescript'],
plugins: ['@typescript-eslint'], // eslint 默认规则对 TS 的补充
env: {
browser: true,
node: true,
commonjs: true,
es6: true
},
root: true,
rules: {
'no-duplicate-imports': false,
'for-direction': 'error',
'getter-return': [
'error',
{
allowImplicit: false
}
],
'no-await-in-loop': 'off',
'no-compare-neg-zero': 'error',
'no-cond-assign': ['error', 'except-parens'],
'no-console': 'off',
'no-constant-condition': [
'error',
{
checkLoops: false
}
],
'no-control-regex': 'error',
'no-debugger': 'error',
'no-dupe-args': 'error',
'no-dupe-keys': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'interface']
}
}