zuke.tools.eslint

← Python API reference

@zuke/eslint 1.1.0: @zuke/eslint — typed eslint task wrappers for Zuke builds.

Symbols

#

EslintSettings

class
class EslintSettings(ToolSettings)

Settings for an eslint run.

  • paths(*values: str) -> Self

    Files, directories, or globs to lint (positional); repeatable.

  • config(path: str) -> Self

    Use an explicit config file (-c/--config).

  • ext(*extensions: str) -> Self

    Additional file extensions to lint (--ext); repeatable.

  • fix() -> Self

    Apply automatic fixes (--fix).

  • fix_dry_run() -> Self

    Compute fixes without writing them (--fix-dry-run).

  • fix_type(*types: str) -> Self

    Restrict fixes to the given types (--fix-type); repeatable.

  • quiet_warnings() -> Self

    Report errors only, suppressing warnings (--quiet).

  • max_warnings(count: float) -> Self

    Fail once this many warnings are reached (--max-warnings).

  • format(value: str) -> Self

    Output format, e.g. stylish, json (-f/--format).

  • output_file(path: str) -> Self

    Write the report to a file (-o/--output-file).

  • cache() -> Self

    Cache results between runs (--cache).

  • cache_location(path: str) -> Self

    Where to store the cache (--cache-location).

  • ignore_path(path: str) -> Self

    Read ignore globs from a file (--ignore-path).

  • ignore_pattern(glob: str) -> Self

    Ignore files matching a glob (--ignore-pattern); repeatable.

  • no_ignore() -> Self

    Disable all ignore handling (--no-ignore).

  • no_config_lookup() -> Self

    Do not search for a config file (--no-config-lookup).

  • report_unused_disable_directives() -> Self

    Report unused eslint-disable directives (--report-unused-disable-directives).

#

EslintTasks

class
class EslintTasks

Typed task functions for the eslint linter.

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

    Lint with eslint.