Oxlint

From Esposter/Esposter · View interactive version

Oxlint is an AI agent skill from the GitHub repository Esposter/Esposter. Apply when fixing lint errors, editing oxlint.config.ts, configuring vitest lint rules, investigating a slow oxlint pass, writing a custom lint rule, adding an accessibility attribute to a template, or adding regexes, interface declarations or JSON parsing. Esposter's lint conventions for oxlint and

How to use this skill

Skill file

Oxlint and Vize Conventions

Settled — do not re-propose

Deep Dives

Running lint

Oxlint runs as one repo-wide pass from the one oxlint.config.ts at the repo root, and vize lints every component's template in its own pass, the root lint:vue task. So the root vp run lint:fix — oxlint's fix over the whole tree, then vize's — is the only lint that matches CI's, and a session runs it only to answer CI's red (the running-checks skill). The narrower lanes are for iterating: vp run lint:fix:packages covers packages/ alone, and a targeted oxlint <path> takes seconds, worth running to find a rule's hits mid-sweep.

The verdict rule is the running-checks skill's (references/reading-results.md); here the root lint runs one leaf per pass and every leaf reports, so a clean summary sits above a failed one and the log may hold several, and vp run replaying a cached task makes the earlier lines look freshly computed when they were not. Redirect to a file and read $?, or read the whole output rather than its end. A targeted oxlint <path> before a land is read under that same rule, and it is run bare so its own exit code is the verdict before any && pnpm ai:land (the running-checks skill, references/reading-results.md).

Never hand-fix lint errors — let the fix script do it. The one exception is while you are changing a rule: an edit to oxlint.config.ts is verified check-only, because a fix variant would rewrite the repo to satisfy a decision that is still being made (references/lint-configuration.md).

A new ban is rolled out from one violation list, never one package at a time. Oxlint and vize each pass the whole repository once, so one check-only run lists every site across the tree. Collect the whole set before editing anything: a rule finds sites a grep for the same shape does not, because the shape wraps across lines, so the list is also the count.

Which directive to use

Pick the directive by which pass reports the rule, and spell the rule the way that pass names it:

No type-aware rule of our own runs

Oxlint's built-in type-aware rules do run (typeAware: true in oxlint.config.ts — restrict-template-expressions is one, and it is what makes String(x) inside a template literal legitimate for an unknown or symbol). What cannot run is a type-aware rule we author: the type-aware backend runs no JS rules. A convention that needs types is enforced by review, not by a rule — do not add a type-aware plugin to buy one back (openspec/specs/architecture/lint-toolchain/design.md, Decisions).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.