Grade_Inquiry/.eslintrc.cjs
2026-01-26 16:43:55 +08:00

33 lines
860 B
JavaScript

/* eslint-env node */
/**
* ESLint 配置文件
* 用于代码质量检查和风格规范
*/
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-recommended',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
},
rules: {
// Vue 相关规则
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off',
// TypeScript 相关规则
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
// 通用规则
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
}
}