This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.js
63 lines (62 loc) · 1.72 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'react', 'react-hooks', 'jsx-a11y', 'import'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'prettier'
],
rules: {
'no-console': 'warn',
camelcase: 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase']
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE']
},
{
selector: 'parameter',
format: ['camelCase', 'snake_case'],
leadingUnderscore: 'allow'
},
{
selector: 'property',
format: ['camelCase', 'snake_case']
},
{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require'
},
{
selector: 'typeLike',
format: ['PascalCase']
}
],
'react/prop-types': 'off', // @see https://github.com/yannickcr/eslint-plugin-react/issues/2353
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn'
},
settings: {
'import/resolver': { typescript: {} },
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
react: { version: 'detect' }
}
};