From ee236407297e6eedeab7022a26e592d6d03b23bb Mon Sep 17 00:00:00 2001 From: CyanSalt Date: Fri, 10 May 2024 15:00:00 +0800 Subject: [PATCH] feat: add galaxy/vue-ref-style --- flat/galaxy/vue/reactivity-transform.mjs | 2 ++ galaxy/vue/reactivity-transform.js | 2 ++ package.json | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/flat/galaxy/vue/reactivity-transform.mjs b/flat/galaxy/vue/reactivity-transform.mjs index c46499d..5363e55 100644 --- a/flat/galaxy/vue/reactivity-transform.mjs +++ b/flat/galaxy/vue/reactivity-transform.mjs @@ -12,6 +12,8 @@ export default [ 'galaxy/valid-vue-reactivity-transform-props': 'warn', // 将 Reactivity Transform 的副作用变量标记为已使用 'galaxy/vue-reactivity-transform-uses-vars': 'error', + // 禁止混用 Ref 定义和 Reactivity Transform + 'galaxy/vue-ref-style': 'error', }, }, ] diff --git a/galaxy/vue/reactivity-transform.js b/galaxy/vue/reactivity-transform.js index ffa54dd..6dbf902 100644 --- a/galaxy/vue/reactivity-transform.js +++ b/galaxy/vue/reactivity-transform.js @@ -4,5 +4,7 @@ module.exports = { 'galaxy/valid-vue-reactivity-transform-props': 'warn', // 将 Reactivity Transform 的副作用变量标记为已使用 'galaxy/vue-reactivity-transform-uses-vars': 'error', + // 禁止混用 Ref 定义和 Reactivity Transform + 'galaxy/vue-ref-style': 'error', }, } diff --git a/package.json b/package.json index 0515046..01af647 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "eslint": ">=8.50.0", "eslint-import-resolver-alias": ">=1.1.2", "eslint-import-resolver-typescript": ">=3.5.4", - "eslint-plugin-galaxy": ">=1.20.0", + "eslint-plugin-galaxy": ">=1.33.0", "eslint-plugin-import": ">=2.27.0", "eslint-plugin-react": ">=7.29.0", "eslint-plugin-react-hooks": ">=3.0.0",