generated from rolling-scopes-school/nodejs-course-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
91 lines (91 loc) · 2.21 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['tsconfig.json'],
tsconfigRootDir: __dirname,
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['import', 'prettier', '@typescript-eslint'],
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:node/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: [
'.eslintrc.cjs',
'prettier.config.js',
'node_modules',
'environment.d.ts',
'test',
],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/naming-convention': 'off',
'no-underscore-dangle': 'off',
'no-void': 'off',
'class-methods-use-this': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'import/extensions': ['error', 'never'],
'no-process-exit': 'off',
'no-restricted-syntax': 'off',
'node/no-unpublished-import': 'off',
'node/no-missing-import': 'off',
'node/no-extraneous-import': 'off',
'node/no-unsupported-features/es-syntax': [
'error',
{
ignores: ['modules'],
},
],
'sort-imports': [
'error',
{ ignoreCase: true, ignoreDeclarationSort: true },
],
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
['sibling', 'parent'],
'index',
],
pathGroups: [
{
pattern: 'node',
group: 'external',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['internal'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};