-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
87 lines (87 loc) · 2.15 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'airbnb-base',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:security/recommended',
],
globals: {
fetch: false,
},
parserOptions: {
ecmaVersion: 2019, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
env: {
browser: true,
node: true,
jest: true,
},
plugins: ['import', 'security'],
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
useTabs: false,
printWidth: 80,
},
],
'no-implied-eval': 2,
'import/prefer-default-export': 0,
'prefer-destructuring': 0,
'import/order': [
'error',
{
groups: [
'builtin',
'external',
['internal', 'unknown'],
'parent',
'sibling',
'index',
],
},
],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
'no-console': ['error', { allow: ['error', 'info'] }],
quotes: ['error', 'single'],
'function-paren-newline': 2,
'consistent-return': 0,
'@typescript-eslint/indent': 0, // Conflicts with Prettier
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'no-case-declarations': 0,
'no-extra-boolean-cast': 0,
'no-async-promise-executor': 0,
'max-classes-per-file': ['error', 2],
'class-methods-use-this': 0,
'security/detect-child-process': 0,
'security/detect-object-injection': 0,
'security/detect-non-literal-regexp': 0,
'security/detect-non-literal-fs-filename': 0,
'import/no-extraneous-dependencies': 0,
},
settings: {
'import/resolver': {
alias: {
map: [['@', './lib']],
extensions: ['.ts', '.js'],
},
},
},
};