Configuration · Reference
Lint & Format Config
Production-ready Bun formatter and Oxlint configuration for KrakStack projects, including vendored anti-slop rules, Tailwind class sorting, and React/TypeScript correctness checks.
Last updated October 22, 2026
Overview
lint-format installs root-level Bun formatter and Oxlint configuration for KrakStack projects. It includes editable source for KrakStack's Oxlint plugin, initially based on anti-slop's opinionated rules for rejecting low-evidence TypeScript and JavaScript patterns. The plugin is vendored so each project can inspect, customize, and extend its rules.
Install
bunx shadcn@latest add @krak-stack/lint-formatIncluded Files
bunfig.toml— Bun formatter config with 80-column formatting, package key sorting, and Tailwind CSS class sorting.oxlintrc.json— Oxlint config for React, TypeScript, browser, Node, and the vendored plugintools/oxlint/anti-slop/— editable Oxlint plugin source and shared rule utilities
Choices
- Vendors plugin source instead of coupling projects to a fixed lint package release
- Enables all anti-slop rules as errors
- Ignores installed agent tooling and the plugin source itself
- Uses Bun's built-in formatter with settings in the
[fmt]section ofbunfig.toml; no formatter dependency or package script is needed - Enables
sortTailwindcssfor shadcn/Tailwind projects - Disables
eslint/require-yieldbecause Effect uses generator functions as a DSL - Enables Vitest globals only in test files
Usage
Use Bun 1.4.4 or later. Install the registry item:
bunx shadcn@latest add @krak-stack/lint-formatIf you already have a bunfig.toml, merge its existing sections with the supplied [fmt] section rather than replacing unrelated settings.
Format directly with Bun:
bun fmtRun checks locally or in CI:
bun fmt --check
bunx oxlintDev Dependencies
Preview
[fmt]
printWidth = 80
sortPackageJson = true
sortTailwindcss = true
svelte = false
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "unicorn", "oxc", "eslint", "react"],
"ignorePatterns": [
".agent/**",
".agents/**",
".claude/**",
".codex/**",
".continue/**",
".cursor/**",
".gemini/**",
".opencode/**",
".pi/**",
".roo/**",
".windsurf/**",
"tools/oxlint/anti-slop/**"
],
"jsPlugins": [
{
"name": "anti-slop",
"specifier": "./tools/oxlint/anti-slop/index.ts"
}
],
"categories": {
"correctness": "error"
},
"env": {
"builtin": true,
"browser": true,
"node": true
},
"rules": {
"eslint/require-yield": "off",
"anti-slop/no-chained-type-assertions": "error",
"anti-slop/no-conditional-empty-object-spread": "error",
"anti-slop/no-known-value-widening": "error",
"anti-slop/no-module-mocking": "error",
"anti-slop/no-object-parameters": "error",
"anti-slop/no-reflect-apply": "error",
"anti-slop/no-reflect-get": "error",
"anti-slop/no-runtime-typeof": "error",
"anti-slop/no-shape-in-symbol-names": "error",
"anti-slop/no-unknown-parameters": "error",
"anti-slop/no-unknown-returns": "error",
"anti-slop/no-unknown-type-aliases": "error",
"anti-slop/no-unsafe-dictionary-type": "error",
"anti-slop/no-widen-then-assert": "error",
"anti-slop/require-safety-comment-for-type-assertion": "error"
},
"overrides": [
{
"files": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.spec.ts",
"**/*.spec.tsx"
],
"env": {
"vitest": true
}
}
]
}