mirror of
https://gitee.com/layui/layui.git
synced 2025-11-24 08:33:12 +08:00
build: 优化 eslint 对于 no-empty 的宽松提醒 (#2919)
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
### 说明
|
||||
|
||||
- 版本: 在此处填写您所使用的 Layui 版本号(必填)
|
||||
- 描述: 在此处填写详细的问题描述和具体的操作步骤(必填)
|
||||
|
||||
### 代码
|
||||
|
||||
在此处填写与本次 Issue 相关的业务代码(可选)
|
||||
|
||||
### 补充
|
||||
|
||||
在此处提供其他补充,如截图等信息(可选)
|
||||
@@ -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 开发文档,以便对其有更深入的了解,和更好地分析问题。
|
||||
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user