Strict configurations for oxlint, oxfmt, TypeScript and VSCode.
This package provides opinionated, strict configurations for modern JavaScript/TypeScript development. It includes:
- oxlint configs (base, react, vue, svelte)
- oxfmt configs (base)
- TypeScript configs
Run the installer in your project root:
bunx @cstrlcs/configs installThis will:
- Install
@cstrlcs/configs,oxlint,oxlint-tsgolint, andoxfmtas dev dependencies - Create
oxlint.config.tsandoxfmt.config.ts - Create
tsconfig.jsonextending the base config - Add
lintandlint:fixscripts topackage.json - Write
.gitattributeswith LF line endings - Copy
.vscode/settings.jsonand.vscode/extensions.json
Check that your project is correctly set up:
bunx @cstrlcs/configs doctorThis verifies .gitattributes, tsconfig.json, package.json scripts, .vscode files, and that all required packages are installed.
bun add -D @cstrlcs/configs oxlint oxlint-tsgolint oxfmtoxlint.config.ts:
import { defineConfig } from "oxlint";
import config from "@cstrlcs/configs/oxlint/base.ts";
export default defineConfig(config);oxfmt.config.ts:
import { defineConfig } from "oxfmt";
import config from "@cstrlcs/configs/oxfmt/base.ts";
export default defineConfig(config);tsconfig.json:
{
"extends": "@cstrlcs/configs/tsconfig/base.json",
"compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./src/*"] } },
"include": ["src"]
}package.json scripts:
{
"scripts": {
"lint": "oxlint .",
"lint:fix": "oxlint --fix && oxfmt"
}
}This project was originally inspired by Anthony Fu's ESLint config. Many of the rules and configurations were copied/adapted from his work before migrating to oxc.