37 GB
4,042,753 files
Updated about 1 month ago
Name
Size
src
tests
CHANGELOG.md2.59 kB
xet
README.md3.16 kB
xet
deno.json366 Bytes
xet
mod.ts433 Bytes
xet
README.md

@zuke/oxlint

Typed oxlint task wrappers for Zuke builds, in a fluent settings-lambda API. Arguments stay a discrete argv array, so command construction is injection-free.

import { OxlintTasks } from "@zuke/oxlint";

await OxlintTasks.lint((s) =>
  s.paths("src").config(".oxlintrc.json").fix().denyWarnings()
);

Paths

Every path argument accepts either a string or an AbsolutePath from @zuke/core, so a path built with absolutePath can be passed in directly.

API

Full typed API — generated from deno doc
`@zuke/oxlint` — typed `oxlint` task wrappers for Zuke builds.

Configure a fluent settings object in a lambda; the task builds the argv and
runs it.

```ts
import { OxlintTasks } from "@zuke/oxlint";
await OxlintTasks.lint((s) => s.paths("src").fix().denyWarnings());
```
@module

const OxlintTasks: OxlintTasksApi
  Typed task functions for the `oxlint` linter.

class OxlintSettings extends ToolSettings
  Settings for an `oxlint` run.

  override protected defaultTool(): string
    The default executable name (`oxlint`).
  override protected defaultResolution(): ToolResolution
    Resolve the binary from `node_modules/.bin` by default — oxlint is an npm-distributed tool.
  paths(...values: PathLike[]): this
    Files or directories to lint (positional); repeatable.
  config(path: PathLike): this
    Use an explicit config file (`-c`/`--config`).
  tsconfig(path: PathLike): this
    Point at a `tsconfig.json` for type-aware rules (`--tsconfig`).
  fix(): this
    Apply automatic fixes (`--fix`).
  fixSuggestions(): this
    Apply suggestion fixes too (`--fix-suggestions`).
  deny(rule: string): this
    Raise a rule or category to error (`-D`/`--deny`); repeatable.
  warn(rule: string): this
    Set a rule or category to warning (`-W`/`--warn`); repeatable.
  allow(rule: string): this
    Turn a rule or category off (`-A`/`--allow`); repeatable.
  ignorePath(path: PathLike): this
    Read ignore globs from a file (`--ignore-path`).
  ignorePattern(glob: string): this
    Ignore files matching a glob (`--ignore-pattern`); repeatable.
  maxWarnings(count: number): this
    Fail once this many warnings are reached (`--max-warnings`).
  quietWarnings(): this
    Report errors only, suppressing warnings (`--quiet`).
  denyWarnings(): this
    Exit non-zero if any warnings are found (`--deny-warnings`).
  format(value: string): this
    Output format, e.g. `default`, `json`, `github` (`-f`/`--format`).
  threads(count: number): this
    Number of threads to use (`--threads`).
  override protected onOutput(output: CommandOutput): void
    Report `Errors`, `Warnings` (and `Files` when known) onto the build summary.
  override protected buildArgs(): string[]
    Assemble the `oxlint` argv from the configured settings.

interface OxlintTasksApi
  The shape of {@link OxlintTasks}.

  lint(configure?: Configure<OxlintSettings>): Promise<CommandOutput>
    Lint with `oxlint`.
Total size
37 GB
Files
4,042,753
Last updated
Oct 24
Pre-warmed CDN
US EU US EU

Contributors