@ai-i18n/eslint-plugin 1.0.0-alpha.2 → 1.0.0-alpha.3
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/README.md +5 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
`virtual:ai-i18n` 的 `t` binding,以及 Vue/React 模式下 `useI18n()` 解构或对象成员得到的
|
|
5
5
|
`t`。其他库或局部同名函数不受影响。
|
|
6
6
|
|
|
7
|
+
alpha 阶段请安装 `@ai-i18n/eslint-plugin@alpha`;peer 支持 ESLint 9 和 10。
|
|
8
|
+
|
|
7
9
|
## 按模式配置
|
|
8
10
|
|
|
9
11
|
显式 import 的 Vanilla 项目可以使用 `recommended`。启用 ai-i18n 按需导入时,选择与
|
|
@@ -50,8 +52,9 @@ Vue 项目已有的 `@vue/compiler-sfc`,与 Vite 提取器共享编译结果
|
|
|
50
52
|
Vue preset 同时覆盖 Vue JSX/TSX,但宿主仍需用 `@vitejs/plugin-vue-jsx` 编译这些文件。
|
|
51
53
|
React 项目使用 React preset;同一个 Vite build 不支持两种框架模式混用。
|
|
52
54
|
|
|
53
|
-
规则与 Vite 共用静态参数语义,包括 `i18n.t()`、`i18n['t']()
|
|
54
|
-
`t('source', undefined)
|
|
55
|
+
规则与 Vite 共用静态参数语义,包括 `i18n.t()`、`i18n['t']()`、省略式
|
|
56
|
+
`t('source', undefined)` 和 tagged template。未绑定到 ai-i18n 的 template-only `t()`
|
|
57
|
+
不参与检查。
|
|
55
58
|
|
|
56
59
|
需要解析 `tsconfig` 路径别名时,可以显式配置规则:
|
|
57
60
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-i18n/eslint-plugin",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
4
|
-
"description": "ESLint
|
|
3
|
+
"version": "1.0.0-alpha.3",
|
|
4
|
+
"description": "ESLint static-argument checks aligned with ai-i18n extraction semantics.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
7
7
|
"eslintplugin",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@ai-i18n/analyzer": "^1.0.0-alpha.
|
|
36
|
+
"@ai-i18n/analyzer": "^1.0.0-alpha.3"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@vue/compiler-sfc": "
|
|
40
|
-
"eslint": "
|
|
41
|
-
"vue-eslint-parser": "
|
|
39
|
+
"@vue/compiler-sfc": ">=3.2.0",
|
|
40
|
+
"eslint": ">=9.0.0",
|
|
41
|
+
"vue-eslint-parser": ">=9.0.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"@vue/compiler-sfc": {
|