-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
71 lines (71 loc) · 1.92 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
module.exports = {
extends: [
'airbnb',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'airbnb-typescript',
'plugin:compat/recommended',
'prettier',
],
plugins: ['sort-imports-es6-autofix', 'mui-unused-classes'],
ignorePatterns: ['.eslintrc.js'],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'react/jsx-indent': ['error', 4],
'react/react-in-jsx-scope': 'off',
'import/prefer-default-export': 'off',
'react/jsx-props-no-spreading': 'off',
'react/require-default-props': 'off',
'react/function-component-definition': [
'error',
{
namedComponents: ['function-expression', 'arrow-function'],
},
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'no-void': ['error', { allowAsStatement: true }],
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/no-explicit-any': 'error',
'sort-imports-es6-autofix/sort-imports-es6': 'error',
'mui-unused-classes/unused-classes': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
},
{
selector: 'function',
format: ['camelCase', 'PascalCase'],
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
],
},
settings: {
'import/resolver': {
typescript: {},
},
},
};