wanner.work|rules

Getting started

wanner.work/rules is a monorepo of opinionated configs and rule packs for building consistent React + TypeScript projects.

wanner.work/rules is a monorepo of opinionated configs and rule packs for building consistent React + TypeScript projects. Each package is published under the @wanner.work/* scope and can be installed independently.

The two packages in the repo today are:

  • @wanner.work/oxlint-rules — an oxlint config wrapper that bundles a set of rules for writing consistent code. It enforces the folder convention described below and a set of declaration-style rules (component shape, method exports, hook naming, etc.) so that every file in your project follows the same pattern.
  • @wanner.work/oxfmt-rules — an oxfmt config wrapper that bundles a set of formatting defaults. The wrapper is intentionally light: it ships opinionated values for the common layout and sorting options, and stays out of your way for everything else.

Folder convention

Every project that uses any @wanner.work/* rule pack is expected to follow a single folder convention: one src/ directory at the project root, with one well-named folder per kind of file. Components go in src/components/, hooks in src/hooks/, methods in src/methods/, interfaces in src/interfaces/, and so on. The rules are folder-scoped — a file only needs to follow the convention of the folder it lives in.

Not every folder is required. Add the ones that match what your project actually contains; the rules only fire on the folders that exist.

See the Folder convention page for the full tree and the detailed "what goes where" table.

Packages

On this page