vue/require-typed-ref
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/require-typed-ref": "error",
},
},
];const count = ref();
const name = shallowRef()const count = ref<number>()
const a = ref(0)Examples from the Oxlint 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/require-typed-ref
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/require-typed-ref": "error",
},
},
];vue/require-typed-ref
vue plugin · style
{
"plugins": [
"vue"
],
"rules": {
"vue/require-typed-ref": "error"
}
}nursery/useVueTypedRef
nursery · since 2.6.3
{
"linter": {
"rules": {
"nursery": {
"useVueTypedRef": "error"
}
}
}
}Require components to be the default export
Disallow this usage in a beforeRouteEnter method
Enforce consistent style for props destructuring
Enforce declaration style of defineProps and defineModel
Enforce declaration style of defineEmits