Observe "Illegal return statement outside of a function" from biome(parse) in syntax highlighting as well as biome check output. See Biome playground snippet and picture.
Expected result
The return statement is legal in Astro files, as shown in the Astro docs, so an error should not be thrown.
Environment information
What happened?
.astro
file. This involves addingreturn Astro.redirect('/url')
to your Astro component script.biome check
output. See Biome playground snippet and picture.Expected result
The return statement is legal in Astro files, as shown in the Astro docs, so an error should not be thrown.
Code of Conduct