-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
79 lines (79 loc) · 2.02 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
module.exports = {
root: true,
env: {
browser: true,
commonjs: true,
es6: true,
},
extends: [
'airbnb',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
plugins: [
'react',
'react-hooks',
'@typescript-eslint',
'jsx-a11y',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
createClass: 'createReactClass',
pragma: 'React',
version: 'detect',
},
propWrapperFunctions: [
'forbidExtraProps',
{ property: 'freeze', object: 'Object' },
{ property: 'myFavoriteWrapper' },
],
linkComponents: ['Hyperlink', { name: 'Link', linkAttribute: 'to' }],
'import/resolver': {
node: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
},
},
},
rules: {
// react-config -> https://github.com/yannickcr/eslint-plugin-react/
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/no-deprecated': 'error',
'react/display-name': [0],
'react/prop-types': [0],
'react/jsx-one-expression-per-line': [0],
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'jsx-a11y/no-static-element-interactions': [0],
'jsx-a11y/click-events-have-key-events': [0],
'jsx-a11y/interactive-supports-focus': [0],
'@typescript-eslint/no-explicit-any': [0],
'@typescript-eslint/explicit-function-return-type': [0],
'import/prefer-default-export': [0],
strict: 'error',
'no-comma-dangle': [0],
'no-unused-vars': [0, { vars: 'all' }],
'prettier/prettier': [
'error',
{
semi: false,
singleQuote: true,
printWidth: 80,
tabWidth: 2,
},
],
},
}