forked from quarx-ui/quarx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
95 lines (94 loc) · 2.7 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
88
89
90
91
92
93
94
95
const indent = [2, 4];
module.exports = {
globals: {
JSX: 'readonly',
},
env: {
browser: true,
es2021: true,
jest: true,
},
extends: [
'plugin:jest/recommended',
'plugin:react/recommended',
'plugin:json/recommended',
'plugin:@typescript-eslint/recommended',
'airbnb',
'airbnb/rules/react',
'airbnb/rules/react-hooks',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
project: './tsconfig.json',
ecmaVersion: 12,
sourceType: 'module',
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './tsconfig.json',
},
node: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
},
},
plugins: [
'react',
'@typescript-eslint',
],
rules: {
'no-shadow': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-shadow': ['error'],
'import/extensions': ['error', 'never', { svg: 'always', json: 'always' }],
'import/no-extraneous-dependencies': 0,
'import/prefer-default-export': 0,
'react/jsx-filename-extension': [2, { extensions: ['.tsx'] }],
'object-curly-newline': 0,
'max-len': [
1,
{
code: 120,
tabWidth: 4,
ignoreUrls: true,
ignoreComments: true,
ignorePattern: 'd="(.)*$',
},
],
indent: 'off',
'react/jsx-indent': indent,
'react/jsx-indent-props': indent,
curly: ['error', 'all'],
'@typescript-eslint/indent': indent,
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '_',
},
],
'jsx-a11y/label-has-associated-control': [0, {
labelComponents: ['CustomInputLabel'],
labelAttributes: ['label'],
controlComponents: ['CustomInput'],
depth: 3,
}],
'jsx-a11y/no-static-element-interactions': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/no-noninteractive-element-interactions': 0,
'react/jsx-props-no-spreading': 0,
'no-use-before-define': 'off',
'react/prop-types': 0,
'@typescript-eslint/consistent-type-exports': 2,
'jest/valid-title': ['warn', { ignoreTypeOfDescribeName: true }],
'jest/no-done-callback': ['warn'],
'jest/no-export': 0,
},
};