From e4e59d3dc9976ff76afe639115b7a893d09eb4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=B6dderitzsch?= Date: Thu, 8 Jan 2026 07:10:57 +0100 Subject: [PATCH 1/7] #2801 Add ability to run Biome assists --- .../main/java/com/diffplug/spotless/biome/BiomeStep.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java b/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java index 848481e07e..3184370b6e 100644 --- a/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java +++ b/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2025 DiffPlug + * Copyright 2016-2026 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -393,7 +393,9 @@ private String[] buildBiomeCommand(File file) { var fileName = resolveFileName(file); var argList = new ArrayList(); argList.add(pathToExe); - argList.add("format"); + argList.add("check"); + argList.add("--write"); + argList.add("--javascript-linter-enabled=false"); argList.add("--stdin-file-path"); argList.add(fileName); if (configPath != null) { From bbc15a41f660bad4ba7c03480789930b45b512f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=B6dderitzsch?= Date: Thu, 8 Jan 2026 07:24:23 +0100 Subject: [PATCH 2/7] Updated CHANGES.md files --- plugin-gradle/CHANGES.md | 1 + plugin-maven/CHANGES.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index b9de11b3a1..d2ac530020 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -10,6 +10,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Changes * Bump default `ktlint` version to latest `1.7.1` -> `1.8.0`. ([2763](https://github.com/diffplug/spotless/pull/2763)) * Bump default `gherkin-utils` version to latest `9.2.0` -> `10.0.0`. ([#2619](https://github.com/diffplug/spotless/pull/2619)) +* Biome command changed to allow for configuring/running [Biome assists](https://biomejs.dev/assist/), such as `organizeImports`. ([#2801](https://github.com/diffplug/spotless/pull/2801)) ## [8.1.0] - 2025-11-18 ### Changes diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index d996ecc6d8..7c42fe862e 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -10,6 +10,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Changes * Bump default `ktlint` version to latest `1.7.1` -> `1.8.0`. ([2763](https://github.com/diffplug/spotless/pull/2763)) * Bump default `gherkin-utils` version to latest `9.2.0` -> `10.0.0`. ([#2619](https://github.com/diffplug/spotless/pull/2619)) +* Biome command changed to allow for configuring/running [Biome assists](https://biomejs.dev/assist/), such as `organizeImports`. ([#2801](https://github.com/diffplug/spotless/pull/2801)) + ## [3.1.0] - 2025-11-18 ### Changes From e9e5fface7221ecdc1a0e3d57053856ecf85128d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=B6dderitzsch?= Date: Thu, 8 Jan 2026 08:07:57 +0100 Subject: [PATCH 3/7] #2801 Bump default biome version to latest (2.3.11) --- .../main/java/com/diffplug/spotless/biome/BiomeSettings.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/com/diffplug/spotless/biome/BiomeSettings.java b/lib/src/main/java/com/diffplug/spotless/biome/BiomeSettings.java index 44948a1294..d21f49191a 100644 --- a/lib/src/main/java/com/diffplug/spotless/biome/BiomeSettings.java +++ b/lib/src/main/java/com/diffplug/spotless/biome/BiomeSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2025 DiffPlug + * Copyright 2023-2026 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ public final class BiomeSettings { private static final Logger LOGGER = LoggerFactory.getLogger(BiomeSettings.class); private static final String CONFIG_NAME = "biome.json"; - private static final String DEFAULT_VERSION = "1.2.0"; + private static final String DEFAULT_VERSION = "2.3.11"; private static final String DOWNLOAD_FILE_PATTERN = "biome-%s-%s-%s"; private static final String SHORT_NAME = "biome"; private static final String URL_PATTERN_1X = "https://github.com/biomejs/biome/releases/download/cli%%2Fv%s/biome-%s"; From 50518897cbb5b7af90b15ce73fb1a4011716298c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=B6dderitzsch?= Date: Thu, 8 Jan 2026 09:05:02 +0100 Subject: [PATCH 4/7] #2801 Use 1.8.0 as minimal supported biome version --- .../spotless/biome/BiomeSettings.java | 2 +- plugin-gradle/README.md | 6 +-- .../gradle/spotless/BiomeIntegrationTest.java | 24 +++++----- .../spotless/maven/biome/BiomeMavenTest.java | 24 +++++----- .../spotless/biome/BiomeStepTest.java | 46 +++++++++---------- 5 files changed, 51 insertions(+), 51 deletions(-) diff --git a/lib/src/main/java/com/diffplug/spotless/biome/BiomeSettings.java b/lib/src/main/java/com/diffplug/spotless/biome/BiomeSettings.java index d21f49191a..3dfc7ea087 100644 --- a/lib/src/main/java/com/diffplug/spotless/biome/BiomeSettings.java +++ b/lib/src/main/java/com/diffplug/spotless/biome/BiomeSettings.java @@ -58,7 +58,7 @@ public static String getDownloadFilePattern() { } /** - * @param version The biome version for which to get the URL pattern, e.g. 1.2.0 or 2.0.6. + * @param version The biome version for which to get the URL pattern, e.g. 1.8.3 or 2.3.11. * @return The pattern for {@link String#formatted(Object...) * String.format()} for the URL where the executables can be downloaded. * The first parameter is the version, the second parameter is the OS / diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index fe808a043c..8015bea952 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -1543,7 +1543,7 @@ To download the Biome binary from the network, just specify a version: spotless { format 'biome', { target '**/*.js','**/*.ts','**/*.json' - biome('1.2.0') + biome('2.3.11') } } ``` @@ -1558,7 +1558,7 @@ spotless { format 'biome', { target '**/*.js','**/*.ts','**/*.json' // Relative paths are resolved against the project's base directory - biome('1.2.0').downloadDir("${project.gradle.gradleUserHomeDir}/biome") + biome('2.3.11').downloadDir("${project.gradle.gradleUserHomeDir}/biome") } } ``` @@ -1639,7 +1639,7 @@ you can force a certain language like this: spotless { format 'biome', { target 'src/**/typescript/**/*.mjson' - biome('1.2.0').language('json') + biome('2.3.11').language('json') } } ``` diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java index 02ef09ec01..6d274d2fa5 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java @@ -95,7 +95,7 @@ void asGenericStep() throws Exception { "spotless {", " format 'mybiome', {", " target '**/*.js'", - " biome('1.2.0')", + " biome('2.3.11')", " }", "}"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); @@ -120,7 +120,7 @@ void asJavaScriptStep() throws Exception { "spotless {", " javascript {", " target '**/*.js'", - " biome('1.2.0')", + " biome('2.3.11')", " }", "}"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); @@ -145,7 +145,7 @@ void asJsonStep() throws Exception { "spotless {", " json {", " target '**/*.json'", - " biome('1.2.0')", + " biome('2.3.11')", " }", "}"); setFile("biome_test.json").toResource("biome/json/fileBefore.json"); @@ -170,7 +170,7 @@ void asTypeScriptStep() throws Exception { "spotless {", " typescript {", " target '**/*.ts'", - " biome('1.2.0')", + " biome('2.3.11')", " }", "}"); setFile("biome_test.ts").toResource("biome/ts/fileBefore.ts"); @@ -195,7 +195,7 @@ void canSetLanguageForGenericStep() throws Exception { "spotless {", " format 'mybiome', {", " target '**/*.nosj'", - " biome('1.2.0').language('json')", + " biome('2.3.11').language('json')", " }", "}"); setFile("biome_test.nosj").toResource("biome/json/fileBefore.json"); @@ -221,7 +221,7 @@ void configPathAbsolute() throws Exception { "spotless {", " format 'mybiome', {", " target '**/*.js'", - " biome('1.2.0').configPath('" + Encode.forJava(path) + "')", + " biome('2.3.11').configPath('" + Encode.forJava(path) + "')", " }", "}"); setFile("biome_test.js").toResource("biome/js/longLineBefore.js"); @@ -276,7 +276,7 @@ void configPathLineWidth120() throws Exception { "spotless {", " format 'mybiome', {", " target '**/*.js'", - " biome('1.2.0').configPath('configs')", + " biome('2.3.11').configPath('configs')", " }", "}"); setFile("biome_test.js").toResource("biome/js/longLineBefore.js"); @@ -303,7 +303,7 @@ void configPathLineWidth80() throws Exception { "spotless {", " format 'mybiome', {", " target '**/*.js'", - " biome('1.2.0').configPath('configs')", + " biome('2.3.11').configPath('configs')", " }", "}"); setFile("biome_test.js").toResource("biome/js/longLineBefore.js"); @@ -330,7 +330,7 @@ void downloadDirAbsolute() throws Exception { "spotless {", " format 'mybiome', {", " target '**/*.js'", - " biome('1.2.0').downloadDir('" + Encode.forJava(path) + "')", + " biome('2.3.11').downloadDir('" + Encode.forJava(path) + "')", " }", "}"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); @@ -358,7 +358,7 @@ void downloadDirRelative() throws Exception { "spotless {", " format 'mybiome', {", " target '**/*.js'", - " biome('1.2.0').downloadDir('target/bin/biome')", + " biome('2.3.11').downloadDir('target/bin/biome')", " }", "}"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); @@ -385,7 +385,7 @@ void failureWhenExeNotFound() throws Exception { "spotless {", " format 'mybiome', {", " target '**/*.js'", - " biome('1.2.0').pathToExe('biome/is/missing')", + " biome('2.3.11').pathToExe('biome/is/missing')", " }", "}"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); @@ -412,7 +412,7 @@ void failureWhenNotParseable() throws Exception { "spotless {", " format 'mybiome', {", " target '**/*.js'", - " biome('1.2.0').language('json')", + " biome('2.3.11').language('json')", " }", "}"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java index 895511bbce..76cfe1d49d 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java @@ -67,7 +67,7 @@ void asCssStepStable() throws Exception { */ @Test void asGenericStep() throws Exception { - writePomWithBiomeSteps("**/*.js", "1.2.0"); + writePomWithBiomeSteps("**/*.js", "1.8.0"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); mavenRunner().withArguments("spotless:apply").runNoError(); assertFile("biome_test.js").sameAsResource("biome/js/fileAfter.js"); @@ -80,7 +80,7 @@ void asGenericStep() throws Exception { */ @Test void asJavaScriptStep() throws Exception { - writePomWithJavascriptSteps("**/*.js", "1.2.0"); + writePomWithJavascriptSteps("**/*.js", "1.8.0"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); mavenRunner().withArguments("spotless:apply").runNoError(); assertFile("biome_test.js").sameAsResource("biome/js/fileAfter.js"); @@ -93,7 +93,7 @@ void asJavaScriptStep() throws Exception { */ @Test void asJsonStep() throws Exception { - writePomWithJsonSteps("**/*.json", "1.2.0"); + writePomWithJsonSteps("**/*.json", "1.8.0"); setFile("biome_test.json").toResource("biome/json/fileBefore.json"); mavenRunner().withArguments("spotless:apply").runNoError(); assertFile("biome_test.json").sameAsResource("biome/json/fileAfter.json"); @@ -106,7 +106,7 @@ void asJsonStep() throws Exception { */ @Test void asTypeScriptStep() throws Exception { - writePomWithTypescriptSteps("**/*.ts", "1.2.0"); + writePomWithTypescriptSteps("**/*.ts", "1.8.0"); setFile("biome_test.ts").toResource("biome/ts/fileBefore.ts"); mavenRunner().withArguments("spotless:apply").runNoError(); assertFile("biome_test.ts").sameAsResource("biome/ts/fileAfter.ts"); @@ -119,7 +119,7 @@ void asTypeScriptStep() throws Exception { */ @Test void canSetLanguageForGenericStep() throws Exception { - writePomWithBiomeSteps("**/*.nosj", "1.2.0json"); + writePomWithBiomeSteps("**/*.nosj", "1.8.0json"); setFile("biome_test.nosj").toResource("biome/json/fileBefore.json"); mavenRunner().withArguments("spotless:apply").runNoError(); assertFile("biome_test.nosj").sameAsResource("biome/json/fileAfter.json"); @@ -134,7 +134,7 @@ void canSetLanguageForGenericStep() throws Exception { void configPathAbsolute() throws Exception { var path = newFile("configs").getAbsolutePath(); writePomWithBiomeSteps("**/*.js", - "1.2.0" + forXml(path) + ""); + "1.8.0" + forXml(path) + ""); setFile("biome_test.js").toResource("biome/js/longLineBefore.js"); setFile("configs/biome.json").toResource("biome/config/line-width-120.json"); mavenRunner().withArguments("spotless:apply").runNoError(); @@ -166,7 +166,7 @@ void configPathFile() throws Exception { */ @Test void configPathLineWidth120() throws Exception { - writePomWithBiomeSteps("**/*.js", "1.2.0configs"); + writePomWithBiomeSteps("**/*.js", "1.8.0configs"); setFile("biome_test.js").toResource("biome/js/longLineBefore.js"); setFile("configs/biome.json").toResource("biome/config/line-width-120.json"); mavenRunner().withArguments("spotless:apply").runNoError(); @@ -181,7 +181,7 @@ void configPathLineWidth120() throws Exception { */ @Test void configPathLineWidth80() throws Exception { - writePomWithBiomeSteps("**/*.js", "1.2.0configs"); + writePomWithBiomeSteps("**/*.js", "1.8.0configs"); setFile("biome_test.js").toResource("biome/js/longLineBefore.js"); setFile("configs/biome.json").toResource("biome/config/line-width-80.json"); mavenRunner().withArguments("spotless:apply").runNoError(); @@ -197,7 +197,7 @@ void configPathLineWidth80() throws Exception { void downloadDirAbsolute() throws Exception { var path = newFile("target/bin/biome").getAbsoluteFile().toString(); writePomWithBiomeSteps("**/*.js", - "1.2.0" + forXml(path) + ""); + "1.8.0" + forXml(path) + ""); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); assertTrue(!newFile("target/bin/biome").exists() || newFile("target/bin/biome").list().length == 0); mavenRunner().withArguments("spotless:apply").runNoError(); @@ -214,7 +214,7 @@ void downloadDirAbsolute() throws Exception { @Test void downloadDirRelative() throws Exception { writePomWithBiomeSteps("**/*.js", - "1.2.0target/bin/biome"); + "1.8.0target/bin/biome"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); assertTrue(!newFile("target/bin/biome").exists() || newFile("target/bin/biome").list().length == 0); mavenRunner().withArguments("spotless:apply").runNoError(); @@ -229,7 +229,7 @@ void downloadDirRelative() throws Exception { */ @Test void failureWhenExeNotFound() throws Exception { - writePomWithBiomeSteps("**/*.js", "1.2.0biome/is/missing"); + writePomWithBiomeSteps("**/*.js", "1.8.0biome/is/missing"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); var result = mavenRunner().withArguments("spotless:apply").runHasError(); assertFile("biome_test.js").sameAsResource("biome/js/fileBefore.js"); @@ -243,7 +243,7 @@ void failureWhenExeNotFound() throws Exception { */ @Test void failureWhenNotParseable() throws Exception { - writePomWithBiomeSteps("**/*.js", "1.2.0json"); + writePomWithBiomeSteps("**/*.js", "1.8.0json"); setFile("biome_test.js").toResource("biome/js/fileBefore.js"); var result = mavenRunner().withArguments("spotless:apply").runHasError(); assertFile("biome_test.js").sameAsResource("biome/js/fileBefore.js"); diff --git a/testlib/src/test/java/com/diffplug/spotless/biome/BiomeStepTest.java b/testlib/src/test/java/com/diffplug/spotless/biome/BiomeStepTest.java index a47a5ad4cc..b609c0c435 100644 --- a/testlib/src/test/java/com/diffplug/spotless/biome/BiomeStepTest.java +++ b/testlib/src/test/java/com/diffplug/spotless/biome/BiomeStepTest.java @@ -55,7 +55,7 @@ class AutoDetectLanguage { */ @Test void testAutoDetectCjs() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/fileBefore.cjs", "biome/js/fileAfter.cjs"); } @@ -66,7 +66,7 @@ void testAutoDetectCjs() { */ @Test void testAutoDetectCts() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/ts/fileBefore.cts", "biome/ts/fileAfter.cts"); } @@ -100,7 +100,7 @@ void testAutoDetectCssStable() { */ @Test void testAutoDetectJs() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/fileBefore.js", "biome/js/fileAfter.js"); } @@ -111,7 +111,7 @@ void testAutoDetectJs() { */ @Test void testAutoDetectJson() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/json/fileBefore.json", "biome/json/fileAfter.json"); } @@ -122,7 +122,7 @@ void testAutoDetectJson() { */ @Test void testAutoDetectJsonc() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/jsonc/fileBefore.jsonc", "biome/jsonc/fileAfter.jsonc"); } @@ -133,7 +133,7 @@ void testAutoDetectJsonc() { */ @Test void testAutoDetectJsx() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/fileBefore.jsx", "biome/js/fileAfter.jsx"); } @@ -144,7 +144,7 @@ void testAutoDetectJsx() { */ @Test void testAutoDetectMjs() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/fileBefore.mjs", "biome/js/fileAfter.mjs"); } @@ -155,7 +155,7 @@ void testAutoDetectMjs() { */ @Test void testAutoDetectMts() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/ts/fileBefore.mts", "biome/ts/fileAfter.mts"); } @@ -166,7 +166,7 @@ void testAutoDetectMts() { */ @Test void testAutoDetectTs() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/ts/fileBefore.ts", "biome/ts/fileAfter.ts"); } @@ -177,7 +177,7 @@ void testAutoDetectTs() { */ @Test void testAutoDetectTsx() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/ts/fileBefore.tsx", "biome/ts/fileAfter.tsx"); } @@ -206,7 +206,7 @@ class BiomeVersion { */ @Test void test1x() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/fileBefore.cjs", "biome/js/fileAfter.cjs"); } @@ -230,7 +230,7 @@ class ConfigFile { @Test void testLineWidth120() { var path = createBiomeConfig("biome/config/line-width-120.json"); - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withConfigPath(path.toString()).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withConfigPath(path.toString()).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/longLineBefore.js", "biome/js/longLineAfter120.js"); } @@ -241,7 +241,7 @@ void testLineWidth120() { @Test void testLineWidth80() { var path = createBiomeConfig("biome/config/line-width-80.json"); - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withConfigPath(path.toString()).create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withConfigPath(path.toString()).create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/longLineBefore.js", "biome/js/longLineAfter80.js"); } @@ -284,7 +284,7 @@ class ExplicitLanguage { */ @Test void testSetLanguageCjs() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("js").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("js").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/fileBefore.cjs", "biome/js/fileAfter.cjs"); } @@ -318,7 +318,7 @@ void testSetLanguageCssStable() { */ @Test void testSetLanguageCts() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("ts").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("ts").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/ts/fileBefore.cts", "biome/ts/fileAfter.cts"); } @@ -329,7 +329,7 @@ void testSetLanguageCts() { */ @Test void testSetLanguageJs() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("js").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("js").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/fileBefore.js", "biome/js/fileAfter.js"); } @@ -340,7 +340,7 @@ void testSetLanguageJs() { */ @Test void testSetLanguageJson() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("json").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("json").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/json/fileBefore.json", "biome/json/fileAfter.json"); } @@ -351,7 +351,7 @@ void testSetLanguageJson() { */ @Test void testSetLanguageJsonc() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("jsonc").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("jsonc").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/jsonc/fileBefore.jsonc", "biome/jsonc/fileAfter.jsonc"); } @@ -362,7 +362,7 @@ void testSetLanguageJsonc() { */ @Test void testSetLanguageJsx() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("jsx").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("jsx").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/fileBefore.jsx", "biome/js/fileAfter.jsx"); } @@ -373,7 +373,7 @@ void testSetLanguageJsx() { */ @Test void testSetLanguageMjs() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("js").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("js").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/js/fileBefore.mjs", "biome/js/fileAfter.mjs"); } @@ -384,7 +384,7 @@ void testSetLanguageMjs() { */ @Test void testSetLanguageMts() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("ts").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("ts").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/ts/fileBefore.mts", "biome/ts/fileAfter.mts"); } @@ -395,7 +395,7 @@ void testSetLanguageMts() { */ @Test void testSetLanguageTs() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("ts").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("ts").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/ts/fileBefore.ts", "biome/ts/fileAfter.ts"); } @@ -406,7 +406,7 @@ void testSetLanguageTs() { */ @Test void testSetLanguageTsx() { - var step = BiomeStep.withExeDownload("1.2.0", downloadDir).withLanguage("tsx").create(); + var step = BiomeStep.withExeDownload("1.8.0", downloadDir).withLanguage("tsx").create(); var stepHarness = StepHarnessWithFile.forStep(BiomeStepTest.this, step); stepHarness.testResource("biome/ts/fileBefore.tsx", "biome/ts/fileAfter.tsx"); } From a1639566eb7184aa5cec439a9325cd9f085b5ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=B6dderitzsch?= Date: Thu, 8 Jan 2026 09:16:35 +0100 Subject: [PATCH 5/7] #2801 Fix build --- .../java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java | 2 +- plugin-maven/README.md | 2 +- .../java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java | 2 +- .../test/java/com/diffplug/spotless/biome/BiomeStepTest.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java index 6d274d2fa5..bf0a0a0857 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2025 DiffPlug + * Copyright 2023-2026 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/plugin-maven/README.md b/plugin-maven/README.md index 1664aacdd1..cd45390a6b 100644 --- a/plugin-maven/README.md +++ b/plugin-maven/README.md @@ -1709,7 +1709,7 @@ you can force a certain language like this: - 1.2.0 + 2.3.11 json diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java index 76cfe1d49d..ae4350931d 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/biome/BiomeMavenTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2025 DiffPlug + * Copyright 2023-2026 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/testlib/src/test/java/com/diffplug/spotless/biome/BiomeStepTest.java b/testlib/src/test/java/com/diffplug/spotless/biome/BiomeStepTest.java index b609c0c435..85793444bf 100644 --- a/testlib/src/test/java/com/diffplug/spotless/biome/BiomeStepTest.java +++ b/testlib/src/test/java/com/diffplug/spotless/biome/BiomeStepTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2025 DiffPlug + * Copyright 2023-2026 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 84a8e7842c19133e482553c8617be9a4dba011e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=B6dderitzsch?= Date: Thu, 8 Jan 2026 09:50:15 +0100 Subject: [PATCH 6/7] #2801 Disable _all_ biome linters --- lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java | 5 +++++ .../com/diffplug/gradle/spotless/BiomeIntegrationTest.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java b/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java index 3184370b6e..58fe15c0ed 100644 --- a/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java +++ b/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java @@ -396,6 +396,11 @@ private String[] buildBiomeCommand(File file) { argList.add("check"); argList.add("--write"); argList.add("--javascript-linter-enabled=false"); + argList.add("--json-linter-enabled=false"); + argList.add("--css-linter-enabled=false"); + argList.add("--graphql-linter-enabled=false"); + argList.add("--grit-linter-enabled=false"); + argList.add("--html-linter-enabled=false"); argList.add("--stdin-file-path"); argList.add(fileName); if (configPath != null) { diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java index bf0a0a0857..322a366b37 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/BiomeIntegrationTest.java @@ -445,7 +445,7 @@ void preservesIgnoredFiles() throws Exception { "spotless {", " json {", " target '**/*.json'", - " biome('1.5.0')", + " biome('1.8.0')", " }", "}"); setFile("package.json").toResource("biome/json/packageBefore.json"); From afadb726641cda2e62e7697079086a2b12fc022b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=B6dderitzsch?= Date: Thu, 8 Jan 2026 09:59:32 +0100 Subject: [PATCH 7/7] #2801 Use global linter switch --- .../main/java/com/diffplug/spotless/biome/BiomeStep.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java b/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java index 58fe15c0ed..cbc37943ba 100644 --- a/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java +++ b/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java @@ -395,12 +395,7 @@ private String[] buildBiomeCommand(File file) { argList.add(pathToExe); argList.add("check"); argList.add("--write"); - argList.add("--javascript-linter-enabled=false"); - argList.add("--json-linter-enabled=false"); - argList.add("--css-linter-enabled=false"); - argList.add("--graphql-linter-enabled=false"); - argList.add("--grit-linter-enabled=false"); - argList.add("--html-linter-enabled=false"); + argList.add("--linter-enabled=false"); argList.add("--stdin-file-path"); argList.add(fileName); if (configPath != null) {