-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
77 lines (77 loc) · 2.16 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
69
70
71
72
73
74
75
76
77
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module' // Allows for the use of imports
},
env: {
es6: true,
jest: true,
node: true,
mocha: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
// Note: Please keep this as the last config to make sure that this (and by extension our .prettierrc file) overrides all configuration above it
// https://www.npmjs.com/package/eslint-plugin-prettier#recommended-configuration
'plugin:prettier/recommended'
],
plugins: ['import', 'unused-imports', 'prettier'],
rules: {
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/consistent-indexed-object-style': 1,
'@typescript-eslint/consistent-type-assertions': 0,
'@typescript-eslint/consistent-type-definitions': 0,
'@typescript-eslint/consistent-type-imports': 1,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'import/no-webpack-loader-syntax': 0,
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
'object'
],
alphabetize: {
order: 'asc'
}
}
],
'unused-imports/no-unused-imports': 'warn'
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
node: {
extensions: ['.js', '.ts']
},
typescript: {
alwaysTryTypes: true
}
}
},
overrides: [
{
files: ['*.js'],
rules: {
'import/no-commonjs': 0
}
}
]
}