-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
86 lines (86 loc) · 2.06 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
module.exports = {
env: {
es6: true,
browser: true,
node: true,
jquery: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
// "ecmaVersion": 2020,
sourceType: 'module',
project: './tsconfig.json',
},
extends: [
'airbnb',
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'jest'],
ignorePatterns: ['__tests__'],
rules: {
'func-names': 0,
'import/extensions': 0,
// "import/extensions": ["error", "always", {
// "js": "never",
// "jsx": "never",
// "ts": "never",
// "tsx": "never"
// }],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
optionalDependencies: false,
},
],
'import/prefer-default-export': 'off',
'import/no-default-export': 'error',
'no-alert': 0,
'no-console': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/interface-name-prefix': 0,
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'parameter',
format: ['camelCase'],
leadingUnderscore: 'allow',
},
{
selector: 'class',
format: ['PascalCase'],
},
{
selector: 'interface',
format: ['PascalCase'],
// custom: {
// regex: "^I[A-Z]",
// match: false
// }
},
{
selector: 'enum',
format: ['PascalCase'],
},
],
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'prettier/prettier': 'error',
'tsdoc/syntax': 'warn',
},
settings: {
react: {
version: 'detect',
},
'import/extensions': ['.js', '.jsx', '.json', '.ts', '.tsx'],
// "import/resolver": {
// "webpack": {
// "config": "webpack.config.js"
// }
// }
},
};