@tractorbeam/oxlint-config
v0.4.0
Published
Shared Oxlint configuration for Tractorbeam projects
Maintainers
Readme
@tractorbeam/oxlint-config
Shared Oxlint configuration for Tractorbeam projects.
The preset enables every rule from anti-slop at error severity. The plugin is built from a pinned GitHub dependency and registered automatically; its source is not vendored into this repository.
Install
pnpm add -D @tractorbeam/oxlint-config vite-plusUsage with Vite+
import { defineConfig } from "vite-plus";
import oxlintConfig from "@tractorbeam/oxlint-config";
export default defineConfig({
lint: oxlintConfig(),
});React, React Performance, and JSX accessibility plugins and rules are enabled by default. Disable them for projects that do not use React:
The React preset also enables Tractorbeam's UI rules. These warn when a Button uses fixed Tailwind sizing utilities instead of its size prop, or when an icon nested inside a Button has its own className. Icon detection supports *Icon component names, Icons.* members, Lucide, and imports from packages or local modules whose specifier contains icon.
export default defineConfig({
lint: oxlintConfig({ react: false }),
});The shared configuration enables type-aware linting and TypeScript checking. It also warns when a file exceeds 1,000 lines or a function exceeds 150 lines.
Compose repository-specific rules, ignores, and overrides in vite.config.ts:
const lint = oxlintConfig();
export default defineConfig({
lint: {
...lint,
ignorePatterns: ["generated/**"],
rules: {
...lint.rules,
"no-console": "off",
},
},
});