-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
67 lines (66 loc) · 1.93 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
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
'plugin:node/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:eslint-comments/recommended',
"plugin:@typescript-eslint/recommended",
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'airbnb-base',
'airbnb-typescript/base',
'plugin:unicorn/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
},
plugins: [
'@typescript-eslint',
'simple-import-sort',
],
rules: {
'import/extensions': ['error', 'ignorePackages'],
// Completly broken with ESM and TypeScript at the moment.
// See https://github.com/import-js/eslint-plugin-import/issues/2170
'import/no-unresolved': 'off',
'node/no-missing-import': 'off',
'import/first': 'warn',
'import/newline-after-import': 'warn',
'import/no-duplicates': 'warn',
'simple-import-sort/imports': ['warn', {
groups: [
['^\\u0000'],
['^@?\\w', '^@?\\w.*\\u0000$'],
['(?<!\\u0000)$', '(?<=\\u0000)$'],
['^\\.', '^\\..*\\u0000$'],
],
}],
'simple-import-sort/exports': 'warn',
'@typescript-eslint/explicit-function-return-type': 'error',
'no-return-await': 'off',
'@typescript-eslint/return-await': 'off',
'max-len': ['warn', {
code: 100,
tabWidth: 2,
ignorePattern: "\/\/ eslint-disable-next-line",
}],
'indent': 'off',
'function-paren-newline': 'off',
'@typescript-eslint/consistent-type-imports': ['warn', {
prefer: 'type-imports',
}],
'unicorn/no-useless-undefined': 'off',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': [
'.ts',
],
},
}
};