-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
95 lines (95 loc) · 2.34 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['airbnb', 'plugin:jsx-a11y/recommended', 'prettier'],
plugins: [
'@typescript-eslint',
'jsx-a11y',
'prettier',
'react-hooks',
'react-native',
],
rules: {
semi: 0,
'@typescript-eslint/no-unused-vars': 'off',
'arrow-body-style': ['error', 'as-needed'],
'arrow-parens': ['error', 'always'],
'comma-dangle': 'off',
'global-require': 'off',
'react/jsx-filename-extension': [
1,
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
],
'react/jsx-key': [2, { checkFragmentShorthand: true }],
'react/jsx-fragments': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 1,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/function-component-definition': [
1,
{
namedComponents: [
'function-declaration',
'function-expression',
'arrow-function',
],
unnamedComponents: ['function-expression', 'arrow-function'],
},
],
'import/prefer-default-export': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',
'newline-after-var': ['error', 'always'],
'prettier/prettier': [
'error',
{
singleQuote: true,
printWidth: 80,
bracketSameLine: false,
trailingComma: 'all',
endOfLine: 'lf',
},
],
'eol-last': ['error', 'always'],
'no-unused-vars': 'off',
'no-underscore-dangle': 'off',
'no-nested-ternary': 'warn',
'no-param-reassign': [
2,
{
props: false,
},
],
'no-restricted-exports': 'off',
},
env: {
browser: true,
es6: true,
jest: true,
},
overrides: [
{
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
rules: {
'no-useless-constructor': 'off',
'no-undef': 'off',
'no-shadow': 'off',
'react/prop-types': 'off',
'no-use-before-define': 'off',
'react/react-in-jsx-scope': 'off',
},
},
],
settings: {
'import/resolver': {
node: {
paths: ['src'],
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx', '.js', '.jsx'],
},
'import/extensions': ['.ts', '.tsx', '.js', '.jsx'],
},
};