forked from apades/dmMiniPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
79 lines (78 loc) · 2.2 KB
/
eslint.config.mjs
File metadata and controls
79 lines (78 loc) · 2.2 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
import globals from 'globals'
import tsEslint from 'typescript-eslint'
import prettierConfig from 'eslint-config-prettier'
import prettierRecommendConfig from 'eslint-plugin-prettier/recommended'
import importPlugin from 'eslint-plugin-import'
/**@type {import('eslint').Linter.Config} */
export default tsEslint.config(
tsEslint.configs.recommended,
importPlugin.flatConfigs.recommended,
{
ignores: ['**/dist/*', '**/lib/*', '**/build/*'],
},
{
languageOptions: {
// parser,
globals: {
...globals.node,
...globals.browser,
...globals.commonjs,
...globals.es2025,
},
},
// plugins: {
// tsEslintPlugin,
// },
rules: {
'no-console': 'off',
'prettier/prettier': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'no-plusplus': 'off',
'require-await': 'off',
'no-unused-vars': 'off',
'no-useless-escape': 'off',
'no-proto': 'off',
// 链式判断
'no-unused-expressions': 'off',
'vue/no-v-html': 'off',
camelcase: 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-unused-vars': 0,
'prefer-const': 0,
// 临时的
'@typescript-eslint/no-explicit-any': 0,
'react-hooks/exhaustive-deps': 0,
'@typescript-eslint/no-extra-semi': 0,
'@typescript-eslint/no-empty-function': 0,
'no-var': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-empty-object-type': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/no-require-imports': 0,
'@typescript-eslint/no-this-alias': 0,
'import/named': 0,
'import/order': [
'error',
{
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: '@root/**',
group: 'external',
position: 'after',
},
{
pattern: '@pkgs/**',
group: 'external',
position: 'after',
},
],
},
],
},
},
prettierConfig,
prettierRecommendConfig,
)