forked from XiaoMi/hiui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
44 lines (43 loc) · 1.01 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
// MIFE dotfiles
module.exports = {
parser: '@typescript-eslint/parser',
root: true,
env: {
browser: true,
es2021: true,
'jest/globals': true,
},
extends: ['plugin:react/recommended', 'standard', 'prettier', 'prettier/@typescript-eslint'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'react', 'react-hooks', 'prettier', 'jest'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: false,
printWidth: 100,
trailingComma: 'es5',
},
],
'no-use-before-define': 0,
'@typescript-eslint/no-use-before-define': 0,
'react/prop-types': 0,
'react/no-children-prop': 0,
'react-hooks/rules-of-hooks': 2, // check Hook rules
'react-hooks/exhaustive-deps': 1, // check effect deps
'no-case-declarations': 0,
},
ignorePatterns: ['*.d.ts', 'lib'],
}