vue/no-child-content
eslint-plugin-vue
SuggestionRecommended
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-child-content": "error",
},
},
];Disallow element's child contents which would be overwritten by a directive like v-html or v-text
<div v-html="replacesChildContent">child content</div>
</template><div>child content</div>
<div v-html="replacesChildContent"></div>Examples from the ESLint documentation.
vue/no-child-content
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-child-content": "error",
},
},
];Oxlint does not have this rule.
nursery/noVueChildContent
nursery · since 2.6.5
{
"linter": {
"rules": {
"nursery": {
"noVueChildContent": "error"
}
}
}
}Enforce valid nextTick function calls
Disallow using deprecated $listeners (in Vue.js 3.0.0+)
Enforce valid defineProps compiler macro
Disallow using deprecated $scopedSlots (in Vue.js 3.0.0+)
Enforce valid defineOptions compiler macro
Disallow using deprecated filters syntax (in Vue.js 3.0.0+)