Appearance
vue/no-lifecycle-after-await
禁止异步注册生命周期钩子
- ⚙️ 此规则包含在
"plugin:vue/essential"、*.configs["flat/essential"]、"plugin:vue/strongly-recommended"、*.configs["flat/strongly-recommended"]、"plugin:vue/recommended"和*.configs["flat/recommended"]中。
📖 规则详情
此规则报告 await 表达式后的生命周期钩子。在 setup() 函数中,onXXX 生命周期钩子应该同步注册。
¥This rule reports the lifecycle hooks after await expression.\ In setup() function, onXXX lifecycle hooks should be registered synchronously.
🔧选项
¥🔧 Options
无。
¥Nothing.
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.0.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.0.0
🔍代码实现
¥🔍 Implementation