-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
75 lines (75 loc) · 2.02 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: { jsx: true },
ecmaVersion: 2020,
project: 'tsconfig.json',
sourceType: 'module'
},
settings: { react: { version: 'detect' }},
plugins: [
'@typescript-eslint/eslint-plugin',
'import'
],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:react/recommended'
],
root: true,
env: {
jest: true,
node: true,
},
overrides: [{
files: ["**/*.tsx"],
rules: {
"react/prop-types": "off"
}
}],
rules: {
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-member-accessibility': [
'warn',
{ overrides: { constructors: 'no-public' } },
],
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/member-ordering': 'warn',
'@typescript-eslint/naming-convention': [
'warn',
{
'selector': 'interface',
'format': ['PascalCase'],
}
],
'@typescript-eslint/no-inferrable-types': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'import/newline-after-import': ['warn'],
'import/no-default-export': ['warn'],
'import/order': [
'warn',
{
groups: ['external', 'builtin'],
'newlines-between': 'never',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'max-len': ['warn', { 'code': 120 }],
'no-duplicate-imports': 'warn',
'no-import-assign': 'warn',
'no-multiple-empty-lines': ['warn', { max: 1 }],
'no-useless-rename': 'warn',
'object-shorthand': 'warn',
'react/react-in-jsx-scope': 'off',
'semi': ['error', 'never'],
},
};