oxlint-plugin-arch 0.13.0 → 0.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.1
4
+
5
+ Preset defaults that change what an app reports:
6
+
7
+ - `effect` group: `layout-call-arguments` adds `pipe: { min: 2 }`; `layout-call-depth` counts through callbacks; `layout-object` adds `params`, `nested`, `siblings` and `inner: 2`; `layout-ternary` splits a one-line ternary over 100 columns (was `fit: false`); `layout-type-arguments` is on with `min: 3`.
8
+ - Effect servers: `comments-code` keeps one-line step comments (`steps: true`); `effect-layer-file` names local layers `<Role>Layer` (`suffix: 'Layer'`). An app that keeps `layer<Role>` writes `'apps/server/src/domains/*/*.layer.ts': { rules: { 'arch/effect-layer-file': 'error' } }`.
9
+ - `sql` group: `layout-chain` breaks Kysely chains of 3+ calls.
10
+ - Effect servers and contract packages ban `ai` and `@ai-sdk/**` ("Use effect/ai.").
11
+
12
+ Rules and options:
13
+
14
+ - Preset: when several file keys match one file, their settings merge on it, broadest key first; before, the later key's group or `rules` replaced the earlier one's, so a broad key could undo a convention's exception.
15
+ - `boundaries-*`: the `@/`, `#/` and `#services/` prefixes resolve `..` segments, so `#services/chat/../service` reaches the registry check.
16
+ - `react-memo` also reports `R['memo']` and a `{ default as R }` import.
17
+ - Vendored `require-safety-comment-for-type-assertion` matches a `comment` that starts with a non-ASCII letter.
18
+ - `effect-layer-file` takes `suffix`, such as `'Layer'`, to name local layers `<Role>Layer`; it also recognises those names as Layers.
19
+ - `comments-code` takes `steps`: a single `//` line directly above a statement in a function, or above a property in an object literal, stays.
20
+ - `layout-object` takes `params`, which splits a one-line destructured parameter with `min` properties, and `nested`, which splits a one-line object holding an object or function.
21
+ - `layout-call-arguments` takes `pipe: { min }`, which splits a one-line pipe with `min` steps even while `split` is off.
22
+ - `layout-pipe` takes `methods`, and `layout-call-arguments` `pipe.methods`, for pipe methods other than `pipe`.
23
+ - `naming-types` takes `pattern`; `types-local-alias` takes `allow`.
24
+ - `react-dynamic-classes` takes `attributes`; `react-empty-effect` takes `hooks`; `react-memo` takes `names`, `sources` and `message`.
25
+ - Vendored `no-shape-in-symbol-names` takes `terms`; `require-safety-comment-for-type-assertion` takes `comment`.
26
+ - `boundaries-imports`, `boundaries-next` and `boundaries-tanstack` take `conventions` for every file and folder name they read; `boundaries-imports` `portable` also takes a folder name, and `boundaries-tanstack` takes `serverHooks`. The `#services/` prefix follows the services folder.
27
+ - New `layout-type-arguments`: a one-line type argument list holding a union of `min` types puts each type on its own line, each after a leading `|`.
28
+ - `layout-object` `nested` reports without a fix inside a ternary or before a chained call; new `inner` splits an object with `inner` or more entries inside a split object, at every depth; new `siblings` splits an object argument to match a split sibling call in the same array.
29
+ - With `layout-call-arguments` `pipe` set, `join` leaves every pipe as written.
30
+ - `layout-call-arguments` `hug` also reports a call whose argument drops to the next line while `)` stays on it, and splits it fully.
31
+ - `code-inline` no longer asks to inline a top-level value when the result would pass `max` columns or `nesting`.
32
+ - `layout-call-depth` takes `callbacks`, which counts nesting through inline callbacks; `code-inline` takes the same `callbacks`, and the `effect` group sets both.
33
+
3
34
  ## 0.13.0
4
35
 
5
36
  ### Migrating from 0.12
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
- 83 rules, IDs `arch/<rule>`. 🔧 = autofix.
60
+ 84 rules, IDs `arch/<rule>`. 🔧 = autofix.
61
61
 
62
62
  | Family | Covers | Rules |
63
63
  | --- | --- | --- |
@@ -67,7 +67,7 @@ Opt-in: [`react`](docs/groups/react.md), [`tanstack`](docs/groups/tanstack.md),
67
67
  | `comments` | Comments and directives | [`comments-code`](docs/rules/comments-code.md) 🔧, [`comments-directives`](docs/rules/comments-directives.md) |
68
68
  | `copy` | User-facing text | [`copy-dashes`](docs/rules/copy-dashes.md) |
69
69
  | `files` | What a file may contain or export | [`files-components-only`](docs/rules/files-components-only.md), [`files-constants-only`](docs/rules/files-constants-only.md), [`files-domain-constants`](docs/rules/files-domain-constants.md), [`files-exports`](docs/rules/files-exports.md), [`files-externals`](docs/rules/files-externals.md), [`files-factory-keys`](docs/rules/files-factory-keys.md), [`files-helpers`](docs/rules/files-helpers.md), [`files-no-functions`](docs/rules/files-no-functions.md), [`files-restricted`](docs/rules/files-restricted.md), [`files-route`](docs/rules/files-route.md), [`files-types-only`](docs/rules/files-types-only.md) |
70
- | `layout` | Layout a formatter leaves alone | [`layout-arrow-body`](docs/rules/layout-arrow-body.md) 🔧, [`layout-call-arguments`](docs/rules/layout-call-arguments.md) 🔧, [`layout-call-array`](docs/rules/layout-call-array.md) 🔧, [`layout-call-depth`](docs/rules/layout-call-depth.md), [`layout-chain`](docs/rules/layout-chain.md) 🔧, [`layout-items`](docs/rules/layout-items.md) 🔧, [`layout-jsx-attributes`](docs/rules/layout-jsx-attributes.md) 🔧, [`layout-key-value`](docs/rules/layout-key-value.md) 🔧, [`layout-object`](docs/rules/layout-object.md) 🔧, [`layout-padding`](docs/rules/layout-padding.md) 🔧, [`layout-pipe`](docs/rules/layout-pipe.md), [`layout-ternary`](docs/rules/layout-ternary.md) 🔧 |
70
+ | `layout` | Layout a formatter leaves alone | [`layout-arrow-body`](docs/rules/layout-arrow-body.md) 🔧, [`layout-call-arguments`](docs/rules/layout-call-arguments.md) 🔧, [`layout-call-array`](docs/rules/layout-call-array.md) 🔧, [`layout-call-depth`](docs/rules/layout-call-depth.md), [`layout-chain`](docs/rules/layout-chain.md) 🔧, [`layout-items`](docs/rules/layout-items.md) 🔧, [`layout-jsx-attributes`](docs/rules/layout-jsx-attributes.md) 🔧, [`layout-key-value`](docs/rules/layout-key-value.md) 🔧, [`layout-object`](docs/rules/layout-object.md) 🔧, [`layout-padding`](docs/rules/layout-padding.md) 🔧, [`layout-pipe`](docs/rules/layout-pipe.md), [`layout-ternary`](docs/rules/layout-ternary.md) 🔧, [`layout-type-arguments`](docs/rules/layout-type-arguments.md) 🔧 |
71
71
  | `naming` | File, folder and export names | [`naming-declarations`](docs/rules/naming-declarations.md), [`naming-exports`](docs/rules/naming-exports.md), [`naming-file`](docs/rules/naming-file.md), [`naming-folder`](docs/rules/naming-folder.md), [`naming-types`](docs/rules/naming-types.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), [`react-query-props`](docs/rules/react-query-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) |