-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
55 lines (55 loc) · 1.63 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 = {
parser: '@typescript-eslint/parser',
extends: [
'taro/react',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'prettier/@typescript-eslint',
'prettier/react',
],
plugins: ['react-hooks'],
settings: {
react: {
version: 'detect',
},
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
jsx: true,
useJSXTextNode: true,
},
rules: {
'no-unused-vars': ['error', { varsIgnorePattern: 'React' }],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.tsx'] }],
complexity: ['warn', { max: 6 }],
'no-useless-constructor': 'off',
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: 'React' }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-var-requires': 'warn',
'react/prop-types': 'off',
'react/display-name': 'off',
'react/no-deprecated': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'import/prefer-default-export': 'off',
'import/no-commonjs': 'off',
'react/no-multi-comp': 'off',
'react/jsx-uses-react': 'error',
'@typescript-eslint/ban-types': 'off',
},
overrides: [
{
files: '*.d.ts',
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
],
};