-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.eslintrc.cjs
55 lines (54 loc) · 1.78 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
module.exports = {
root: true,
env: {
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier', // https://prettier.io/docs/en/install.html#eslint-and-other-linters
],
overrides: [],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
'prefer-template': 'error',
'@typescript-eslint/array-type': ['error', { default: 'generic', readonly: 'generic' }],
'@typescript-eslint/ban-ts-comment': [
'error',
{ 'ts-expect-error': 'allow-with-description', minimumDescriptionLength: 3 },
],
'@typescript-eslint/require-array-sort-compare': ['error', { ignoreStringArrays: true }],
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'import/no-duplicates': 'error',
'import/no-self-import': 'error',
'import/no-cycle': 'error',
'import/no-extraneous-dependencies': 'error',
'import/no-import-module-exports': 'error',
'import/prefer-default-export': 'off',
'import/no-default-export': 'error',
'import/no-unresolved': 'off',
'import/namespace': 'off',
'import/order': [
'error',
{
'newlines-between': 'never',
groups: ['type', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'no-debugger': 'error',
'no-process-env': 'error',
},
};