vue/no-reserved-keys
eslint-plugin-vue
No autofixRecommended
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-reserved-keys": "error",
},
},
];<script>
export default {
props: ['$data'],
methods: {
$emit() {}
}
}
</script><script>
export default {
props: ['fooData'],
methods: {
send() {}
}
}
</script>Examples from the Oxlint documentation.
vue/no-reserved-keys
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-reserved-keys": "error",
},
},
];vue/no-reserved-keys
vue plugin · correctness
{
"plugins": [
"vue"
],
"rules": {
"vue/no-reserved-keys": "error"
}
}correctness/noVueReservedKeys
correctness · since 2.1.3
{
"linter": {
"rules": {
"correctness": {
"noVueReservedKeys": "error"
}
}
}
}Disallow asynchronously registered lifecycle hooks
Disallow asynchronously registered expose
Disallow side effects in computed properties
Disallow export in <script setup>
Disallow asynchronously registered watch