Commit 0738b8b4 by Jaxon

chorn: lint 微调

1 parent d25e8fb1
import antfu from "@antfu/eslint-config"; import antfu from "@antfu/eslint-config";
export default antfu( export default antfu({
{
markdown: true, markdown: true,
vue: true, vue: true,
css: true, css: true,
...@@ -21,6 +20,7 @@ export default antfu( ...@@ -21,6 +20,7 @@ export default antfu(
"coverage/", "coverage/",
"**/*-min.js", "**/*-min.js",
"**/*.min.js", "**/*.min.js",
], ],
stylistic: { stylistic: {
"indent": "tab", // 4个空格 "indent": "tab", // 4个空格
...@@ -28,9 +28,7 @@ export default antfu( ...@@ -28,9 +28,7 @@ export default antfu(
"semi": true, "semi": true,
"array-bracket-spacing": ["error", "always"], "array-bracket-spacing": ["error", "always"],
}, },
rules: { rules: {
"node/prefer-global/process": "off",
"vue/no-deprecated-v-on-native-modifier": "off", "vue/no-deprecated-v-on-native-modifier": "off",
"vue/no-deprecated-destroyed-lifecycle": "off", "vue/no-deprecated-destroyed-lifecycle": "off",
"vue/no-deprecated-model-definition": "off", "vue/no-deprecated-model-definition": "off",
...@@ -108,7 +106,9 @@ export default antfu( ...@@ -108,7 +106,9 @@ export default antfu(
"SLOT", // v-slot slot "SLOT", // v-slot slot
"TWO_WAY_BINDING", // v-model "TWO_WAY_BINDING", // v-model
"OTHER_DIRECTIVES", // v-custom-directive "OTHER_DIRECTIVES", // v-custom-directive
"OTHER_ATTR", // 自定义属性和其他 "ATTR_STATIC", // 静态属性排最前
"ATTR_SHORTHAND_BOOL", // 布尔简写排中间
"ATTR_DYNAMIC", // 动态绑定排最后
"EVENTS", // @click @focus "EVENTS", // @click @focus
"CONTENT", // v-text v-html "CONTENT", // v-text v-html
], ],
...@@ -165,21 +165,4 @@ export default antfu( ...@@ -165,21 +165,4 @@ export default antfu(
*/ */
html: true, html: true,
}, },
}, });
{
files: [
"vue.config.js",
"*.config.js",
"scripts/**/*.{js,cjs,mjs}",
],
languageOptions: {
globals: {
process: "readonly",
module: "readonly",
require: "readonly",
__dirname: "readonly",
__filename: "readonly",
},
},
},
);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!