-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
84 lines (84 loc) · 2.86 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
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
plugins: ['import', 'promise', '@typescript-eslint' /* , "sonarjs" */],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:promise/recommended',
// "plugin:sonarjs/recommended",
'plugin:prettier/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
],
env: {
node: true,
},
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. '@typescript-eslint/explicit-function-return-type': 'off',
indent: 'off',
'import/named': 'off',
quotes: [2, 'single', 'avoid-escape'],
'no-console': 'off',
'import/first': 'warn',
'import/namespace': ['error', { allowComputed: true }],
'import/no-duplicates': 'error',
'import/default': 'off',
'import/order': ['warn', { 'newlines-between': 'always-and-inside-groups' }],
'import/no-cycle': 'error',
'import/no-self-import': 'warn',
'import/extensions': ['off', 'never', { ts: 'never' }],
'@typescript-eslint/camelcase': ['off', { ignoreDestructuring: true }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/indent': 'off', // conflicts with prettier
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'no-unused-vars': 'off',
'padded-blocks': ['error', 'never'],
'no-await-in-loop': 'error',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-unused-vars': 'off',
// '@typescript-eslint/no-unused-vars': [2, { args: 'none' }],
},
},
],
/* "sort-imports": [
"error",
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
},
], */
/* "sort-keys": [
"error",
"asc",
{ caseSensitive: true, minKeys: 2, natural: false },
], */
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
'eslint-import-resolver-typescript': true,
},
},
};