generated from ita-social-projects/DevTemplate
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.js
63 lines (63 loc) · 1.64 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
module.exports = {
env: {
browser: true,
es2021: true,
jest: true,
},
parserOptions: {
project: './tsconfig.eslint.json',
},
settings: {
'import/resolver': {
typescript: {}, // this loads <rootdir>/tsconfig.json to eslint
},
},
plugins: ['@typescript-eslint', 'import', 'jsx-a11y', 'react', 'react-hooks'],
extends: [
'eslint:recommended',
'airbnb-typescript',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
/* Disable any eslint formatting rules to avoid conflicts */
'prettier',
'prettier/@typescript-eslint',
'prettier/react',
],
rules: {
'react/jsx-no-duplicate-props': [2, { "ignoreCase": false }],
'react-hooks/exhaustive-deps': 'off',
'@typescript-eslint/no-empty-interface': [
'warn',
{
allowSingleExtends: true,
},
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true,
},
},
{
selector: 'typeAlias',
format: ['PascalCase'],
suffix: ['Type'],
},
],
semi: ['error', 'always'],
'eol-last': ['error', 'always'],
'react/prop-types': 'off',
'import/prefer-default-export': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-floating-promises': ['off'],
'react/require-default-props': 'off',
},
};