Shared configuration presets for typescript tooling. One package per tool, or all of them in a single install.
The presets ship as TypeScript and JSON source. There is no build step, so use them from a runtime or tool that can load .ts files from node_modules (Bun, or the tool's own loader).
| Package | Version | What it configures |
|---|---|---|
@configg/oxc |
oxfmt (/fmt) and oxlint (/lint) presets |
|
@configg/prettier |
Prettier presets and combine() |
|
@configg/tsconfig |
Strictest tsconfig presets for Bun and Vite |
|
@configg/bases (this repo's root) |
All of the above under one name, straight from packages/* |
Install only what you use, or install @configg/bases and import everything from it:
@configg/bases/… |
Same as |
|---|---|
oxfmt |
@configg/oxc/fmt |
oxlint |
@configg/oxc/lint |
prettier |
@configg/prettier |
tsconfig/{bun,client,vite} |
@configg/tsconfig/{bun,client,vite} |
Tools are peerDependencies: you install oxfmt, oxlint, prettier and typescript yourself and pin the versions you want, plus the Prettier plugins of the presets you compose. The packages only supply the presets.
bun add -d @configg/bases oxfmt oxlint oxlint-tsgolint typescript// oxfmt.config.ts
import { configs } from '@configg/bases/oxfmt'
import { defineConfig } from 'oxfmt'
export default defineConfig(configs.client)// oxlint.config.ts
import { configs } from '@configg/bases/oxlint'
import { defineConfig } from 'oxlint'
export default defineConfig(configs.client)Installing a single package works the same way, for example @configg/oxc/fmt and @configg/oxc/lint.
Every oxfmt and oxlint preset is a plain object, so you can pass it as is or spread it. Call .with() on a preset to deep-merge changes into it: nested objects merge, while arrays and other values replace the preset's. See Overriding a preset.
import { configs as fmt } from '@configg/bases/oxfmt'
// Spread
const spread = {
...fmt.client,
sortTailwindcss: { ...fmt.client.sortTailwindcss, stylesheet: './src/main.css' },
}
// Call: the same config
const called = fmt.client.with({ sortTailwindcss: { stylesheet: './src/main.css' } })oxfmtexportsconfigs:client(Tailwind class sorting, import grouping withreact,componentsandutilsgroups),scripts(shared base with import grouping, for tooling and config files) andserver(same asscripts). Built-ins, includingbunandbun:*, come first (afterreactinclient), then packages, internal and#/paths, and relative paths.oxlintexports two base presets inconfigs,client(browser env) andscripts(Node env), and add-on presets:react,vitest(Vitest and Testing Library rules for spec files),antiSlopandbunTest. List them inextends, base first:extends: [configs.client, react, vitest]. Before 0.1.17,clientincluded React and Vitest.prettierexportsconfig(the same options as oxfmt), one preset per plugin (sortImports,astro,svelte,tailwind) andcombine()to merge them:combine(config, sortImports, tailwind({ tailwindStylesheet: './src/main.css' })). See its README.tsconfig/bun(strictest+ Bun),tsconfig/vite(strictest+ Vite/React) andtsconfig/client(vitewith ambienttypescleared, so a package only picks up the@types/*it asks for).
The Oxlint presets don't enable anti-slop. antiSlop from the oxlint entry is an opt-in set with the plugin and all 18 rules as errors; unicorn/prefer-reflect-apply is off. See UPSTREAM.md for its source and update policy.
import { antiSlop, configs } from '@configg/bases/oxlint'
export default defineConfig({
extends: [configs.client, antiSlop],
})The plugin ships as TypeScript, so run oxlint under Bun (bunx --bun oxlint): Node refuses to strip types from files in node_modules.
bunTest from the oxlint entry is an opt-in preset for bun:test specs: a bun:test plugin whose five rules see describe, it and the hooks when they're imported from bun:test, which oxlint's built-in jest/vitest rules don't. Add it with extends: [bunTest]; it has no file glob and checks any file that imports from bun:test. See its docs.
Every preset goes in extends, base first: extends: [configs.client, antiSlop, bunTest]. The base presets keep their environment through extends. See Composing presets.
eslint-plugin-testing-library is only needed for the vitest add-on in the oxlint preset.
The repo uses its own packages through the workspace, so there is nothing to build. Formatting, linting, type-checking and git hooks run through Vite+ (vp), configured in vite.config.ts. vp needs Node.js (22.22.1+ or 24.11+) on PATH next to Bun, including when the pre-commit hook runs.
bun install # also installs the git hooks (.vite-hooks)
bun run check # vp check (fmt + lint + type-check), then the lockfile check