-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
55 lines (55 loc) · 1.39 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
module.exports = {
root: true,
env: {
browser: true,
commonjs: true,
es6: true
},
extends: ['plugin:react/recommended', 'prettier/@typescript-eslint'],
plugins: ['@typescript-eslint', 'prettier', 'react', 'react-hooks'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true
}
},
settings: {
react: {
createClass: 'createReactClass',
pragma: 'React', // Pragma to use, default to "React"
version: '16.8'
},
propWrapperFunctions: [
'forbidExtraProps',
{ property: 'freeze', object: 'Object' },
{ property: 'myFavoriteWrapper' }
],
linkComponents: ['Hyperlink', { name: 'Link', linkAttribute: 'to' }]
},
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-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
strict: 'error',
'check-constructor': false,
'no-comma-dangle': false,
'no-empty-interface': false,
'no-unused-vars': [0],
'prettier/prettier': [
'error',
{
semi: false,
singleQuote: true,
printWidth: 80,
tabWidth: 2
}
]
}
}