-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
76 lines (72 loc) · 1.85 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
module.exports = {
extends: [
'@ecomfe/eslint-config/strict',
'@ecomfe/eslint-config/typescript/strict',
'@ecomfe/eslint-config/import/strict',
'@ecomfe/eslint-config/react/strict',
],
parserOptions: {
babelOptions: {
plugins: [
'@babel/plugin-syntax-import-assertions',
],
},
},
rules: {
'@typescript-eslint/no-floating-promises': 'off',
'consistent-return': 'off',
'react/jsx-no-bind': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-named-as-default': 'off',
'no-param-reassign': 'off',
'import/extensions': [
'error',
'never',
{
scss: 'always',
css: 'always',
json: 'always',
png: 'always',
mjs: 'always',
},
],
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
'object',
'type',
],
},
],
},
// 针对配置类型文件禁用
overrides: [
{
files: ['*.cjs', '*.js', '*.d.ts'],
rules: {
'import/unambiguous': 'off',
'import/no-commonjs': 'off',
},
},
],
ignorePatterns: [
'node_modules',
'**/lib/**/*.ts',
'**/lib/**/*.tsx',
'**/es/**/*.ts',
'**/es/**/*.tsx',
'**/lib/**/*.js',
'**/es/**/*.js',
'**/dist/**/*.js',
'*.json',
'demos/**/*.*',
],
};