/
.eslintrc.js
49 lines (48 loc) · 1.37 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
/* eslint-env node */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
env: {
es2021: true,
},
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
overrides: [
{
files: ['**/*.ts'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/strict',
],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
rules: {
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
'no-throw-literal': 'off',
'@typescript-eslint/no-throw-literal': 'warn',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
'@typescript-eslint/prefer-for-of': 'warn',
'no-constant-condition': 'off',
'@typescript-eslint/no-unnecessary-condition': [
'warn',
{
allowConstantLoopConditions: true,
},
],
},
},
],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
};