63 lines
1.8 KiB
JavaScript
63 lines
1.8 KiB
JavaScript
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",
|
||
},
|
||
};
|