vue/no-import-compiler-macros
eslint-plugin-vue
Safe autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-import-compiler-macros": "error",
},
},
];<script setup>
import { defineProps, withDefaults } from 'vue'
</script><script setup>
import { ref } from 'vue'
</script>Examples from the Oxlint documentation.
vue/no-import-compiler-macros
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-import-compiler-macros": "error",
},
},
];vue/no-import-compiler-macros
vue plugin · restriction
{
"plugins": [
"vue"
],
"rules": {
"vue/no-import-compiler-macros": "error"
}
}correctness/noVueImportCompilerMacros
correctness · since 2.4.15
{
"linter": {
"rules": {
"correctness": {
"noVueImportCompilerMacros": "error"
}
}
}
}Enforce Promise or callback style in nextTick
Enforce or forbid the use of the scoped and module attributes in SFC top level style tags
Enforce use of defineOptions instead of default export