From ddd9b8deb3d8e95caa567d33854e68ab18ce47b0 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 8 Sep 2025 18:09:26 +0800 Subject: [PATCH] =?UTF-8?q?docs(eslint):=20=E6=B7=BB=E5=8A=A0=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E8=AF=B4=E6=98=8E=E8=A7=84=E5=88=99=E6=9D=A5=E6=BA=90?= =?UTF-8?q?=E5=B9=B6=E8=B0=83=E6=95=B4vue=E5=9D=97=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加antfu的eslint规则文档链接作为注释参考 调整vue单文件组件的块顺序规则,将script和template放在一起 --- eslint.config.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index 328c179..4076c1d 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -17,6 +17,7 @@ export default uniHelper({ // 忽略自动生成文件 'src/service/app/**', ], + // https://eslint-config.antfu.me/rules rules: { 'no-useless-return': 'off', 'no-console': 'off', @@ -34,6 +35,10 @@ export default uniHelper({ externalIgnores: ['text'], }, ], + // vue SFC 调换顺序改这里 + 'vue/block-order': ['error', { + order: [['script', 'template'], 'style'], + }], }, formatters: { /**