You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
/* eslint-env node */
|
|
|
|
|
require('@rushstack/eslint-patch/modern-module-resolution')
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
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',
|
|
|
|
|
// 新增:强制使用 Unix 风格的换行符 (LF)
|
|
|
|
|
'linebreak-style': ['error', 'unix', 'windows'],
|
|
|
|
|
|
|
|
|
|
// 新增:忽略 Prettier 与 ESLint 可能存在的格式冲突
|
|
|
|
|
'prettier/prettier': [
|
|
|
|
|
'error',
|
|
|
|
|
{
|
|
|
|
|
endOfLine: 'lf', // 确保 Prettier 使用 LF 换行符
|
|
|
|
|
semi: false, // 根据你的代码风格调整
|
|
|
|
|
singleQuote: true // 根据你的代码风格调整
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
// 新增:环境配置,根据你的项目调整
|
|
|
|
|
env: {
|
|
|
|
|
browser: true,
|
|
|
|
|
node: true,
|
|
|
|
|
es6: true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 新增:如果使用 TypeScript,确保正确解析类型
|
|
|
|
|
parserOptions: {
|
|
|
|
|
ecmaVersion: 'latest',
|
|
|
|
|
sourceType: 'module'
|
|
|
|
|
}
|
|
|
|
|
}
|