-
-
Notifications
You must be signed in to change notification settings - Fork 791
Labels
S-Needs responseStatus: await response from OPStatus: await response from OPS-Needs triageStatus: this issue needs to be triagedStatus: this issue needs to be triaged
Description
Environment information
» npx @biomejs/biome rage --linter
CLI:
Version: 2.3.6
Color support: true
Platform:
CPU Architecture: x86_64
OS: linux
Environment:
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_CONFIG_PATH: unset
BIOME_THREADS: unset
NO_COLOR: unset
TERM: xterm-256color
JS_RUNTIME_VERSION: v25.2.1
JS_RUNTIME_NAME: node
NODE_PACKAGE_MANAGER: npm/11.6.2
Biome Configuration:
Status: Loaded successfully
Path: biome.jsonc
Formatter enabled: true
Linter enabled: true
Assist enabled: true
VCS enabled: false
Linter:
JavaScript enabled: unset
JSON enabled: unset
CSS enabled: unset
GraphQL enabled: unset
Recommended: false
Enabled rules:
nursery/noSyncScripts
Workspace:
Open Documents: 0Rule name
noSyncScripts
Playground link
https://github.com/THernandez03/biome-noSyncScripts
Why This is Incorrect
Module Scripts Are Already Deferred
According to the MDN Web Docs - JavaScript Modules:
3. Modules are deferred automatically
Modules are automatically executed in defer mode. This means that:
- Module scripts are downloaded in parallel to parsing the HTML
- Module scripts are executed after the document has been parsed
- The relative order of multiple module scripts is preserved
Expected result
The noSyncScripts rule should be updated to:
- Skip validation for
<script>tags withtype="module" - Only flag classic
<script>tags withoutdeferorasyncattributes - Optionally provide an informational message explaining that module scripts are already deferred
Code of Conduct
- I agree to follow Biome's Code of Conduct
Metadata
Metadata
Assignees
Labels
S-Needs responseStatus: await response from OPStatus: await response from OPS-Needs triageStatus: this issue needs to be triagedStatus: this issue needs to be triaged