@foundbyte/eslint-plugin 1.1.4-alpha.3 → 1.1.4-alpha.4

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.
@@ -253,6 +253,15 @@ const anyVariables = new Set()
253
253
  return testCanInfer && consequentCanInfer && alternateCanInfer
254
254
  }
255
255
 
256
+ // 模板字符串可以推导类型(字符串类型)
257
+ if (node.type === 'TemplateLiteral') {
258
+ // 检查模板字符串中的所有表达式是否可以推导类型
259
+ if (node.expressions && node.expressions.length > 0) {
260
+ return node.expressions.every(expr => canInferTypeFromExpression(expr))
261
+ }
262
+ return true
263
+ }
264
+
256
265
  // 其他情况默认无法推导类型
257
266
  return false
258
267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foundbyte/eslint-plugin",
3
- "version": "1.1.4-alpha.3",
3
+ "version": "1.1.4-alpha.4",
4
4
  "description": "ESLint plugin for enforcing code style rules including arrow function padding, Vue script lines limit, and TypeScript type comment requirements",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",