Skip to content

2BAD/axiom

Repository files navigation

Axiom

A shared oxlint config for TypeScript projects.

Overview

Axiom is a curated, opinionated set of oxlint rules — the linting distilled from years of ESLint configs, now running on the OXC toolchain. Drop it into oxlint.config.ts and get a sensible baseline without picking rules one by one.

Covers 137 rules across 9 plugins: eslint, typescript, oxc, import, jsdoc, promise, node, unicorn, and vitest/jest (scoped to test files).

Install

pnpm add -D @2bad/axiom oxlint

oxlint is a peer dependency. Version >= 1.60 is required.

Usage

Create oxlint.config.ts in your project root:

import { axiom } from '@2bad/axiom'
import { defineConfig } from 'oxlint'

export default defineConfig({ extends: [axiom] })

Add lint scripts to package.json:

{
  "scripts": {
    "check": "oxlint ./source",
    "fix": "oxlint --fix ./source"
  }
}

Overriding rules

extends merges — add your own rules, overrides, or ignorePatterns alongside and they win:

import { axiom } from '@2bad/axiom'
import { defineConfig } from 'oxlint'

export default defineConfig({
  extends: [axiom],
  rules: {
    'typescript/no-explicit-any': 'off'
  }
})

Formatting

Axiom only handles linting. Pair with oxfmt for formatting — all stylistic concerns (quotes, indentation, semis, spacing) live there, not in the lint rules.

Why "Axiom"?

In mathematics, an axiom is a statement taken to be true without proof. These rules are the baseline; debate ends here.

Contributing

Contributions welcome. See issues or submit a PR.

About

Effortless TypeScript linting with zero configuration, inspired by standard

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Generated from 2BAD/ts-lib-starter