Environment information
CLI:
Version: 1.6.3
Color support: true
Platform:
CPU Architecture: x86_64
OS: windows
Environment:
BIOME_LOG_DIR: unset
NO_COLOR: unset
TERM: unset
JS_RUNTIME_VERSION: "v20.10.0"
JS_RUNTIME_NAME: "node"
NODE_PACKAGE_MANAGER: "pnpm/8.15.5"
Biome Configuration:
Status: Loaded successfully
Formatter disabled: false
Linter disabled: false
Organize imports disabled: false
VCS disabled: true
Workspace:
Open Documents: 0
What happened?
- Add an Astro dynamic redirect to a
.astro file. This involves adding return Astro.redirect('/url') to your Astro component script.
- 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.
Code of Conduct
Environment information
What happened?
.astrofile. This involves addingreturn Astro.redirect('/url')to your Astro component script.biome checkoutput. 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