-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
114 lines (114 loc) · 2.96 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
module.exports = {
extends: [
'airbnb',
'prettier',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
],
env: {
browser: true,
node: true,
jest: true,
es6: true,
},
plugins: ['@typescript-eslint', 'prettier', 'react', 'react-hooks'],
parserOptions: {
project: ['tsconfig.eslint.json'],
tsconfigRootDir: __dirname,
},
rules: {
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-ts-comment': [
'error',
{ 'ts-ignore': 'allow-with-description' },
],
'prettier/prettier': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'consistent-return': 0,
'padded-blocks': 0,
'spaced-comment': 0,
semi: ['error', 'always'],
quotes: [
'error',
'single',
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
'arrow-body-style': [0],
'class-methods-use-this': 0,
'comma-dangle': [
'error',
{
arrays: 'only-multiline',
objects: 'only-multiline',
imports: 'only-multiline',
exports: 'only-multiline',
functions: 'ignore',
},
],
'function-paren-newline': 0,
'import/extensions': 0,
'import/imports-first': 0,
'import/newline-after-import': 0,
'import/no-dynamic-require': 0,
'import/no-extraneous-dependencies': 0,
'import/no-named-as-default': 0,
'import/no-unresolved': 2,
'import/no-webpack-loader-syntax': 0,
'import/prefer-default-export': 0,
'jsx-a11y/mouse-events-have-key-events': 0,
'lines-between-class-members': 0,
'newline-per-chained-call': 0,
'no-confusing-arrow': 0,
'no-console': 1,
'no-underscore-dangle': 0,
'no-use-before-define': 0,
'no-param-reassign': 1,
'no-plusplus': 0,
'no-prototype-builtins': 0,
'no-shadow': 1,
'object-curly-newline': 0,
'one-var': 0,
'one-var-declaration-per-line': [2, 'initializations'],
'prefer-destructuring': 1,
'prefer-template': 2,
'react/destructuring-assignment': 1,
'react/forbid-prop-types': [1, { forbid: ['any', 'array'] }],
'react/function-component-definition': 0,
'react/jsx-curly-brace-presence': 0,
'react/jsx-filename-extension': [
1,
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
],
'react/jsx-props-no-spreading': 0,
'react/no-children-prop': 1,
'react/no-did-update-set-state': 0,
'react/require-default-props': 0,
'react/sort-comp': [
1,
{
order: [
'static-methods',
'instance-variables',
'lifecycle',
'render',
'/^render.+$/',
'/^on.+$/',
'/^handle.+$/',
'everything-else',
],
},
],
},
settings: {
'import/resolver': {
typescript: {},
},
},
};