From f48e8870e36e99295402af645aee3be6a26135dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Fri, 7 Nov 2025 11:49:21 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E4=BC=98=E5=8C=96=20eslint=20?= =?UTF-8?q?=E5=AF=B9=E4=BA=8E=20no-empty=20=E7=9A=84=E5=AE=BD=E6=9D=BE?= =?UTF-8?q?=E6=8F=90=E9=86=92=20(#2919)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitee/ISSUE_TEMPLATE.zh-CN.md | 12 ------------ .gitee/ISSUE_TEMPLATE/config.yml | 8 -------- eslint.config.mjs | 9 +++++++-- 3 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 .gitee/ISSUE_TEMPLATE.zh-CN.md delete mode 100644 .gitee/ISSUE_TEMPLATE/config.yml diff --git a/.gitee/ISSUE_TEMPLATE.zh-CN.md b/.gitee/ISSUE_TEMPLATE.zh-CN.md deleted file mode 100644 index afa7016e..00000000 --- a/.gitee/ISSUE_TEMPLATE.zh-CN.md +++ /dev/null @@ -1,12 +0,0 @@ -### 说明 - -- 版本: 在此处填写您所使用的 Layui 版本号(必填) -- 描述: 在此处填写详细的问题描述和具体的操作步骤(必填) - -### 代码 - -在此处填写与本次 Issue 相关的业务代码(可选) - -### 补充 - -在此处提供其他补充,如截图等信息(可选) diff --git a/.gitee/ISSUE_TEMPLATE/config.yml b/.gitee/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 65ab8e19..00000000 --- a/.gitee/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: 😄 创建议题 - url: https://github.com/layui/layui/issues/new?template=bug-feature.yml - about: 为了加强 Issue 规范、提升沟通效率,Layui Issues 已统一在 Github 受理 - - name: 📄 官方文档 - url: https://layui.dev/ - about: 建议在创建 Issue 之前,仔细查阅 Layui 开发文档,以便对其有更深入的了解,和更好地分析问题。 diff --git a/eslint.config.mjs b/eslint.config.mjs index dd04949c..1e1f67d5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -13,7 +13,9 @@ export default defineConfig([ // Browser { files: ['src/**/*.js'], - plugins: { js }, + plugins: { + js, + }, extends: ['js/recommended'], languageOptions: { ecmaVersion: 'latest', @@ -22,9 +24,12 @@ export default defineConfig([ }, rules: { 'no-console': ['error', { allow: ['warn', 'error'] }], // 仅允许 warn 和 error - 'no-unused-vars': 'warn', // 因 v2 这类代码较多,此处只做提醒 + // 有时未完成代码,只做提醒 + 'no-unused-vars': 'warn', // 未使用变量/函数/参数 + 'no-empty': 'warn', // 空代码块 }, }, + // Node { files: [