@genesislcap/oxlint-config
Published Oxlint rules for Genesis Foundation UI. This monorepo's own lint pipeline (npm run lint) runs Oxlint only — Oxlint → Oxfmt → Stylelint. @genesislcap/eslint-config still exists and remains available for other packages/consumers that opt in to ESLint for stricter or type-aware checks Oxlint doesn't cover (see its README and the Import rules and ESLint section below for the specific gaps), but it is no longer part of this repo's own build/CI.
What it does
- Ships
.oxlintrc.json— the only file you should edit for Oxlint rule changes in this product line. - Does not format code. Formatting is Oxfmt — config lives in the root
.oxfmtrc.json(copy it to your app, no extra package needed).
How it runs in the monorepo
npm run lint/genx lintruns Oxlint (first, before Oxfmt and Stylelint) from the current working directory.- The repo root has a small
.oxlintrc.jsonthat onlyextendsthis package sooxlintfinds the same rules from the workspace root. - Nested apps that run
genx lintfrom their own folder may need a local stubextends(see Consumption) so config resolves correctly.
Import rules and ESLint
Oxlint loads eslint-plugin-import as a JS plugin under the alias import-es (avoids clashing with Oxlint’s built-in import plugin). In this config, import-es covers newline-after-import, no-self-import, no-useless-path-segments (warn), no-duplicates (warn), and no-extraneous-dependencies (error).
Import ordering is handled by import-es/order with the same groups and alphabetize config as @genesislcap/eslint-config, so both linters enforce identical ordering. import-es/first is disabled (redundant with import-es/order).
Native Oxlint import/* rules used here include no-absolute-path and no-mutable-exports — do not duplicate those as import-es/*.
JS plugins are alpha in Oxlint; type-aware TypeScript rules (e.g. @typescript-eslint/no-shadow) still require ESLint (upstream limits). Two rare-trigger core rules, no-unreachable-loop and require-atomic-updates, also have no Oxlint implementation yet.
When to run ESLint as well: in a package that depends on @genesislcap/eslint-config, use genx lint -l eslint (or that package's own lint:eslint/lint:with-eslint script, if defined) when you need type-aware @typescript-eslint/* rules or finer import/* behavior. This monorepo's own root pipeline no longer runs ESLint, so those remaining gaps aren't enforced here — only in packages that opt in.
Consumption
In this repository: change rules only in this package’s .oxlintrc.json. Keep the root stub in sync with the extends pattern below.
Downstream: installing @genesislcap/oxlint-config automatically brings in oxlint, oxfmt, and the required ESLint plugins as bundled dependencies — no separate installs needed. At your app root, add:
{
"devDependencies": {
"@genesislcap/oxlint-config": "latest"
}
}
Then create .oxlintrc.json:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"extends": ["./node_modules/@genesislcap/oxlint-config/.oxlintrc.json"]
}
And copy .oxfmtrc.json from the foundation-ui repo for Oxfmt config (no extra package needed).
If you run Oxlint only from a subfolder of a monorepo, ensure a .oxlintrc.json in that folder can resolve the shared config (for example by extending a path or package that exists from that directory).
Bundled dependencies
Shipped as dependencies in package.json so they install automatically:
oxlintoxfmteslint-import-resolver-typescripteslint-plugin-importeslint-plugin-unused-imports