Skip to content

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

shell
bunx shadcn@latest add @krak-stack/lint-format

Included 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 plugin
  • tools/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 of bunfig.toml; no formatter dependency or package script is needed
  • Enables sortTailwindcss for shadcn/Tailwind projects
  • Disables eslint/require-yield because 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:

shell
bunx shadcn@latest add @krak-stack/lint-format

If you already have a bunfig.toml, merge its existing sections with the supplied [fmt] section rather than replacing unrelated settings.

Format directly with Bun:

shell
bun fmt

Run checks locally or in CI:

shell
bun fmt --check
bunx oxlint
Dependencies
Packages and shadcn components required by this registry item.

Dev Dependencies

Preview

Lint & Format Config
Bun formatter and Oxlint configuration files for KrakStack projects.
bunfig.toml
toml
[fmt]
printWidth = 80
sortPackageJson = true
sortTailwindcss = true
svelte = false
.oxlintrc.json
json
{
  "$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
      }
    }
  ]
}