-
-
Notifications
You must be signed in to change notification settings - Fork 963
fix(lint): ignore useJsxKeyInIterable in Astro #9659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
raashish1601
wants to merge
1
commit into
biomejs:main
from
raashish1601:contributor-75/issue-9507-astro-jsx-key
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ots/main_cases_handle_astro_files/use_jsx_key_in_iterable_is_ignored_for_astro_files.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| source: crates/biome_cli/tests/snap_test.rs | ||
| expression: redactor(content) | ||
| --- | ||
| ## `biome.json` | ||
|
|
||
| ```json | ||
| { | ||
| "linter": { | ||
| "domains": { | ||
| "react": "recommended" | ||
| } | ||
| }, | ||
| "html": { | ||
| "linter": { "enabled": true }, | ||
| "experimentalFullSupportEnabled": true | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## `file.astro` | ||
|
|
||
| ```astro | ||
| --- | ||
| const items = ["one", "two", "three"]; | ||
| --- | ||
| <ul> | ||
| {items.map((item) => <li>{item}</li>)} | ||
| </ul> | ||
| ``` | ||
|
|
||
| # Emitted Messages | ||
|
|
||
| ```block | ||
| Checked 1 file in <TIME>. No fixes applied. | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: biomejs/biome
Length of output: 7078
Astro skip guard doesn't cover
<script>element embedsThe guard on line 89 only skips when
as_embedding_kind()returnsEmbeddingKind::Astro { .. }. However, Astro<script>element embeds (created asEmbedCandidate::Element) are deliberately assigned no embedding kind—they only skip for Frontmatter, TextExpression, and Directive contexts. If the intent is to exclude the rule entirely from Astro files, the guard is incomplete.🤖 Prompt for AI Agents