Skip to content

@xtarter/config

@xtarter/config ships the same lint and format rules xtarterize applies, as a package you extend instead of a config you own. It is Ultracite’s presets plus the xtarter layer:

  • 500 lines per file and 60 per function
  • block statements required (curly in Oxlint)
  • generic array syntax and kebab-case file names
  • single quotes, and the same import groups in Biome and Oxfmt: built-ins and packages, then aliases (@/, #, ~, $, %), then relative paths
  • console limited to info, warn, and error (Oxlint)
  • test files get it() at the top level and test() inside describe()

Use it directly when you want conformance without tinkering. xtarterize writes configs that extend it by default too; run xtarterize init --eject instead when you want the whole rule set written into your project so you can edit every rule.

Terminal window
npm i -D @biomejs/biome @xtarter/config
biome.json
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["@xtarter/config/biome/core", "@xtarter/config/biome/react"]
}

Add your own files.includes, vcs, or CSS parser settings alongside extends; the package leaves project-specific settings out.

Terminal window
npm i -D oxlint @xtarter/config
oxlint.config.ts
import { defineConfig } from 'oxlint';
import core from '@xtarter/config/oxlint/core';
import react from '@xtarter/config/oxlint/react';
export default defineConfig({
extends: [core, react],
env: { node: true },
});

Oxlint’s JSON config cannot extend npm packages, so use oxlint.config.ts (or .js/.mjs). TypeScript configs need Node.js 22.18 or newer.

Terminal window
npm i -D oxfmt @xtarter/config
oxfmt.config.ts
import { defineConfig } from 'oxfmt';
import xtarter from '@xtarter/config/oxfmt';
export default defineConfig({
...xtarter,
});

Vite+ reads Oxlint and Oxfmt settings from the lint and fmt blocks of vite.config.ts and ignores oxlint.config.ts and oxfmt.config.ts, so put the entries there:

Terminal window
npm i -D @xtarter/config
vite.config.ts
import xtarterFmt from '@xtarter/config/oxfmt';
import xtarterCore from '@xtarter/config/oxlint/core';
import xtarterReact from '@xtarter/config/oxlint/react';
import { defineConfig } from 'vite-plus';
export default defineConfig({
fmt: {
...xtarterFmt,
},
lint: {
env: { node: true },
extends: [xtarterCore, xtarterReact],
},
});

Every Biome and Oxlint entry extends the Ultracite preset of the same name. List core first, then the layers for your stack; later layers win, so framework exceptions (such as route file names in Remix or TanStack) apply.

Tool Entries
Biome core, angular, astro, cypress, drizzle, jest, nestjs, next, playwright, qwik, react, react-native, remix, solid, storybook, svelte, tanstack, type-aware, vitest, vue
Oxlint core, angular, anti-slop, astro, cypress, drizzle, gdp, jest, js-plugins, landmines, nestjs, next, playwright, qwik, react, react-native, remix, shadcn, solid, storybook, svelte, tanstack, vitest, vue
Oxfmt @xtarter/config/oxfmt (no layers)

Extend these when you want stricter rules and accept a slower lint pass, since each runs through Oxlint’s JS plugins. xtarterize adds only landmines, and only to an Oxlint config it creates; it never adds a layer to an existing config.

Layer What it catches Install
anti-slop Unjustified type assertions, unknown leaking through signatures, module mocking, and similar escape hatches (anti-slop) Nothing extra
landmines Shortcuts coding agents take to get a green check: mocking the code under test, fixed sleeps, retries, raised timeouts, and comments narrating the diff (landmines) @interfere/landmines 0.1.1 or newer
gdp Forged authorization proofs (gdp-ts) @gdp-ts/core
shadcn Tailwind v4 classes that break your components, variants, or theme (@shadcn/lint) @shadcn/lint
js-plugins Rules Oxlint lacks natively, from eslint-plugin-github, eslint-plugin-sonarjs, and React Doctor eslint-plugin-github, eslint-plugin-sonarjs, oxlint-plugin-react-doctor

Repeat the layer’s jsPlugins at the root of your config. Oxlint loads the plugins through extends either way, but tools such as Knip read jsPlugins only from the root and would otherwise report the plugin package as unused:

Terminal window
npm i -D oxlint @xtarter/config @interfere/landmines
oxlint.config.ts
import { defineConfig } from 'oxlint';
import core from '@xtarter/config/oxlint/core';
import landmines from '@xtarter/config/oxlint/landmines';
export default defineConfig({
extends: [core, landmines],
env: { node: true },
jsPlugins: landmines.jsPlugins,
});

landmines is opinionated beyond tests. It rejects comments other than directives, WARNING: and SAFETY: notes, and TSDoc on exported API; annotated return types; and .spec.ts file names. Turn landmines-structure/test-file-names off for frameworks whose convention is .spec.ts, such as Playwright, Cypress, Angular, and NestJS.

Each release pins one Ultracite version, so a given @xtarter/config version always means the same rules.

Change Release
New or stricter rule, including an Ultracite upgrade Minor
Relaxed rule or fix Patch
Removed entry, or a new major version of Biome, Oxlint, or Oxfmt required Major

Minor releases can add errors to your project; their release notes name the rules they add.

ESLint and Prettier entries are not published. xtarter supports only Biome and the Oxc tools.