@ithinkdt/lint 4.0.7 → 4.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ithinkdt/lint",
3
- "version": "4.0.7",
3
+ "version": "4.1.0",
4
4
  "type": "module",
5
5
  "description": "iThinkDT 项目的 ESLint、StyleLint 配置",
6
6
  "keywords": [
@@ -37,10 +37,10 @@
37
37
  "@eslint/json": ">=2.0.0",
38
38
  "@eslint/markdown": "^8.0.2",
39
39
  "@stylistic/eslint-plugin": "^5.10.0",
40
- "@typescript-eslint/parser": "^8.61.0",
41
- "@unocss/eslint-config": "^66.7.0",
42
- "@vitest/eslint-plugin": "^1.6.19",
43
- "@vue/compiler-sfc": "^3.5.35",
40
+ "@typescript-eslint/parser": "^8.61.1",
41
+ "@unocss/eslint-config": "^66.7.2",
42
+ "@vitest/eslint-plugin": "^1.6.20",
43
+ "@vue/compiler-sfc": "^3.5.38",
44
44
  "eslint-flat-config-utils": "^3.2.0",
45
45
  "eslint-import-resolver-custom-alias": "^1.3.2",
46
46
  "eslint-import-resolver-typescript": "^4.4.5",
@@ -50,7 +50,7 @@
50
50
  "eslint-plugin-no-only-tests": "^3.4.0",
51
51
  "eslint-plugin-playwright": "^2.10.4",
52
52
  "eslint-plugin-tsdoc": ">=0.5.2",
53
- "eslint-plugin-unicorn": "^65.0.1",
53
+ "eslint-plugin-unicorn": "^66.0.0",
54
54
  "eslint-plugin-vue": "^10.9.2",
55
55
  "eslint-processor-vue-blocks": "^2.0.0",
56
56
  "globals": "^17.6.0",
@@ -60,7 +60,7 @@
60
60
  "stylelint-config-standard": "^40.0.0",
61
61
  "stylelint-config-standard-vue": "^1.0.0",
62
62
  "stylelint-order": "^8.1.1",
63
- "typescript-eslint": "^8.61.0",
63
+ "typescript-eslint": "^8.61.1",
64
64
  "vue-eslint-parser": "^10.4.1"
65
65
  },
66
66
  "peerDependencies": {
@@ -69,7 +69,7 @@
69
69
  "typescript": ">=5.8"
70
70
  },
71
71
  "devDependencies": {
72
- "eslint": "^10.4.1",
72
+ "eslint": "^10.5.0",
73
73
  "stylelint": "~17.13.0",
74
74
  "typescript": "~6.0.3"
75
75
  },
package/src/base.js CHANGED
@@ -166,11 +166,6 @@ export function base({ stylistic: stylisticOptions, inCI }) {
166
166
  }],
167
167
  'unicorn/no-null': 'off',
168
168
 
169
- // 仅单行时优先三元表达式
170
- 'unicorn/prefer-ternary': ['warn',
171
- 'only-single-line',
172
- ],
173
-
174
169
  // 关闭 优先 String#replaceAll(),使用全局标志进行正则表达式搜索
175
170
  'unicorn/prefer-string-replace-all': 'off',
176
171
 
@@ -180,6 +175,46 @@ export function base({ stylistic: stylisticOptions, inCI }) {
180
175
  // 与 ts/no-this-alias 重复
181
176
  'unicorn/no-this-assignment': 'off',
182
177
 
178
+ 'unicorn/comment-content': 'off',
179
+
180
+ 'unicorn/prefer-await': 'off',
181
+
182
+ 'unicorn/prefer-minimal-ternary': 'off',
183
+
184
+ 'unicorn/max-nested-calls': ['warn', {
185
+ max: 6,
186
+ }],
187
+
188
+ 'unicorn/prefer-short-arrow-method': 'off',
189
+
190
+ 'unicorn/no-computed-property-existence-check': 'off',
191
+
192
+ 'unicorn/prefer-uint8array-base64': 'off',
193
+
194
+ 'unicorn/prefer-iterator-to-array': 'off',
195
+
196
+ 'unicorn/prefer-global-number-constants': 'off',
197
+
198
+ 'unicorn/prefer-private-class-fields': 'off',
199
+
200
+ 'unicorn/no-error-property-assignment': 'off',
201
+
202
+ 'unicorn/prefer-type-literal-last': 'off',
203
+
204
+ 'unicorn/no-invalid-argument-count': 'off',
205
+
206
+ 'unicorn/class-reference-in-static-methods': 'off',
207
+
208
+ 'unicorn/no-undefined-namespace': 'off',
209
+
210
+ 'unicorn/consistent-class-member-order': 'off',
211
+
212
+ 'unicorn/prefer-ternary': 'off',
213
+
214
+ 'unicorn/no-incorrect-template-string-interpolation': 'off',
215
+
216
+ 'unicorn/no-unreadable-new-expression': 'off',
217
+
183
218
  // vue 中 this 会误报
184
219
  'unicorn/no-this-outside-of-class': 'off',
185
220
 
@@ -19,10 +19,7 @@ export function parseForESLint(code, options = {}) {
19
19
  return tsEslintParser.parseForESLint(code, options)
20
20
  }
21
21
  const extraFileExtensions = options.extraFileExtensions || DEFAULT_EXTRA_FILE_EXTENSIONS
22
- const programs = []
23
- for (const option of _iterateOptions(options)) {
24
- programs.push(tsServiceManager.getProgram(code, option))
25
- }
22
+ const programs = Array.from(_iterateOptions(options), option => tsServiceManager.getProgram(code, option))
26
23
  const filePath = options.filePath
27
24
  const parserOptions = {
28
25
  ...options,