diff --git a/.changeset/add-span-conversion-helper-in-subpath.md b/.changeset/add-span-conversion-helper-in-subpath.md new file mode 100644 index 000000000000..6c8461e5a782 --- /dev/null +++ b/.changeset/add-span-conversion-helper-in-subpath.md @@ -0,0 +1,18 @@ +--- +"@biomejs/js-api": minor +--- + +Added `spanInBytesToSpanInCodeUnits` helper function in subpath exports of `@biomejs/js-api`. + +```js +import { spanInBytesToSpanInCodeUnits } from "@biomejs/js-api/nodejs"; +// Or: +// import { spanInBytesToSpanInCodeUnits } from "@biomejs/js-api/bundler"; +// import { spanInBytesToSpanInCodeUnits } from "@biomejs/js-api/web"; + +const [start, end] = spanInBytesToSpanInCodeUnits( + diagnostic.location.span, + content +); +const text = content.slice(start, end); // Correctly extracts the text +``` diff --git a/.changeset/chatty-meals-train.md b/.changeset/chatty-meals-train.md new file mode 100644 index 000000000000..6af34c86b4e8 --- /dev/null +++ b/.changeset/chatty-meals-train.md @@ -0,0 +1,5 @@ +--- +"@biomejs/biome": minor +--- + +`biome rage` now shows the resolved `files.includes` and `files.ignoreUnknown` configuration. diff --git a/.changeset/cold-snakes-smile.md b/.changeset/cold-snakes-smile.md new file mode 100644 index 000000000000..dfd084eed8fc --- /dev/null +++ b/.changeset/cold-snakes-smile.md @@ -0,0 +1,5 @@ +--- +"@biomejs/biome": minor +--- + +Added support for [`useSortedClasses`](https://biomejs.dev/linter/rules/use-sorted-classes/) rule in HTML-ish files. diff --git a/.changeset/eight-lamps-follow.md b/.changeset/eight-lamps-follow.md new file mode 100644 index 000000000000..4511b97a8475 --- /dev/null +++ b/.changeset/eight-lamps-follow.md @@ -0,0 +1,19 @@ +--- +"@biomejs/biome": minor +--- + +Adds a new `resolutionKind` option for object-syntax plugin entries. + +This allows shared Biome configs in monorepos to load local Grit plugins from the package that declares them instead of resolving plugin paths from the consuming project. + +```json +{ + "plugins": [ + { "path": "./grit/no-debugger.grit", "resolutionKind": "config" }, + { "path": "local-plugin.grit", "resolutionKind": "project" }, + { "path": "local-plugin.grit" } + ] +} +``` + +Use `resolutionKind: "config"` to resolve the plugin from the configuration file that declares it. Use `resolutionKind: "project"` to resolve the plugin from the consuming project. When omitted, `resolutionKind` defaults to `project`. This only affects plugin resolution; `includes` still apply to end-user project files as usual. diff --git a/.changeset/fix-css-commented-function-arguments.md b/.changeset/fix-css-commented-function-arguments.md new file mode 100644 index 000000000000..2c6fb51f346c --- /dev/null +++ b/.changeset/fix-css-commented-function-arguments.md @@ -0,0 +1,21 @@ +--- +"@biomejs/biome": patch +--- + +Fixed CSS formatting for multiline function arguments preceded by comments: + +```diff + .example { + value: outer( + 1, + /* comment */ + nested( +- first, +- second +- ) ++ first, ++ second ++ ) + ); + } +``` diff --git a/.changeset/fix-nested-destructured-arrow-ternary.md b/.changeset/fix-nested-destructured-arrow-ternary.md new file mode 100644 index 000000000000..56e6f0087469 --- /dev/null +++ b/.changeset/fix-nested-destructured-arrow-ternary.md @@ -0,0 +1,5 @@ +--- +"@biomejs/biome": patch +--- + +Fixed [#10131](https://github.com/biomejs/biome/issues/10131): Biome now correctly parses curried arrow functions in ternary consequents when the inner arrow's parameters use a destructuring pattern, e.g. `cond ? (x) => ({ a, b }) => body : alt`. diff --git a/.changeset/fix-reindent-verbatim-regions.md b/.changeset/fix-reindent-verbatim-regions.md new file mode 100644 index 000000000000..e07f25c52463 --- /dev/null +++ b/.changeset/fix-reindent-verbatim-regions.md @@ -0,0 +1,5 @@ +--- +"@biomejs/biome": patch +--- + +Fixed [#10515](https://github.com/biomejs/biome/issues/10515): `biome check --write` was not idempotent on Svelte files — multi-line template literals in `