-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.cjs
71 lines (71 loc) · 1.97 KB
/
.eslintrc.cjs
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
69
70
71
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
project: './tsconfig.json'
},
env: {
browser: true,
amd: true,
node: true
},
plugins: ['simple-import-sort', 'unused-imports'],
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended'
],
rules: {
'import/named': 'off',
'no-unused-vars': 'off',
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true
}
],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-explicit-any': [
'warn',
{
/** Whether to enable auto-fixing in which the `any` type is converted to the `unknown` type. */
fixToUnknown: false,
/** Whether to ignore rest parameter arrays. */
ignoreRestArgs: false
}
],
'prefer-const': [
'warn',
{
destructuring: 'all',
ignoreReadBeforeAssign: false
}
],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/no-shadow': ['error'],
'unused-imports/no-unused-imports': 'error',
'no-return-await': 'off',
'@typescript-eslint/return-await': 'error'
},
settings: {
'import/resolver': {
node: {
extensions: ['.ts', '.js', '.json'],
moduleDirectory: ['node_modules', 'src/', 'sdk', 'generated/', 'typechain/', 'router/']
}
}
}
}