-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
47 lines (46 loc) · 1.29 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
const offTsRules = [
'strict-boolean-expressions',
'prefer-nullish-coalescing',
'no-non-null-assertion',
'promise-function-async',
'explicit-function-return-type',
'no-floating-promises',
'no-misused-promises',
'restrict-template-expressions',
'no-confusing-void-expression',
'no-throw-literal',
'ban-types',
'return-await',
'consistent-type-definitions',
'no-unsafe-argument',
];
module.exports = {
env: {
node: true,
},
parser: '@typescript-eslint/parser',
extends: ['standard-with-typescript', 'plugin:import/recommended', 'plugin:import/typescript', 'prettier'],
parserOptions: {
ecmaVersion: 'latest',
project: './tsconfig.json',
},
rules: {
...Object.fromEntries(offTsRules.map(name => [`@typescript-eslint/${name}`, 'off'])),
'import/order': ['warn', { groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'type'] }],
'import/no-named-as-default': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{
disallowTypeAnnotations: false,
fixStyle: 'separate-type-imports',
},
],
'@typescript-eslint/explicit-member-accessibility': 'warn',
'@typescript-eslint/member-ordering': 'warn',
},
settings: {
'import/resolver': {
typescript: {},
},
},
};