Skip to content

noVueImportCompilerMacros

biome.json
{
"linter": {
"rules": {
"nursery": {
"noVueImportCompilerMacros": "error"
}
}
}
}

Disallow importing Vue compiler macros.

Vue compiler macros are globally available inside <script setup> blocks and must not be imported. Outside of <script setup>, compiler macros are not valid Vue runtime imports.

<script setup>
import { defineProps } from "vue";
defineProps({});
</script>
code-block.vue:1:10 lint/nursery/noVueImportCompilerMacros ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The Vue compiler macro defineProps should not be imported.

> 1 │ import { defineProps } from “vue”;
^^^^^^^^^^^
2 │ defineProps({});
3 │

Compiler macros are automatically available inside <script setup> blocks.

Remove this import and use the macro directly.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

<script setup>
defineProps({});
</script>