web-base-admin-h5/.eslintrc.js

27 lines
936 B
JavaScript

module.exports = {
root: true,
env: {
node: true,
'vue/setup-compiler-macros': true, // 针对 <script setup>
},
extends: [
'plugin:vue/essential',
'eslint:recommended',
'@vue/eslint-config-standard',
'plugin:prettier/recommended', // 确保这个是最后一个,以便它可以覆盖其他配置
],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/multi-word-component-names': 'off', // uniapp 页面组件名通常是单个词
// 您可以在这里添加或覆盖其他规则
// 例如,强制使用单引号
// 'quotes': ['error', 'single'],
// Prettier 相关的规则通常由 plugin:prettier/recommended 自动处理
// 如果需要覆盖 Prettier 自身的规则,请在 .prettierrc.js 中配置
},
};