-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
74 lines (70 loc) · 1.66 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
'use strict';
const eslintConfig = {
root: true,
extends: 'eslint-config-egg',
parserOptions: {
ecmaVersion: 2020,
},
plugins: [],
rules: {
'valid-jsdoc': 0,
'no-script-url': 0,
'no-multi-spaces': 0,
'default-case': 0,
'no-case-declarations': 0,
'one-var-declaration-per-line': 0,
'no-restricted-syntax': 0,
'jsdoc/require-param': 0,
'jsdoc/check-param-names': 0,
'jsdoc/require-param-description': 0,
'arrow-parens': 0,
'prefer-promise-reject-errors': 0,
'no-control-regex': 0,
'no-use-before-define': 0,
'array-callback-return': 0,
'no-bitwise': 0,
'no-self-compare': 0,
'one-var': 0,
'no-trailing-spaces': [ 'warn', { skipBlankLines: true }],
},
globals: {
window: false,
mock: false,
assert: false,
},
overrides: [],
};
const tslintConfig = {
extends: 'eslint-config-egg/typescript',
files: [ '*.ts' ],
plugins: [
'@typescript-eslint',
'no-only-tests',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': [ '.ts' ],
},
'import/resolver': {
typescript: {
project: [
'tsconfig.json',
],
},
},
},
rules: {
...eslintConfig.rules,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-use-before-define': [ 'error' ],
strict: 0,
'@typescript-eslint/ban-ts-comment': [ 'warn' ],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': [ 'warn' ],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'off',
},
};
eslintConfig.overrides.push(tslintConfig);
module.exports = eslintConfig;