forked from ChatLab/ChatLab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
32 lines (29 loc) · 899 Bytes
/
Copy patheslint.config.js
File metadata and controls
32 lines (29 loc) · 899 Bytes
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
// 使用现代模块解析,避免插件解析失败
require('@rushstack/eslint-patch/modern-module-resolution')
const { FlatCompat } = require('@eslint/eslintrc')
// 使用 FlatCompat 兼容旧版 extends 配置
const compat = new FlatCompat({
baseDirectory: __dirname,
})
module.exports = [
// 迁移 .eslintignore 到 flat config 的 ignores
{
ignores: ['node_modules', 'dist', 'out', '.gitignore'],
},
...compat.extends(
'eslint:recommended',
'plugin:vue/vue3-recommended',
'@electron-toolkit',
'@electron-toolkit/eslint-config-ts/eslint-recommended',
'@vue/eslint-config-typescript/recommended',
'@vue/eslint-config-prettier'
),
{
rules: {
'vue/require-default-prop': 'off',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
},
]