oxlint-plugin-arch 0.12.5 → 0.12.6
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.
- package/CHANGELOG.md +16 -0
- package/README.md +2 -2
- package/dist/index.js +874 -87
- package/dist/preset/preset.js +79 -6
- package/dist/preset/preset.utils.d.ts +1 -0
- package/dist/rules/effect/effect-layer-file.d.ts +1 -0
- package/dist/rules/effect/effect-layers.d.ts +1 -0
- package/dist/rules/effect/effect-merge-pipe.d.ts +1 -0
- package/dist/rules/effect/effect-schema-first.d.ts +1 -0
- package/dist/rules/effect/effect-values-first.d.ts +1 -0
- package/dist/rules/types/types-duplicate.d.ts +1 -0
- package/dist/types/effect.types.d.ts +46 -0
- package/dist/types/preset.types.d.ts +9 -0
- package/dist/types/schemas.types.d.ts +2 -0
- package/dist/types/types.types.d.ts +4 -0
- package/dist/utils/effect.utils.d.ts +5 -0
- package/dist/vendor/dillon-anti-slop/index.js +3 -0
- package/package.json +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.6
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `arch/effect-layers`: one layer per line in `Layer.mergeAll(...)` and in the layer arrays of `Effect.provide`, `Layer.provide` and `Layer.provideMerge`, from `min` items (default `2`). `merge: { callees, min }` and `provide: { callees, min }` set each side; `indent` sets the fix. The fix changes only whitespace. The `effect` group enables it.
|
|
8
|
+
- `arch/effect-merge-pipe`: a multi-line `Layer.mergeAll(...)` is named before it is piped: no `.pipe(` on it and not the first argument of `pipe(...)`. `merge`, `pipe` and `methods` options. Reports only. The `effect` group enables it.
|
|
9
|
+
- `arch/effect-values-first`: values come before helpers and methods, at file level and inside each top-level function or Effect builder. `builders` and `pinned` options. The `effect` group enables it.
|
|
10
|
+
- `arch/effect-layer-file`: a layer file exports `layer` built with Layer from one Effect named `make`; other layers are local `layer<Role>`. `layer`, `make`, `prefix`, `builders`, `layers`, `services` and `constructors` options. Not in a group; scope it to layer files.
|
|
11
|
+
- `arch/effect-schema-first`: a types file declares Schemas, kept interfaces, `declare module`, then type aliases, with `typeof X.Type` aliases in Schema order and data interfaces made Schemas. `member`, `keep`, `runtime`, `rows` (off by default), `order` (the section order) and `derived` (`first`, `sorted`) options. Not in a group; scope it to types files.
|
|
12
|
+
- `arch/types-duplicate`: reports an interface, object type alias or struct Schema with the same members as an earlier one. `structs` and `min` options.
|
|
13
|
+
- `arch/schemas-local`: `imports: false` reports constructions only; `values: true` keeps a construction inline when it reads a parameter or local.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **Breaking:** the `effect` group turns on every rule from `@effect/tsgo`'s `correctness`, `antipattern`, `effectNative` and `style` presets and `@opsydyn/oxlint-effect`'s `recommended` rules, and turns off the oxlint-effect rules that contradict its own or flag common Effect idioms, plus test and entry relaxations; new `entries` option (globs) for entry files that provide their own layers. It now needs both packages (optional peer dependencies) and fails with the install command when one is missing; lint runs through `effect-tsgo`.
|
|
18
|
+
|
|
3
19
|
## 0.12.5
|
|
4
20
|
|
|
5
21
|
### Added
|
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ On by default: [`layout`](docs/groups/layout.md), [`limits`](docs/groups/limits.
|
|
|
57
57
|
|
|
58
58
|
Opt-in: [`react`](docs/groups/react.md), [`tanstack`](docs/groups/tanstack.md), [`next`](docs/groups/next.md), [`expo`](docs/groups/expo.md), [`tailwind`](docs/groups/tailwind.md), [`shadcn`](docs/groups/shadcn.md), [`kit`](docs/groups/kit.md), [`backend`](docs/groups/backend.md), [`orpc`](docs/groups/orpc.md), [`schemas`](docs/groups/schemas.md), [`forms`](docs/groups/forms.md), [`sql`](docs/groups/sql.md), [`effect`](docs/groups/effect.md), [`console`](docs/groups/console.md).
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
81 rules, IDs `arch/<rule>`. 🔧 = autofix.
|
|
61
61
|
|
|
62
62
|
| Family | Covers | Rules |
|
|
63
63
|
| --- | --- | --- |
|
|
@@ -72,7 +72,7 @@ Opt-in: [`react`](docs/groups/react.md), [`tanstack`](docs/groups/tanstack.md),
|
|
|
72
72
|
| `react` | Components, effects, class names | [`react-dynamic-classes`](docs/rules/react-dynamic-classes.md), [`react-empty-effect`](docs/rules/react-empty-effect.md), [`react-memo`](docs/rules/react-memo.md), [`react-props`](docs/rules/react-props.md) |
|
|
73
73
|
| `schemas` | Schema placement | [`schemas-inline`](docs/rules/schemas-inline.md), [`schemas-local`](docs/rules/schemas-local.md), [`schemas-rederive`](docs/rules/schemas-rederive.md), [`schemas-single-use`](docs/rules/schemas-single-use.md) |
|
|
74
74
|
| `tests` | Test structure | [`tests-assertions`](docs/rules/tests-assertions.md), [`tests-concurrent-db`](docs/rules/tests-concurrent-db.md), [`tests-modifiers`](docs/rules/tests-modifiers.md), [`tests-titles`](docs/rules/tests-titles.md) |
|
|
75
|
-
| `types` | Type placement and shape | [`types-declarations`](docs/rules/types-declarations.md), [`types-imported-alias`](docs/rules/types-imported-alias.md), [`types-inline`](docs/rules/types-inline.md), [`types-local-alias`](docs/rules/types-local-alias.md), [`types-namespace-import`](docs/rules/types-namespace-import.md), [`types-service`](docs/rules/types-service.md), [`types-unknown`](docs/rules/types-unknown.md) |
|
|
75
|
+
| `types` | Type placement and shape | [`types-declarations`](docs/rules/types-declarations.md), [`types-duplicate`](docs/rules/types-duplicate.md), [`types-imported-alias`](docs/rules/types-imported-alias.md), [`types-inline`](docs/rules/types-inline.md), [`types-local-alias`](docs/rules/types-local-alias.md), [`types-namespace-import`](docs/rules/types-namespace-import.md), [`types-service`](docs/rules/types-service.md), [`types-unknown`](docs/rules/types-unknown.md) |
|
|
76
76
|
<!-- generated:end -->
|
|
77
77
|
|
|
78
78
|
Also bundled: [Dillon Mulroy's anti-slop rules](docs/vendor.md) as `oxlint-plugin-arch/dillon-anti-slop`.
|