-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
51 lines (49 loc) · 1.26 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
/**
* @type {import('@typescript-eslint/utils').TSESLint.Linter.Config}
*/
const config = {
root: true,
env: {
node: true,
},
extends: ['standard-with-typescript', 'prettier'],
parser: '@typescript-eslint/parser',
ignorePatterns: ['node_modules/', 'dist/', 'coverage/'],
parserOptions: {
// sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'], // could be tsconfig.json too
},
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/restrict-template-expressions': [
'warn',
{
allowAny: true,
allowNumber: true,
allowBoolean: true,
allowNullish: true,
allowRegExp: true,
},
],
'@typescript-eslint/no-floating-promises': [
'error',
{
ignoreVoid: true,
ignoreIIFE: true,
},
],
'@typescript-eslint/no-misused-promises': [
'error',
{
checksConditionals: true,
checksVoidReturn: true,
},
],
},
};
module.exports = config;