@lntvow/eslint-config 9.3.13 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -362,6 +362,7 @@ async function javascript(options = {}) {
362
362
  rules: {
363
363
  // Update to eslint-plugin-vue v9.3.0
364
364
  ...import_js.default.configs.all.rules,
365
+ // Possible Problems
365
366
  // 禁止未使用过的变量
366
367
  "no-unused-vars": "warn",
367
368
  // 禁止定义前使用
@@ -370,6 +371,7 @@ async function javascript(options = {}) {
370
371
  "no-useless-assignment": "off",
371
372
  // 禁止使用 await 或 yield 导致竞争条件的分配
372
373
  "require-atomic-updates": "off",
374
+ // Suggestions
373
375
  // 强制使用骆驼拼写法命名约定
374
376
  "camelcase": "warn",
375
377
  // 强制注释首字母大写或小写
@@ -378,6 +380,8 @@ async function javascript(options = {}) {
378
380
  "class-methods-use-this": "off",
379
381
  // 指定程序中允许的最大环路复杂度
380
382
  "complexity": "off",
383
+ // 强制函数要么都有返回值或者没有返回值
384
+ "consistent-return": "off",
381
385
  // 强制保证多行所有的花括号,
382
386
  "curly": ["error", "multi-line"],
383
387
  // 要求使用命名的 function 表达式 便于调试
@@ -425,7 +429,7 @@ async function javascript(options = {}) {
425
429
  // 禁止在全局范围内使用变量声明和 function 声明
426
430
  "no-implicit-globals": "off",
427
431
  // 禁用魔术数字
428
- "no-magic-numbers": 0,
432
+ "no-magic-numbers": "off",
429
433
  // 禁用嵌套的三元表达式
430
434
  "no-nested-ternary": "off",
431
435
  // 禁止空 new 以避免产生副作用
@@ -473,6 +477,8 @@ async function javascript(options = {}) {
473
477
  "no-warning-comments": "off",
474
478
  // 强制函数中的变量在一起声明
475
479
  "one-var": "off",
480
+ // 优先使用数组和对象解构
481
+ "prefer-destructuring": "off",
476
482
  // 禁止使用 Math.pow 幂运算符
477
483
  "prefer-exponentiation-operator": "off",
478
484
  // 要求使用 Error 对象作为 Promise 拒绝的原因
@@ -874,7 +880,7 @@ async function vue(options = {}) {
874
880
  // 要求emit事件校验
875
881
  "vue/require-emit-validator": "off",
876
882
  // 要求明确的插槽
877
- "vue/require-explicit-slots": "error",
883
+ "vue/require-explicit-slots": "off",
878
884
  // 强制expose
879
885
  "vue/require-expose": "error",
880
886
  // 宏定义变量名强制
package/dist/index.mjs CHANGED
@@ -281,6 +281,7 @@ async function javascript(options = {}) {
281
281
  rules: {
282
282
  // Update to eslint-plugin-vue v9.3.0
283
283
  ...js.configs.all.rules,
284
+ // Possible Problems
284
285
  // 禁止未使用过的变量
285
286
  "no-unused-vars": "warn",
286
287
  // 禁止定义前使用
@@ -289,6 +290,7 @@ async function javascript(options = {}) {
289
290
  "no-useless-assignment": "off",
290
291
  // 禁止使用 await 或 yield 导致竞争条件的分配
291
292
  "require-atomic-updates": "off",
293
+ // Suggestions
292
294
  // 强制使用骆驼拼写法命名约定
293
295
  "camelcase": "warn",
294
296
  // 强制注释首字母大写或小写
@@ -297,6 +299,8 @@ async function javascript(options = {}) {
297
299
  "class-methods-use-this": "off",
298
300
  // 指定程序中允许的最大环路复杂度
299
301
  "complexity": "off",
302
+ // 强制函数要么都有返回值或者没有返回值
303
+ "consistent-return": "off",
300
304
  // 强制保证多行所有的花括号,
301
305
  "curly": ["error", "multi-line"],
302
306
  // 要求使用命名的 function 表达式 便于调试
@@ -344,7 +348,7 @@ async function javascript(options = {}) {
344
348
  // 禁止在全局范围内使用变量声明和 function 声明
345
349
  "no-implicit-globals": "off",
346
350
  // 禁用魔术数字
347
- "no-magic-numbers": 0,
351
+ "no-magic-numbers": "off",
348
352
  // 禁用嵌套的三元表达式
349
353
  "no-nested-ternary": "off",
350
354
  // 禁止空 new 以避免产生副作用
@@ -392,6 +396,8 @@ async function javascript(options = {}) {
392
396
  "no-warning-comments": "off",
393
397
  // 强制函数中的变量在一起声明
394
398
  "one-var": "off",
399
+ // 优先使用数组和对象解构
400
+ "prefer-destructuring": "off",
395
401
  // 禁止使用 Math.pow 幂运算符
396
402
  "prefer-exponentiation-operator": "off",
397
403
  // 要求使用 Error 对象作为 Promise 拒绝的原因
@@ -793,7 +799,7 @@ async function vue(options = {}) {
793
799
  // 要求emit事件校验
794
800
  "vue/require-emit-validator": "off",
795
801
  // 要求明确的插槽
796
- "vue/require-explicit-slots": "error",
802
+ "vue/require-explicit-slots": "off",
797
803
  // 强制expose
798
804
  "vue/require-expose": "error",
799
805
  // 宏定义变量名强制
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/eslint-config",
3
- "version": "9.3.13",
3
+ "version": "9.4.0",
4
4
  "author": "lntvow",
5
5
  "description": "eslint-config",
6
6
  "type": "module",
@@ -54,7 +54,7 @@
54
54
  "tslib": "^2.6.2",
55
55
  "typescript": "^5.4.5",
56
56
  "vue-eslint-parser": "^9.4.2",
57
- "@lntvow/eslint-plugin": "^9.3.13"
57
+ "@lntvow/eslint-plugin": "^9.4.0"
58
58
  },
59
59
  "scripts": {
60
60
  "dev": "pnpm build --format esm --watch",