import antfu from "@antfu/eslint-config"; export default antfu({ formatters: { html: false, css: true, }, test: false, typescript: false, vue: true, stylistic: { semi: true, quotes: "double", }, overrides: { vue: { "vue/no-template-shadow": "error", "vue/attribute-hyphenation": "error", "vue/html-end-tags": "error", "vue/component-name-in-template-casing": ["error", "kebab-case"], "vue/enforce-style-attribute": [ "error", { allow: ["scoped", "module"] }, ], "vue/v-on-event-hyphenation": [ "error", "always", { autofix: true, }, ], "vue/require-explicit-emits": "error", }, javascript: { "no-console": process.env.NODE_ENV === "production" ? "error" : "warn", "no-debugger": process.env.NODE_ENV === "production" ? "error" : "warn", "no-alert": process.env.NODE_ENV === "production" ? "error" : "warn", "no-restricted-syntax": [ "error", { selector: "VariableDeclarator[id.name='pd']", message: "不允许使用 pd,请改用有语义化的变量名", }, { selector: "ObjectExpression > Property[key.name='pd']", message: "不允许使用 pd,请改用有语义化的变量名", }, ], }, }, rules: { "antfu/top-level-function": "off", "node/prefer-global/process": "off", "linebreak-style": ["off", "windows"], }, });