Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:
- main
paths:
- website/**
- RULES.md
- docs/user-guide/**
- README.md
pull_request:
paths:
- website/**
- RULES.md
- docs/user-guide/**
- README.md

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

First stable release.

- 30 rules for Effect code, grouped by topic in [`RULES.md`](RULES.md): error channel, tagged values, services and Layers, runtime and entry point, design and boundaries, effectful functions, code shape, Schema, config and secrets. Three are absorbed from [`dmmulroy/anti-slop`](https://github.com/dmmulroy/anti-slop).
- 30 rules for Effect code, grouped by topic in [`docs/user-guide/rules.md`](docs/user-guide/rules.md): error channel, tagged values, services and Layers, runtime and entry point, design and boundaries, effectful functions, code shape, Schema, config and secrets. Three are absorbed from [`dmmulroy/anti-slop`](https://github.com/dmmulroy/anti-slop).
- An `all` preset that enables every rule at `warn`, for `oxlint.config.ts` and `.oxlintrc.json`.
- Shared settings under `settings["dl-effect"]`: `entryFiles`, `testFiles`, `discriminants`.
- Written for Effect 4; rules also recognize the Effect 3 name of the same API.
Expand Down
6 changes: 4 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ After any change, run `pnpm format && pnpm build-and-pack` and fix what it repor

Do not modify the logic or messages of `rules/anti-slop-*`: they are absorbed from `dmmulroy/anti-slop` and must stay resyncable. When a dl-effect rule covers the same case more strongly, retire the anti-slop rule instead.

When adding or editing a section of `RULES.md`, follow [`docs/rules-catalog-style.md`](docs/rules-catalog-style.md).
The rule catalog is one file per rule, `docs/user-guide/rules/<rule-name>.md`, listed in the rules index, `docs/user-guide/rules.md`. When adding or editing a rule file, follow [`docs/rules-catalog-style.md`](docs/rules-catalog-style.md).

The website (`website/`) parses `RULES.md` and `README.md` in its content module (`website/src/site-content/`) and fails its build when a rule section breaks the catalog template or a link resolves to no page: a change to the template or to the structure of `RULES.md` or `README.md` must update the content module and its tests (`cd website && pnpm test`). Each `##` section of `README.md` becomes a site page except Development, which addresses maintainers only.
The website (`website/`) is built from `docs/user-guide/` by its content module (`website/src/site-content/`). Each `docs/user-guide/` file is a page, titled and ordered by its frontmatter; `docs/user-guide/README.md` is the guide index and the landing page, `docs/user-guide/rules.md` the Rules overview, whose links order the rule pages; each rule file is a rule page in the group of its frontmatter. Links between guide files are relative `.md` paths. The build fails when a guide file's frontmatter is invalid, a rule file breaks the catalog template or is missing from the rules index, or a link resolves to no page: a change to the template, to the frontmatter or to the structure of the rules index must update the content module and its tests (`cd website && pnpm test`).

The README is the essential guide: introduction, installation, the happy path and the warnings that matter before adopting the plugin. It links to the website guide with absolute URLs and does not repeat it; anything else goes in `docs/user-guide/`. Maintainer docs go in `CONTRIBUTING.md`, which has no site page.

## Agent skills

Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Contributing

## Development

- `pnpm format`: formats with oxfmt; the only script that rewrites sources.
- `pnpm check`: format check, typecheck, lint and tests, writing nothing. The tests are the `RuleTester`s from `oxlint/plugins-dev` with `node --test`, plus a check that the rule catalog, `docs/user-guide/rules/`, has exactly one file per rule of the plugin.
- `pnpm build`: compiles to `dist/` and generates `dist/presets/all.json` from `presets/all.ts` (the rule list comes from the plugin).
- `pnpm pack:check`: checks the built preset, then the tarball `npm pack` would publish: only the files in `files`, no local absolute paths, `publint --strict`.
- `pnpm smoke-test`: installs the tarball in `smoke-fixture/` with pnpm and checks the diagnostics of oxlint with each config form: `oxlint.config.ts` and `.oxlintrc.json` with the preset, `.oxlintrc.json` with the plugin by package name.
- `pnpm build-and-pack`: `check`, `build`, `pack:check` and `smoke-test`; run it after every change.
- `pnpm release <bump>`: from a clean `main` equal to `origin/main`, runs `build-and-pack`, bumps with `npm version <bump> --preid rc` (`prerelease` for the next rc, `x.y.z` for a stable), publishes, then pushes the commit and the tag. A prerelease is `next`, and also `latest` until the first stable version; a stable version is `latest` and `next`. A failed publish undoes the bump. Without `<bump>`, prints the version in `package.json` and the npm dist-tags.
- `pnpm build:w`: reruns `pnpm build`, preset included, on every change to `index.ts`, `rules/`, `presets/`, `shared/` or `tsconfig.build.json`; a failed build waits for the next change.
- `pnpm consumer:link <consumer>`: after `pnpm build`, replaces the pnpm symlinks of the plugin in every workspace package of `<consumer>` with links to the checkout, so the consumer's own lint runs the checkout's rules; no tracked file of the consumer changes. `pnpm consumer:unlink <consumer>` restores them with `pnpm install --frozen-lockfile`, as does any `pnpm install` in the consumer.

A new rule must be registered in `index.ts`, documented in its rule file, `docs/user-guide/rules/<rule-name>.md` (see [`docs/rules-catalog-style.md`](docs/rules-catalog-style.md)), and linked from its topic in the rules index, `docs/user-guide/rules.md`; `pnpm build` adds it to the preset.
Loading
Loading