oxlint-plugin-arch 0.12.2 → 0.12.4

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,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.12.4
4
+
5
+ ### Added
6
+
7
+ - `effect` preset group and `recipes.effect`: layout and code rules for Effect code, opt-in. It turns off `arch/code-trivial-functions`, which reports Effect functions written as one pipe. Options: `width` (line width for the layout rules, default `160`), `exports` (files whose exports must be traced) and `skip` (service names left untraced).
8
+ - `arch/layout-call-arguments`: `hug`, `join` and `split` options. `hug` keeps a multi-line call either hugging its last callback, object or array or one argument per line; `join` puts a short split call or parameter list on one line; `split: false` turns the `min` check off. Defaults are unchanged.
9
+ - `arch/layout-ternary`: `branch` option reports a ternary branch longer than `max` lines; `fit: false` turns the join and split checks off. Defaults are unchanged.
10
+ - `arch/layout-items`: a multi-line object or array puts each item on its own line.
11
+ - `arch/layout-call-depth`: calls nested more than `max` deep on one line.
12
+ - `arch/layout-arrow-body`: an arrow body starts on the arrow's line when it fits.
13
+ - `arch/layout-pipe`: no `).pipe(` after a multi-line call, and no multi-line call inside a pipe step.
14
+ - `arch/code-inline`: a one-line const read once is inlined; a top-level const that only wraps one call or arrow is inlined at each use.
15
+ - `arch/code-branch-once`: a member compared to strings in several ternaries in one file.
16
+ - `arch/code-function-nesting`: functions nested more than `max` deep.
17
+ - `arch/code-yield-argument`: a `yield*` passed straight into a call or member access.
18
+ - `arch/code-justified-call`: listed calls need a `// SAFETY: <why>` comment on the line above.
19
+ - `arch/code-traced`: exported functions and service methods built with an untraced helper (`Effect.fnUntraced` by default).
20
+
21
+ ### Fixed
22
+
23
+ - Preset detection: a `migrations/` folder under `tests/` or `test/` keeps test file names. Migration tests can mirror their source (`tests/database/migrations/003-products.test.ts`) instead of getting the numbered migration name rule.
24
+
25
+ ## 0.12.3
26
+
27
+ ### Fixed
28
+
29
+ - Preset: Expo apps skip the DOM SVG rules (`svg-jsx/*`). React Native and Skia props such as `<Path style="stroke">` are not CSS strings, and the rule's autofix crashed on them.
30
+
3
31
  ## 0.12.2
4
32
 
5
33
  ### Added
package/README.md CHANGED
@@ -55,19 +55,19 @@ bunx oxlint
55
55
  <!-- generated:start -->
56
56
  On by default: [`layout`](docs/groups/layout.md), [`limits`](docs/groups/limits.md), [`style`](docs/groups/style.md), [`basics`](docs/groups/basics.md), [`naming`](docs/groups/naming.md), [`comments`](docs/groups/comments.md), [`types`](docs/groups/types.md), [`imports`](docs/groups/imports.md), [`tests`](docs/groups/tests.md), [`deny`](docs/groups/deny.md), [`externals`](docs/groups/externals.md).
57
57
 
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), [`console`](docs/groups/console.md).
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
- 65 rules, IDs `arch/<rule>`. 🔧 = autofix.
60
+ 75 rules, IDs `arch/<rule>`. 🔧 = autofix.
61
61
 
62
62
  | Family | Covers | Rules |
63
63
  | --- | --- | --- |
64
64
  | `backend` | Service and RPC structure | [`backend-orpc-output`](docs/rules/backend-orpc-output.md), [`backend-registry`](docs/rules/backend-registry.md), [`backend-service-functions`](docs/rules/backend-service-functions.md), [`backend-sql-like`](docs/rules/backend-sql-like.md) |
65
65
  | `boundaries` | Import and runtime boundaries | [`boundaries-deny`](docs/rules/boundaries-deny.md), [`boundaries-imports`](docs/rules/boundaries-imports.md), [`boundaries-next`](docs/rules/boundaries-next.md), [`boundaries-rpc-database`](docs/rules/boundaries-rpc-database.md), [`boundaries-tanstack`](docs/rules/boundaries-tanstack.md), [`boundaries-token-owner`](docs/rules/boundaries-token-owner.md) |
66
- | `code` | Code shapes to avoid | [`code-constructor`](docs/rules/code-constructor.md), [`code-double-negation`](docs/rules/code-double-negation.md), [`code-literal-in`](docs/rules/code-literal-in.md), [`code-mutable-state`](docs/rules/code-mutable-state.md), [`code-object-params`](docs/rules/code-object-params.md), [`code-paired-call`](docs/rules/code-paired-call.md), [`code-promise-mutation`](docs/rules/code-promise-mutation.md), [`code-switch`](docs/rules/code-switch.md), [`code-trivial-functions`](docs/rules/code-trivial-functions.md) |
66
+ | `code` | Code shapes to avoid | [`code-branch-once`](docs/rules/code-branch-once.md), [`code-constructor`](docs/rules/code-constructor.md), [`code-double-negation`](docs/rules/code-double-negation.md), [`code-function-nesting`](docs/rules/code-function-nesting.md), [`code-inline`](docs/rules/code-inline.md), [`code-justified-call`](docs/rules/code-justified-call.md), [`code-literal-in`](docs/rules/code-literal-in.md), [`code-mutable-state`](docs/rules/code-mutable-state.md), [`code-object-params`](docs/rules/code-object-params.md), [`code-paired-call`](docs/rules/code-paired-call.md), [`code-promise-mutation`](docs/rules/code-promise-mutation.md), [`code-switch`](docs/rules/code-switch.md), [`code-traced`](docs/rules/code-traced.md), [`code-trivial-functions`](docs/rules/code-trivial-functions.md), [`code-yield-argument`](docs/rules/code-yield-argument.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-call-arguments`](docs/rules/layout-call-arguments.md) 🔧, [`layout-call-array`](docs/rules/layout-call-array.md) 🔧, [`layout-chain`](docs/rules/layout-chain.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-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) 🔧 |
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) |
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) |