代码拉取完成,页面将自动刷新
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-recommended"
],
globals: {
NodeJS: "readonly"
},
parser: "vue-eslint-parser",
parserOptions: {
ecmaVersion: "latest",
parser: "@typescript-eslint/parser",
tsconfigRootDir: __dirname,
sourceType: "module",
ecmaFeatures: { jsx: true },
extraFileExtensions: [".vue"]
},
settings: {
"import/resolver": {
alias: [["/@/", "./src/"]]
}
},
plugins: ["@typescript-eslint", "vue"],
rules: {
// 'off'关闭规则 'warn'开启警告规则 'error'2 开启错误规则
"no-var": "error", // 要求使用 let 或 const 而不是 var
"no-empty-function": "error",
"prefer-const": "off",
"no-useless-escape": "off",
"no-console": "off",
"no-unused-vars": "off",
"no-use-before-define": "off", // 禁止在 函数/类/变量 定义之前使用它们
"no-multiple-empty-lines": ["error", { max: 1 }], // 不允许多个空行
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-explicit-any": "off", //any类型
"@typescript-eslint/no-unused-vars": "warn", // 禁止定义未使用的变量
"@typescript-eslint/no-non-null-assertion": "off", // 不允许使用后缀运算符的非空断言(!)
// https://eslint.vuejs.org/
"vue/no-v-html": "off", // 禁止使用 v-html
"vue/attributes-order": "off", // vue api使用顺序,强制执行属性顺序
"vue/multi-word-component-names": "off", //多单词命名
"vue/require-default-prop": "off", // 此规则要求为每个 prop 为必填时,必须提供默认值
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline": "off",
"vue/no-deprecated-v-on-native-modifier": "off",
"vue/no-template-key": "off",
"vue/max-attributes-per-line": [
"warn",
{
singleline: 5,
multiline: 1
}
],
"vue/html-self-closing": [
"error",
{
html: {
void: "always",
normal: "never",
component: "always"
},
svg: "always",
math: "always"
}
]
}
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。