-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.cjs
78 lines (78 loc) · 2.21 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
72
73
74
75
76
77
78
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
plugins: ['@typescript-eslint', 'unicorn', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:node/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:prettier/recommended',
],
env: {
es6: true,
node: true,
},
rules: {
semi: 'off',
quotes: 'off',
'no-unused-vars': 'off',
'no-case-declarations': 'off',
'no-useless-escape': 'off',
'no-invalid-void-type': 'off',
'no-tabs': 'error',
'no-trailing-spaces': 'error',
'no-console': 'error',
'eol-last': ['error', 'always'],
'linebreak-style': ['error', 'unix'],
'unicode-bom': 'error',
'node/no-unsupported-features/es-syntax': 'off',
'node/no-missing-import': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/semi': ['error'],
'@typescript-eslint/quotes': [
'error',
'single',
{ allowTemplateLiterals: true },
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'class',
format: ['PascalCase'],
leadingUnderscore: 'forbid',
trailingUnderscore: 'forbid',
},
{
selector: ['variable', 'function'],
format: ['camelCase', 'UPPER_CASE'],
},
],
'import/named': 'error',
'import/first': 'error',
'import/order': 'error',
'import/no-default-export': 'error',
'import/exports-last': 'error',
'import/no-deprecated': 'error',
'import/no-unresolved': 'off',
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
},
};