Class AbstractBiome

java.lang.Object
com.diffplug.spotless.maven.generic.AbstractBiome
All Implemented Interfaces:
FormatterStepFactory
Direct Known Subclasses:
Biome, BiomeCss, BiomeJs, BiomeJson, BiomeTs

public abstract class AbstractBiome extends Object implements FormatterStepFactory
Factory for creating the Biome formatter step that can format code in various types of language with Biome. Currently, Biome supports JavaScript, TypeScript, JSX, TSX, and JSON. See also https://github.com/biomejs/biome. It delegates to the Biome CLI executable.
  • Constructor Details

    • AbstractBiome

      protected AbstractBiome()
  • Method Details

    • newFormatterStep

      public FormatterStep newFormatterStep(FormatterStepConfig config)
      Specified by:
      newFormatterStep in interface FormatterStepFactory
    • getLanguage

      protected abstract String getLanguage()
      Gets the language (syntax) of the input files to format. When null or the empty string, the language is detected automatically from the file name. Currently the following languages are supported by Biome:
      • js (JavaScript)
      • jsx (JavaScript + JSX)
      • js? (JavaScript or JavaScript + JSX, depending on the file extension)
      • ts (TypeScript)
      • tsx (TypeScript + JSX)
      • ts? (TypeScript or TypeScript + JSX, depending on the file extension)
      • css (CSS, requires biome >= 1.9.0)
      • json (JSON)
      • jsonc (JSON + comments)
      Returns:
      The language of the input files.