zuke.tools.biome

← Python API reference

@zuke/biome 1.1.0: @zuke/biome — typed BiomeTasks wrappers for the [Biome](https://biomejs.dev) CLI (lint + format + import organizing in one tool), for use in Zuke builds.

Symbols

#

BiomeCheckSettings

class
class BiomeCheckSettings(BiomeSettings)

Settings for biome check (lint + format + organize-imports).

  • write() -> Self

    Write safe fixes back to disk (--write).

  • unsafe() -> Self

    Also apply unsafe fixes; implies writing (--unsafe).

#

BiomeCiSettings

class
class BiomeCiSettings(BiomeSettings)

Settings for biome ci (read-only check tuned for CI).

#

BiomeFormatSettings

class
class BiomeFormatSettings(BiomeSettings)

Settings for biome format.

  • write() -> Self

    Write formatting changes back to disk (--write).

#

BiomeLintSettings

class
class BiomeLintSettings(BiomeSettings)

Settings for biome lint.

  • write() -> Self

    Write safe lint fixes back to disk (--write).

  • unsafe() -> Self

    Also apply unsafe fixes; implies writing (--unsafe).

#

BiomeSettings

class
class BiomeSettings(ToolSettings)

Base for all biome subcommand settings: the binary is biome, and the common filters (config path, reporter, --staged, --changed) plus the trailing path arguments are shared by every subcommand.

  • paths(*paths: str) -> Self

    Files or directories to operate on; omit to use the configured includes.

  • config(path: str) -> Self

    Use an explicit configuration file (--config-path).

  • reporter(name: str) -> Self

    Choose the diagnostics reporter, e.g. github or json (--reporter).

  • staged() -> Self

    Restrict to files staged in git (--staged).

  • changed() -> Self

    Restrict to files changed against the VCS base (--changed).

#

BiomeTasks

class
class BiomeTasks

Typed task functions for the biome CLI.

  • static async check(ctx: ServiceContext, configure: Callable[[BiomeCheckSettings], BiomeCheckSettings] | None=None) -> ExecResult

    Lint, format, and organize imports: biome check.

  • static async format(ctx: ServiceContext, configure: Callable[[BiomeFormatSettings], BiomeFormatSettings] | None=None) -> ExecResult

    Format code: biome format.

  • static async lint(ctx: ServiceContext, configure: Callable[[BiomeLintSettings], BiomeLintSettings] | None=None) -> ExecResult

    Lint code: biome lint.

  • static async ci(ctx: ServiceContext, configure: Callable[[BiomeCiSettings], BiomeCiSettings] | None=None) -> ExecResult

    Read-only CI check: biome ci.