-
-
Notifications
You must be signed in to change notification settings - Fork 964
chore: merge main to next #9443
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
Changes from all commits
f2581b8
a1c46af
725e6bb
ecd00e8
61e2a02
dccc7ae
2669381
2de8362
1555948
f98dee2
795bad4
f5c8bf0
73205b9
78c4e9b
6c5a8f2
bf12092
71a19b9
3ac98eb
8475d90
2f8656b
9df0386
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Added new nursery lint rule `useBaseline` for CSS. The rule reports when CSS properties, property values, at-rules, media conditions, functions, or pseudo-selectors are not part of the configured [Baseline](https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility) tier. | ||
|
|
||
| For example, *at the time of writing*, the rule will trigger for the use of `accent-color` because it has limited availability: | ||
|
|
||
| ```css | ||
| a { accent-color: bar; } | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Added the nursery rule [`useImportsFirst`](https://biomejs.dev/linter/rules/use-imports-first/) that enforces all import statements appear before any non-import statements in a module. Inspired by the eslint-plugin-import [`import/first`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/first.md) rule. | ||
|
|
||
| ```js | ||
| // Invalid | ||
| import { foo } from "foo"; | ||
| const bar = 1; | ||
| import { baz } from "baz"; // ← flagged | ||
|
|
||
| // Valid | ||
| import { foo } from "foo"; | ||
| import { baz } from "baz"; | ||
| const bar = 1; | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Fixed [#9432](https://github.com/biomejs/biome/issues/9432): Values referenced as a JSX element in Astro/Vue/Svelte templates are now correctly detected; `noUnusedImports` and `useImportType` rules no longer reports these values as false positives. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make the changeset a bit more user-facing. Line 5 reads a touch implementation-heavy, and “rules no longer reports” should be “rules no longer report”. I’d rephrase it around the user impact, e.g. imports used only in Astro/Vue/Svelte template JSX no longer trigger false positives from 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Fixed [#9385](https://github.com/biomejs/biome/issues/9385): [`noUselessEscapeInString`](https://biomejs.dev/linter/rules/no-useless-escape-in-string/) no longer incorrectly flags valid CSS hex escapes (e.g. `\e7bb`) as useless. The rule now recognizes all hex digits (`0-9`, `a-f`, `A-F`) as valid escape characters in CSS strings. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Fixed [#9131](https://github.com/biomejs/biome/issues/9131), [#9112](https://github.com/biomejs/biome/issues/9112), [#9166](https://github.com/biomejs/biome/issues/9166): the formatter no longer crashes or produces corrupt output when a JS file with `experimentalEmbeddedSnippetsEnabled` contains non-embedded template literals alongside embedded ones (e.g. `console.log(\`test\`)` next to `graphql(\`...\`)`). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Fixed [#8897](https://github.com/biomejs/biome/issues/8897): Biome now parses `@utility` names containing `/` when Tailwind directives are enabled. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Fixed [#9245](https://github.com/biomejs/biome/issues/9245): the [`useSemanticElements`](https://biomejs.dev/linter/rules/use-semantic-elements/) rule no longer suggests `<output>` for `role="status"` and `role="alert"`. The `<output>` element is only a `relatedConcept` of these roles, not a direct semantic equivalent. These roles are now excluded from suggestions, aligning with the intended behavior of the upstream `prefer-tag-over-role` rule. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Fixed [#9433](https://github.com/biomejs/biome/issues/9433): [`noBlankTarget`](https://biomejs.dev/linter/rules/no-blank-target/) now correctly handles dynamic href attributes, such as `<a href={company?.website} target="_blank">`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Fixed [#6606](https://github.com/biomejs/biome/issues/6606): The type inference engine now resolves `Record<K, V>` types, synthesizing them as object types with index signatures. This improves accuracy for type-aware lint rules such as `noFloatingPromises`, `noMisusedPromises`, `useAwaitThenable`, and `useArraySortCompare` when operating on Record-typed values. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
| source: crates/biome_cli/tests/snap_test.rs | ||
| expression: redactor(content) | ||
| --- | ||
| ## `biome.json` | ||
|
|
||
| ```json | ||
| { | ||
| "html": { | ||
| "linter": { "enabled": true }, | ||
| "experimentalFullSupportEnabled": true | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## `file.astro` | ||
|
|
||
| ```astro | ||
| --- | ||
| import type { ComponentProps } from "astro/types"; | ||
|
|
||
| import Badge from "@/components/mdx-components/Badge.astro"; | ||
|
|
||
| interface Props { | ||
| badge?: ComponentProps<typeof Badge>; | ||
| } | ||
|
|
||
| const { badge } = Astro.props; | ||
| --- | ||
|
|
||
| {badge && <Badge text={badge.text} variant={badge.variant} />} | ||
|
|
||
| ``` | ||
|
|
||
| # Emitted Messages | ||
|
|
||
| ```block | ||
| Checked 1 file in <TIME>. No fixes applied. | ||
| ``` |
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.
Use a valid CSS example in the release note.
accent-color: baris invalid CSS regardless of Baseline support, so it muddies whatuseBaselineis actually adding. A valid declaration such asaccent-color: redwould demonstrate the new rule cleanly.Based on learnings: “For rule changes in changesets, clearly demonstrate what is now invalid that wasn't before.”
🤖 Prompt for AI Agents