wendang/demo1/.eslintrc.cjs

63 lines
1.8 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
"plugin:vue/vue3-essential",
"standard",
"@vue/prettier",
"eslint:recommended",
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["vue"],
rules: {
"no-console": "warn",
"vue/multi-word-component-names": "off",
"vue/no-v-html": "off",
"vue/require-default-prop": "off",
"camelcase": "off",
"eqeqeq": "error",
"vue/no-template-shadow": "error",
"vue/attribute-hyphenation": "error",
"vue/html-end-tags": "error",
"vue/eqeqeq": "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",
"no-restricted-syntax": [
"error",
{
"selector": "VariableDeclarator[id.name='pd']",
"message": "不允许使用 pd请改用有语义化的变量名"
},
{
"selector": "ObjectExpression > Property[key.name='pd']",
"message": "不允许使用 pd请改用有语义化的变量名"
},
],
"no-unused-vars": [
"error",
{ vars: "all", args: "after-used", ignoreRestSiblings: false }
],
"linebreak-style": ["off",'windows'],
"no-restricted-properties": [
"error",
{ "object": "Object", "property": "assign"}
],
},
globals: {
defineOptions: "readonly",
},
};