-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.js
43 lines (42 loc) · 1.1 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
/**
* @author GuangHui
* @description eslint配置,继承@antfu/eslint-config
*/
module.exports = {
root: true,
extends: '@antfu',
plugins: ['import'],
rules: {
'no-console': 'off',
/* eslint-plugin-import */
'import/order': [
'warn',
{
'groups': [
'type', /* ts、flow专有,import type {} from 'xxx' */
'builtin', /* node内置 */
'external', /* 外部npm模块 */
'internal', /* 内部模块,一般为webpack alias目录模块 */
'parent', /* 父级目录 ../ */
'sibling', /* 相邻陌路 ./ */
'index', /* index导入 */
'object', /* ts专有,import log = console.log */
],
'pathGroups': [
/* @/归为internal组 */
{
pattern: '@/**',
group: 'internal',
},
],
'newlines-between': 'always', /* 组间强制空行 */
/* 组内字母排序规则 */
'alphabetize': {
order: 'asc',
caseInsensitive: true,
},
},
],
'react/display-name': 'off',
},
}