oxlint-setup
Skill15 starsChanged 6 days agoMITView on GitHub
Sets up and maintains the standard Bun + oxlint + oxfmt configuration and custom 14-rule JS plugin (no-comments, no-barrel-file, no-atom-import, no-base-ui-outside-ui, no-native-primitives, padded-if, no-array-filter-map, no-module-mocking, and more). Use when bootstrapping linting in a repository, migrating from ESLint/Prettier to oxlint/oxfmt, or adding custom oxlint rules.
In this repository14 other files it gives its agents.
- agent-instruction-auditSkill
- agent-tool-auditSkill
- changes-verificationSkill
- cheap-ui-auditSkill
- code-reviewSkill
- create-prSkill
- debuggingSkill
- engineering-decisionSkill
- formal-verificationSkill
- micro-animationSkill
- optimistic-uiSkill
- optimize-ciSkill
- test-auditSkill
- zstack-modeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Run scripts/apply-oxlint.sh against the target repository (skips existing files unless --force is passed):
- Very specific: line 47
Add repo-specific generated paths to ignorePatterns (keep UI primitives directory such as packages/ui/src or src/components ignored if …
- Distinctive: line 63
Run the custom rule unit test suite:
- Distinctive: line 67
Run the linter and formatter check across the repo:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Oxlint Standard Setup
Install and maintain the standard strict oxlint + oxfmt configuration and custom 14-rule JS plugin (zstack/*) bundled in assets/oxlint/.
When to Use
- Bootstrapping linting and formatting in a new TypeScript / Bun repository
- Migrating an existing repo from ESLint/Prettier to
bun lint(oxlint) andbun fmt(oxfmt) - Adding, auditing, or testing custom JS lint rules in
tooling/oxlint/
Bundled Assets
assets/.oxlintrc.json— Strict baseline (correctness,suspicious,perf=error) withtypescript,unicorn,oxc,import, and all 14zstack/*custom rules.assets/.oxfmtrc.json— Standard ignore patterns forbun fmt.assets/oxlint/— Complete JS plugin (plugin.mjs), shared AST helpers (shared/), Bun test harness (testing/lint.mjs), and all 14 rules with unit tests (rules/*.mjs,rules/*.test.mjs):- Architecture & UI:
no-atom-import,no-barrel-file,no-base-ui-outside-ui,no-native-primitives - Code hygiene & style:
no-comments,padded-if,no-conditional-spread - Type safety & performance:
no-array-filter-map,no-chained-type-assertions,no-reduce-accumulator-copy,no-reflect-apply,no-reflect-get,no-unknown-type-aliases - Testing discipline:
no-module-mocking
- Architecture & UI:
Workflow
Resolve <skill-dir> to the directory containing this SKILL.md.
Step 1: Scaffold Config & Plugin
Run scripts/apply-oxlint.sh against the target repository (skips existing files unless --force is passed):
bash <skill-dir>/scripts/apply-oxlint.sh --repo .This installs:
tooling/oxlint/(plugin, 14 rules, unit tests, shared helpers).oxlintrc.json.oxfmtrc.json
Step 2: Tailor to Repository Layout
Inspect the target repo and adjust .oxlintrc.json if needed:
- Add repo-specific generated paths to
ignorePatterns(keep UI primitives directory such aspackages/ui/srcorsrc/componentsignored if wrapping native HTML elements). - For backend-only repos without React/Base UI/Jotai, keep the rules enabled (they are no-ops without matching files) or disable UI-only rules explicitly if requested.
- Wire root
package.jsonscripts:{ "scripts": { "lint": "bun lint", "lint:fix": "bun lint --fix", "format": "bun fmt", "format:check": "bun fmt --check" } }
Step 3: Verify Rules & Codebase
- Run the custom rule unit test suite:
bun test tooling/oxlint - Run the linter and formatter check across the repo:
bun lint && bun fmt --check - Fix any surfaced violations at the root rather than weakening rules.
Red Flags
- Weakening or disabling rules in
.oxlintrc.jsonto silence real violations instead of fixing code - Adding a new custom rule to
tooling/oxlint/rules/without a co-located*.test.mjsfile - Keeping ESLint or Prettier configs alongside
oxlint/oxfmtafter migration completes
Gotchas
zstack/no-chained-type-assertionsis intentionally relaxed only for test files (**/*.test.ts,**/*.test.tsx,e2e/**,**/testing/**) viaoverridesin.oxlintrc.json.zstack/no-commentspreserves tool directives (@ts-*,oxlint-disable,/// <reference>).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

