-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
86 lines (85 loc) · 2.34 KB
/
Copy patheslint.config.mjs
File metadata and controls
86 lines (85 loc) · 2.34 KB
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
77
78
79
80
81
82
83
84
85
86
import js from '@eslint/js'
import typescript from '@typescript-eslint/eslint-plugin'
import parser from '@typescript-eslint/parser'
import prettier from 'eslint-plugin-prettier'
import importHelpers from 'eslint-plugin-import-helpers'
import unusedImports from 'eslint-plugin-unused-imports'
import perfectionist from 'eslint-plugin-perfectionist'
export default [
{
...js.configs.recommended,
ignores: ['node_modules/**', '.dist/*'],
files: ['**/*.{js,ts,jsx,tsx}'],
languageOptions: {
parser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
}
},
plugins: {
'@typescript-eslint': typescript,
prettier,
'import-helpers': importHelpers,
'unused-imports': unusedImports,
perfectionist
},
rules: {
'no-useless-constructor': 'off',
'no-use-before-define': 'off',
'space-before-function-paren': 'off',
camelcase: 'off',
'prettier/prettier': 'error',
'unused-imports/no-unused-imports': 'error',
'perfectionist/sort-interfaces': 'error',
'perfectionist/sort-jsx-props': [
'error',
{
type: 'natural',
order: 'asc',
groups: ['multiline', 'unknown', 'shorthand']
}
],
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
disallowTypeAnnotations: false
}
],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'none',
argsIgnorePattern: '^_'
}
],
'import-helpers/order-imports': [
'warn',
{
newlinesBetween: 'always',
groups: [
['module', '/^@ant/', '/^@fullstory/'],
'/^@/',
['parent', 'sibling', 'index']
],
alphabetize: { order: 'asc', ignoreCase: true }
}
],
'sort-imports': [
'error',
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'],
allowSeparatedGroups: false
}
]
}
}
]