-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
78 lines (78 loc) · 1.85 KB
/
index.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
module.exports = {
env: {
browser: true,
es6: true,
node: true,
amd: true,
},
extends: ['airbnb', 'airbnb-typescript', 'plugin:prettier/recommended'],
parser: '@typescript-eslint/parser',
plugins: [
'unused-imports',
'prettier',
'eslint-plugin-prefer-arrow',
'react-refresh',
],
root: true,
rules: {
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'react-refresh/only-export-components': 'warn',
'prefer-arrow/prefer-arrow-functions': [
'warn',
{
disallowPrototype: true,
singleReturnOnly: false,
classPropertiesAllowed: false,
},
],
'func-style': ['error', 'expression', { allowArrowFunctions: true }],
'unused-imports/no-unused-imports': 'error',
'@typescript-eslint/no-shadow': [
'warn',
{
ignoreTypeValueShadow: true,
ignoreFunctionTypeParameterNameValueShadow: true,
},
],
'react/prefer-stateless-function': 'off',
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'react/react-in-jsx-scope': 'off',
'import/no-extraneous-dependencies': 'off',
'jsx-a11y/media-has-caption': 'off',
'react/require-default-props': 'off',
'guard-for-in': 'off',
'no-restricted-syntax': 'off',
'eol-last': ['error', 'always'],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never",
"": "never"
}
]
},
overrides: [
{
files: ['*.test.tsx'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/unbound-method': 'off',
},
},
],
settings: {
react: {
version: 'detect',
},
},
};