This repository has been archived by the owner on May 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
89 lines (88 loc) · 2.25 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 10,
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
useJSXTextNode: true,
// project: './tsconfig.json',
tsconfigRootDir: './',
},
extends: [
'airbnb',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'prettier',
'prettier/react',
'prettier/@typescript-eslint',
],
env: {
es6: true,
node: true,
browser: true,
},
plugins: ['@typescript-eslint', 'prettier', 'react', 'react-hooks'],
rules: {
'react/jsx-filename-extension': [
0,
{ extensions: ['.js', '.jsx', '.tsx', '.ts'] },
],
'react/jsx-no-duplicate-props': [
'error',
{
ignoreCase: false,
},
],
'react/jsx-max-depth': [
'error',
{
max: 5,
},
],
'react/boolean-prop-naming': [
'error',
{
rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+',
},
],
'react/prop-types': 0,
'react/jsx-no-bind': 0,
'no-underscore-dangle': 0,
'react/prefer-stateless-function': 'off',
'react/destructuring-assignment': 0,
'react/no-unused-state': 0,
'react/no-access-state-in-setstate': 0,
'react/require-default-props': 0,
'import/no-named-as-default': 0,
'import/no-named-as-default-member': 0,
'no-unused-expressions': 0,
'arrow-body-style': 0,
'react/no-did-update-set-state': 0,
'class-methods-use-this': 0,
'prefer-destructuring': 0,
'no-useless-constructor': 1,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'default-case': 0,
'import/prefer-default-export': 0,
'spaced-comment': 0,
curly: [2, 'multi-line'],
'brace-style': 'error',
'import/order': 0,
'import/first': 0,
'import/no-unresolved': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/prefer-interface': 0,
'@typescript-eslint/indent': 0,
'no-unused-vars': 0,
'no-use-before-define': 0,
'react/forbid-prop-types': 0,
'react/no-unused-prop-types': 0,
'no-console': 0,
'object-shorthand': 0,
'import/no-extraneous-dependencies': 0,
'react/jsx-props-no-spreading': 0,
},
};