Buckets:
37 GB
4,042,753 files
Updated about 1 month ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| src | 2 items | ||
| tests | 2 items | ||
| CHANGELOG.md | 2.59 kB xet | 430c4b25 | |
| README.md | 3.32 kB xet | 2953bf84 | |
| deno.json | 376 Bytes xet | 27f4c049 | |
| mod.ts | 437 Bytes xet | de0afaa3 |
@zuke/eslint
Typed eslint task wrappers for
Zuke builds, in a fluent
settings-lambda API. Arguments stay a discrete argv array, so command
construction is injection-free.
import { EslintTasks } from "@zuke/eslint";
await EslintTasks.lint((s) =>
s.paths("src").ext(".ts", ".tsx").fix().maxWarnings(0)
);
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/eslint` — typed `eslint` task wrappers for Zuke builds.
Configure a fluent settings object in a lambda; the task builds the argv and
runs it.
```ts
import { EslintTasks } from "@zuke/eslint";
await EslintTasks.lint((s) => s.paths("src").ext(".ts", ".tsx").fix());
```
@module
const EslintTasks: EslintTasksApi
Typed task functions for the `eslint` linter.
class EslintSettings extends ToolSettings
Settings for an `eslint` run.
override protected defaultTool(): string
The default executable this settings object runs (`eslint`).
override protected defaultResolution(): ToolResolution
Resolve the binary from `node_modules/.bin` by default — eslint is an npm-distributed tool.
paths(...values: PathLike[]): this
Files, directories, or globs to lint (positional); repeatable.
config(path: PathLike): this
Use an explicit config file (`-c`/`--config`).
ext(...extensions: string[]): this
Additional file extensions to lint (`--ext`); repeatable.
fix(): this
Apply automatic fixes (`--fix`).
fixDryRun(): this
Compute fixes without writing them (`--fix-dry-run`).
fixType(...types: string[]): this
Restrict fixes to the given types (`--fix-type`); repeatable.
quietWarnings(): this
Report errors only, suppressing warnings (`--quiet`).
maxWarnings(count: number): this
Fail once this many warnings are reached (`--max-warnings`).
format(value: string): this
Output format, e.g. `stylish`, `json` (`-f`/`--format`).
outputFile(path: PathLike): this
Write the report to a file (`-o`/`--output-file`).
cache(): this
Cache results between runs (`--cache`).
cacheLocation(path: PathLike): this
Where to store the cache (`--cache-location`).
ignorePath(path: PathLike): this
Read ignore globs from a file (`--ignore-path`).
ignorePattern(glob: string): this
Ignore files matching a glob (`--ignore-pattern`); repeatable.
noIgnore(): this
Disable all ignore handling (`--no-ignore`).
noConfigLookup(): this
Do not search for a config file (`--no-config-lookup`).
reportUnusedDisableDirectives(): this
Report unused `eslint-disable` directives (`--report-unused-disable-directives`).
override protected onOutput(output: CommandOutput): void
Report `Problems`, `Errors` and `Warnings` onto the build summary.
override protected buildArgs(): string[]
Assemble the `eslint` argv from the configured settings.
interface EslintTasksApi
The shape of {@link EslintTasks}.
lint(configure?: Configure<EslintSettings>): Promise<CommandOutput>
Lint with `eslint`.
- Total size
- 37 GB
- Files
- 4,042,753
- Last updated
- Oct 24
- Pre-warmed CDN
- US EU US EU