-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
54 lines (54 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
module.exports = {
env: {
es2020: true
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json'
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
overrides: [
// tasks, manifests and build scripts
{
env: { node: true },
files: ['*.js']
},
// content
{
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-implicit-any': [0],
'@typescript-eslint/no-unused-vars': [1],
'@typescript-eslint/promise-function-async': [0],
'@typescript-eslint/member-delimiter-style': [2],
'@typescript-eslint/consistent-type-definitions': [2, 'interface'],
'@typescript-eslint/no-empty-interface': [1],
'@typescript-eslint/prefer-optional-chain': [2],
'@typescript-eslint/no-inferrable-types': [0],
'@typescript-eslint/array-type': [2, { default: 'array-simple' }],
'@typescript-eslint/prefer-enum-initializers': [2],
'@typescript-eslint/explicit-member-accessibility': [2],
'@typescript-eslint/consistent-type-imports': [2],
'@typescript-eslint/consistent-type-assertions': [
2,
{ assertionStyle: 'as' }
],
'@typescript-eslint/explicit-function-return-type': [
2,
{
allowHigherOrderFunctions: true,
allowExpressions: true
}
]
},
files: ['*.ts']
}
],
ignorePatterns: ['*.js', 'bin/**/*']
};