vue/no-restricted-call-after-await
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-restricted-call-after-await": "error",
},
},
];<script>
import { useI18n } from "vue-i18n";
export default {
async setup() {
await fetchUser();
const { t } = useI18n();
return { t };
},
};
</script><script>
import { useI18n } from "vue-i18n";
export default {
async setup() {
const { t } = useI18n();
await fetchUser();
return { t };
},
};
</script>Examples from the Biome documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/no-restricted-call-after-await
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-restricted-call-after-await": "error",
},
},
];Oxlint does not have this rule.
nursery/noVueRestrictedCallAfterAwait
nursery · since 2.6.5
{
"linter": {
"rules": {
"nursery": {
"noVueRestrictedCallAfterAwait": "error"
}
}
}
}Disallow usages of ref objects that can lead to loss of reactivity
Disallow usages that lose the reactivity of props passed to setup