-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.js
68 lines (67 loc) · 2.38 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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path')
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.resolve(__dirname, './tsconfig.json'),
sourceType: 'module',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:prettier/recommended',
],
rules: {
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/member-ordering': 'error',
'@typescript-eslint/no-empty-function': ['error', { allow: ['constructors'] }],
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unused-vars': ['error', { args: 'all', argsIgnorePattern: '^_' }],
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/unified-signatures': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'constructor-super': 'error',
'curly': 'error',
'default-case': 'off',
'dot-notation': 'error',
'guard-for-in': 'error',
'max-classes-per-file': ['error', 1],
'no-bitwise': 'error',
'no-caller': 'error',
'no-console': 'error',
'no-empty-function': 'off',
'no-eval': 'error',
'no-fallthrough': 'off',
'no-new-wrappers': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'object-shorthand': 'error',
'radix': 'error',
'sort-imports': 'error',
'import/no-unresolved': 'off',
'import/no-default-export': 'error',
},
}