@doubleloop-io/oxlint-plugin-effect 0.0.0-stage → 0.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.anti-slop +21 -0
  3. package/README.md +216 -2
  4. package/RULES.md +931 -0
  5. package/dist/index.d.ts +6 -0
  6. package/dist/index.js +75 -0
  7. package/dist/presets/all.d.ts +7 -0
  8. package/dist/presets/all.js +9 -0
  9. package/dist/presets/all.json +38 -0
  10. package/dist/rules/adapter-import-boundary.d.ts +7 -0
  11. package/dist/rules/adapter-import-boundary.js +103 -0
  12. package/dist/rules/all-errors-handled-at-boundary.d.ts +1 -0
  13. package/dist/rules/all-errors-handled-at-boundary.js +111 -0
  14. package/dist/rules/anti-slop-no-manual-effect-error-tag.d.ts +1 -0
  15. package/dist/rules/anti-slop-no-manual-effect-error-tag.js +32 -0
  16. package/dist/rules/anti-slop-no-service-constructor-imports.d.ts +1 -0
  17. package/dist/rules/anti-slop-no-service-constructor-imports.js +49 -0
  18. package/dist/rules/anti-slop-prefer-effect-match.d.ts +1 -0
  19. package/dist/rules/anti-slop-prefer-effect-match.js +45 -0
  20. package/dist/rules/error-handling-in-effect-fn-handler.d.ts +1 -0
  21. package/dist/rules/error-handling-in-effect-fn-handler.js +144 -0
  22. package/dist/rules/exported-schema-identifier.d.ts +1 -0
  23. package/dist/rules/exported-schema-identifier.js +117 -0
  24. package/dist/rules/no-asymmetric-match-handlers.d.ts +1 -0
  25. package/dist/rules/no-asymmetric-match-handlers.js +74 -0
  26. package/dist/rules/no-bare-error-in-effect.d.ts +1 -0
  27. package/dist/rules/no-bare-error-in-effect.js +49 -0
  28. package/dist/rules/no-effect-promise.d.ts +1 -0
  29. package/dist/rules/no-effect-promise.js +57 -0
  30. package/dist/rules/no-effect-return-type.d.ts +1 -0
  31. package/dist/rules/no-effect-return-type.js +130 -0
  32. package/dist/rules/no-inline-schema-codec.d.ts +1 -0
  33. package/dist/rules/no-inline-schema-codec.js +46 -0
  34. package/dist/rules/no-inline-yield-star.d.ts +1 -0
  35. package/dist/rules/no-inline-yield-star.js +230 -0
  36. package/dist/rules/no-manual-discriminant-comparison.d.ts +2 -0
  37. package/dist/rules/no-manual-discriminant-comparison.js +81 -0
  38. package/dist/rules/no-manual-discriminant-construction.d.ts +2 -0
  39. package/dist/rules/no-manual-discriminant-construction.js +132 -0
  40. package/dist/rules/no-nested-match.d.ts +1 -0
  41. package/dist/rules/no-nested-match.js +24 -0
  42. package/dist/rules/no-parameterless-catch-all.d.ts +1 -0
  43. package/dist/rules/no-parameterless-catch-all.js +29 -0
  44. package/dist/rules/no-provide-on-definition.d.ts +1 -0
  45. package/dist/rules/no-provide-on-definition.js +123 -0
  46. package/dist/rules/no-transport-types-in-generator.d.ts +1 -0
  47. package/dist/rules/no-transport-types-in-generator.js +63 -0
  48. package/dist/rules/no-yielded-match.d.ts +1 -0
  49. package/dist/rules/no-yielded-match.js +91 -0
  50. package/dist/rules/prefer-effect-fn.d.ts +1 -0
  51. package/dist/rules/prefer-effect-fn.js +102 -0
  52. package/dist/rules/prefer-effect-vitest.d.ts +1 -0
  53. package/dist/rules/prefer-effect-vitest.js +52 -0
  54. package/dist/rules/provide-named-layer.d.ts +1 -0
  55. package/dist/rules/provide-named-layer.js +55 -0
  56. package/dist/rules/redacted-secret-names.d.ts +1 -0
  57. package/dist/rules/redacted-secret-names.js +125 -0
  58. package/dist/rules/run-only-in-runner.d.ts +1 -0
  59. package/dist/rules/run-only-in-runner.js +40 -0
  60. package/dist/rules/service-built-with-of.d.ts +1 -0
  61. package/dist/rules/service-built-with-of.js +74 -0
  62. package/dist/rules/service-key-matches-name.d.ts +1 -0
  63. package/dist/rules/service-key-matches-name.js +69 -0
  64. package/dist/rules/service-port-shape-only.d.ts +1 -0
  65. package/dist/rules/service-port-shape-only.js +65 -0
  66. package/dist/rules/single-style-per-function.d.ts +1 -0
  67. package/dist/rules/single-style-per-function.js +145 -0
  68. package/dist/rules/try-object-form.d.ts +1 -0
  69. package/dist/rules/try-object-form.js +26 -0
  70. package/dist/rules/untraced-recursion.d.ts +1 -0
  71. package/dist/rules/untraced-recursion.js +48 -0
  72. package/dist/shared/effect-ast.d.ts +10 -0
  73. package/dist/shared/effect-ast.js +63 -0
  74. package/dist/shared/effect-runners.d.ts +2 -0
  75. package/dist/shared/effect-runners.js +14 -0
  76. package/dist/shared/entry-files.d.ts +6 -0
  77. package/dist/shared/entry-files.js +5 -0
  78. package/dist/shared/file-globs.d.ts +14 -0
  79. package/dist/shared/file-globs.js +17 -0
  80. package/dist/shared/match-ast.d.ts +5 -0
  81. package/dist/shared/match-ast.js +52 -0
  82. package/dist/shared/tagged-values.d.ts +17 -0
  83. package/dist/shared/tagged-values.js +67 -0
  84. package/dist/shared/test-files.d.ts +6 -0
  85. package/dist/shared/test-files.js +10 -0
  86. package/package.json +60 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 doubleloop.io
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dillon Mulroy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,217 @@
1
- # Temporary Holding Version
1
+ # @doubleloop-io/oxlint-plugin-effect
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ An oxlint plugin that enforces a catalog of patterns for Effect 4 code.
4
+
5
+ The rules are written and tested against Effect 4. On an Effect 3 codebase most of them do not recognize the APIs and stay silent: silence there is not compliance.
6
+
7
+ ## Install `@effect/tsgo` first
8
+
9
+ [`@effect/tsgo`](https://github.com/Effect-TS/tsgo) is the official Effect language service on top of the TypeScript Go compiler; its `effecttsgo` oxlint presets ship more than 100 type-aware rules. This plugin is meant to be used alongside them: its rules target what those presets do not check. Set it up with its [Oxlint Setup guide](https://github.com/Effect-TS/tsgo/blob/main/docs/README.md) and put its `extends` **before** this plugin's preset, which does not include it.
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ pnpm add -D @doubleloop-io/oxlint-plugin-effect oxlint
15
+ ```
16
+
17
+ Requires Node `^22.20.0 || >=24.8.0` and oxlint `^1.82.0`.
18
+
19
+ ## Configuration
20
+
21
+ Extend the `all` preset. Prefer `oxlint.config.ts`, where `extends` takes config objects and the preset is imported by package name:
22
+
23
+ ```ts
24
+ import dlEffectAll from "@doubleloop-io/oxlint-plugin-effect/presets/all"
25
+ import { defineConfig } from "oxlint"
26
+
27
+ export default defineConfig({ extends: [dlEffectAll] })
28
+ ```
29
+
30
+ With `.oxlintrc.json`, `extends` takes file paths only, so the preset is reached through `node_modules`:
31
+
32
+ ```json
33
+ {
34
+ "extends": ["./node_modules/@doubleloop-io/oxlint-plugin-effect/dist/presets/all.json"]
35
+ }
36
+ ```
37
+
38
+ `all` enables every rule at `warn`, so adopting it never breaks a build: look at the warnings first, then raise to `error` the rules you want to enforce. A `recommended` preset with reasoned severities will come from measurements on real codebases.
39
+
40
+ To pick rules without the preset, load the plugin by package name and list the rules:
41
+
42
+ ```json
43
+ {
44
+ "jsPlugins": ["@doubleloop-io/oxlint-plugin-effect"],
45
+ "rules": {
46
+ "dl-effect/no-effect-promise": "error",
47
+ "dl-effect/try-object-form": "error"
48
+ }
49
+ }
50
+ ```
51
+
52
+ ### Configuration options
53
+
54
+ Two options tell the rules where your files are. Their defaults fit a Node CLI; on another layout (Next.js, a monorepo) set them before reading the warnings.
55
+
56
+ - `entryFiles`: the files allowed to run Effects and import adapters. Default `**/main.ts`, `**/cli.ts`, `**/bin/**`. Used by `run-only-in-runner` and `adapter-import-boundary`.
57
+ - `testFiles`: the test files, exempt from the rules that tests legitimately break and the only files `prefer-effect-vitest` checks. Default `**/*.test.*`, `**/*.spec.*`, `**/__tests__/**`, `**/test/**`, `**/tests/**`. Used by `run-only-in-runner`, `prefer-effect-vitest`, `adapter-import-boundary`, `no-effect-promise`, `provide-named-layer`, `no-provide-on-definition`, `error-handling-in-effect-fn-handler`, `all-errors-handled-at-boundary` and `anti-slop-no-service-constructor-imports`.
58
+
59
+ Set an option only where its default does not fit. It **replaces** the default instead of extending it, and every rule that uses it must get the same value. With `oxlint.config.ts`, declare it once and override the rules that use it after `extends`:
60
+
61
+ ```ts
62
+ import dlEffectAll from "@doubleloop-io/oxlint-plugin-effect/presets/all"
63
+ import { defineConfig } from "oxlint"
64
+
65
+ const entryFiles = ["apps/web/src/app/**/route.ts", "apps/web/src/runtime.ts"]
66
+
67
+ export default defineConfig({
68
+ extends: [dlEffectAll],
69
+ rules: {
70
+ "dl-effect/run-only-in-runner": ["warn", { entryFiles }],
71
+ "dl-effect/adapter-import-boundary": ["warn", { entryFiles }],
72
+ },
73
+ })
74
+ ```
75
+
76
+ The package exports the defaults as `defaultEntryFiles` and `defaultTestFiles`: spread them to extend a default (`testFiles: [...defaultTestFiles, "e2e/**"]`), or reuse them in your own `overrides`. With `.oxlintrc.json` the overrides go under `rules`, repeating each list in every rule.
77
+
78
+ The other options and every default are in [Default configuration](#default-configuration).
79
+
80
+ ### Alongside `@effect/tsgo` (optional)
81
+
82
+ [`@effect/tsgo`](https://github.com/Effect-TS/tsgo) is the official Effect language service on top of the TypeScript Go compiler; its `effecttsgo` oxlint presets add more than 100 type-aware rules. This plugin does not need it, and its rules target what those presets do not check, so the two complement each other. To use both, follow its [Oxlint Setup guide](https://github.com/Effect-TS/tsgo/blob/main/docs/README.md) and put its preset in `extends` **before** `all`:
83
+
84
+ ```ts
85
+ import dlEffectAll from "@doubleloop-io/oxlint-plugin-effect/presets/all"
86
+ import { recommended as effectTsgoRecommended } from "@effect/tsgo/oxlint-presets"
87
+ import { defineConfig } from "oxlint"
88
+
89
+ export default defineConfig({ extends: [effectTsgoRecommended, dlEffectAll] })
90
+ ```
91
+
92
+ ```json
93
+ {
94
+ "extends": [
95
+ "./node_modules/@effect/tsgo/oxlint-presets/recommended.json",
96
+ "./node_modules/@doubleloop-io/oxlint-plugin-effect/dist/presets/all.json"
97
+ ]
98
+ }
99
+ ```
100
+
101
+ ## Rules
102
+
103
+ What each rule reports and why is in [`RULES.md`](RULES.md).
104
+
105
+ | Topic | Rules |
106
+ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
107
+ | Error channel | [`no-bare-error-in-effect`](RULES.md#no-bare-error-in-effect), [`try-object-form`](RULES.md#try-object-form), [`no-effect-promise`](RULES.md#no-effect-promise), [`no-parameterless-catch-all`](RULES.md#no-parameterless-catch-all), [`error-handling-in-effect-fn-handler`](RULES.md#error-handling-in-effect-fn-handler), [`anti-slop-no-manual-effect-error-tag`](RULES.md#anti-slop-no-manual-effect-error-tag) |
108
+ | Tagged values | [`no-manual-discriminant-comparison`](RULES.md#no-manual-discriminant-comparison), [`no-manual-discriminant-construction`](RULES.md#no-manual-discriminant-construction) |
109
+ | Services & Layers | [`service-port-shape-only`](RULES.md#service-port-shape-only), [`service-key-matches-name`](RULES.md#service-key-matches-name), [`service-built-with-of`](RULES.md#service-built-with-of), [`provide-named-layer`](RULES.md#provide-named-layer), [`no-provide-on-definition`](RULES.md#no-provide-on-definition), [`anti-slop-no-service-constructor-imports`](RULES.md#anti-slop-no-service-constructor-imports) |
110
+ | Runtime & entrypoint | [`run-only-in-runner`](RULES.md#run-only-in-runner), [`all-errors-handled-at-boundary`](RULES.md#all-errors-handled-at-boundary) |
111
+ | Design & boundaries | [`adapter-import-boundary`](RULES.md#adapter-import-boundary), [`no-transport-types-in-generator`](RULES.md#no-transport-types-in-generator) |
112
+ | Effectful functions | [`prefer-effect-fn`](RULES.md#prefer-effect-fn), [`untraced-recursion`](RULES.md#untraced-recursion), [`single-style-per-function`](RULES.md#single-style-per-function) |
113
+ | Code shape | [`no-nested-match`](RULES.md#no-nested-match), [`no-yielded-match`](RULES.md#no-yielded-match), [`no-inline-yield-star`](RULES.md#no-inline-yield-star), [`no-effect-return-type`](RULES.md#no-effect-return-type), [`no-asymmetric-match-handlers`](RULES.md#no-asymmetric-match-handlers), [`anti-slop-prefer-effect-match`](RULES.md#anti-slop-prefer-effect-match) |
114
+ | Schema | [`exported-schema-identifier`](RULES.md#exported-schema-identifier), [`no-inline-schema-codec`](RULES.md#no-inline-schema-codec) |
115
+ | Config & secrets | [`redacted-secret-names`](RULES.md#redacted-secret-names) |
116
+
117
+ ### Absorbed from anti-slop
118
+
119
+ The `anti-slop-*` rules come from the five Effect rules of [`dmmulroy/anti-slop`](https://github.com/dmmulroy/anti-slop) (plugin `anti-slop-effect`, commit [`c44ef22`](https://github.com/dmmulroy/anti-slop/tree/c44ef22ca116d0ba62a3ff663a0bd13a3f3fa40b/src/effect)), ported into this plugin; its generic TypeScript rules stay out. `no-manual-tag-comparison` and `no-manual-tagged-construction` are retired: [`no-manual-discriminant-comparison`](RULES.md#no-manual-discriminant-comparison) and [`no-manual-discriminant-construction`](RULES.md#no-manual-discriminant-construction) cover them with their default. In the others, detection logic and messages are unchanged; [`anti-slop-no-service-constructor-imports`](RULES.md#anti-slop-no-service-constructor-imports) recognizes test files through the shared [`testFiles`](RULES.md#file-options) option instead of its own `*.test.*`/`*.spec.*` check. Do not enable the `anti-slop-effect` plugin alongside this one: every finding would be reported twice. The original code is MIT-licensed: see [`LICENSE.anti-slop`](LICENSE.anti-slop).
120
+
121
+ ## Default configuration
122
+
123
+ `all` is equivalent to the config below, with every option spelled out at its default. File options **replace** the defaults instead of extending them, and every rule sharing an option must get the same value: see [File options](RULES.md#file-options).
124
+
125
+ ```ts
126
+ import { defineConfig } from "oxlint"
127
+
128
+ // Files allowed to run Effects (Effect.run*, runMain, ManagedRuntime.make) and to import
129
+ // adapters. `index.ts` is left out on purpose: as a barrel it would let adapters leak
130
+ // through re-exports.
131
+ const entryFiles = ["**/main.ts", "**/cli.ts", "**/bin/**"]
132
+
133
+ // Files exempt from the rules that tests legitimately break. Helper directories such as
134
+ // `src/testing/` are support code, not tests, so they are not matched.
135
+ const testFiles = ["**/*.test.*", "**/*.spec.*", "**/__tests__/**", "**/test/**", "**/tests/**"]
136
+
137
+ // Constructors that must not appear inside an Effect generator: the conversion to the
138
+ // transport belongs in the second argument of Effect.fn. Add your own transport DTOs.
139
+ const transportTypes = ["Response", "NextResponse"]
140
+
141
+ // Fields that discriminate a closed union, compared or switched on only through an exhaustive
142
+ // match and set only by a constructor. Add the ones your unions use, such as `type` or `kind`.
143
+ const discriminants = ["_tag"]
144
+
145
+ // Schema fields holding a secret: a field matches an entry or ends with it capitalized
146
+ // (`password` matches `dbPassword`). No generic `token`: `nextPageToken` is not a secret.
147
+ const secretFields = ["password", "secret", "apiKey", "accessToken", "refreshToken", "idToken"]
148
+
149
+ export default defineConfig({
150
+ jsPlugins: ["@doubleloop-io/oxlint-plugin-effect"],
151
+ // Every rule at `warn`, to measure noise without blocking.
152
+ rules: {
153
+ // Error channel
154
+ "dl-effect/no-bare-error-in-effect": "warn",
155
+ "dl-effect/try-object-form": "warn",
156
+ "dl-effect/no-effect-promise": ["warn", { testFiles }],
157
+ "dl-effect/no-parameterless-catch-all": "warn",
158
+ "dl-effect/error-handling-in-effect-fn-handler": ["warn", { testFiles }],
159
+ "dl-effect/all-errors-handled-at-boundary": ["warn", { testFiles }],
160
+ "dl-effect/anti-slop-no-manual-effect-error-tag": "warn",
161
+ // Tagged values
162
+ "dl-effect/no-manual-discriminant-comparison": ["warn", { discriminants }],
163
+ "dl-effect/no-manual-discriminant-construction": ["warn", { discriminants }],
164
+ // Services & Layers
165
+ "dl-effect/service-port-shape-only": "warn",
166
+ "dl-effect/service-key-matches-name": "warn",
167
+ "dl-effect/service-built-with-of": "warn",
168
+ "dl-effect/provide-named-layer": ["warn", { testFiles }],
169
+ "dl-effect/no-provide-on-definition": ["warn", { testFiles }],
170
+ "dl-effect/anti-slop-no-service-constructor-imports": ["warn", { testFiles }],
171
+ // Runtime & entrypoint
172
+ "dl-effect/run-only-in-runner": ["warn", { entryFiles, testFiles }],
173
+ "dl-effect/prefer-effect-vitest": ["warn", { testFiles }],
174
+ "dl-effect/all-errors-handled-at-boundary": "warn",
175
+ // Design & boundaries
176
+ "dl-effect/adapter-import-boundary": ["warn", { entryFiles, testFiles }],
177
+ "dl-effect/no-transport-types-in-generator": ["warn", { transportTypes }],
178
+ // Effectful functions
179
+ "dl-effect/prefer-effect-fn": "warn",
180
+ "dl-effect/untraced-recursion": "warn",
181
+ "dl-effect/single-style-per-function": "warn",
182
+ // Code shape
183
+ "dl-effect/no-nested-match": "warn",
184
+ "dl-effect/no-yielded-match": "warn",
185
+ "dl-effect/no-inline-yield-star": "warn",
186
+ "dl-effect/no-effect-return-type": ["warn", { checkExported: false }],
187
+ "dl-effect/no-asymmetric-match-handlers": "warn",
188
+ "dl-effect/anti-slop-prefer-effect-match": "warn",
189
+ // Schema
190
+ "dl-effect/exported-schema-identifier": "warn",
191
+ "dl-effect/no-inline-schema-codec": "warn",
192
+ // Config & secrets
193
+ "dl-effect/redacted-secret-names": ["warn", { secretFields }],
194
+ },
195
+ })
196
+ ```
197
+
198
+ To change one option, extend `all` and override only the rules that use it.
199
+
200
+ ## Versioning
201
+
202
+ Versions are `0.x`: any minor release may add, remove or change rules, options and messages.
203
+
204
+ Supported oxlint is the `peerDependencies` range, `^1.82.0`; CI tests the tarball against `1.82.0`. oxlint's JS plugin API is still experimental, so a newer oxlint minor may break the plugin before the range is narrowed.
205
+
206
+ ## Development
207
+
208
+ - `pnpm format`: formats with oxfmt; the only script that rewrites sources.
209
+ - `pnpm check`: format check, typecheck, lint and tests, writing nothing. The tests are the `RuleTester`s from `oxlint/plugins-dev` with `node --test`, plus an alignment check of `RULES.md` with one section per rule.
210
+ - `pnpm build`: compiles to `dist/` and generates `dist/presets/all.json` from `presets/all.ts` (the rule list comes from the plugin).
211
+ - `pnpm pack:check`: checks the built preset, then the tarball `npm pack` would publish: only the files in `files`, no internal names, `publint --strict`.
212
+ - `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.
213
+ - `pnpm build-and-pack`: `check`, `build`, `pack:check` and `smoke-test`; run it after every change.
214
+ - `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.
215
+ - `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.
216
+
217
+ A new rule must be registered in `index.ts` and documented in `RULES.md` under a `` ### `rule-name` `` heading; `pnpm build` adds it to the preset.