oxlint-plugin-arch 0.12.4 → 0.12.5
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 +41 -0
- package/dist/index.js +454 -274
- package/dist/types/backend.types.d.ts +1 -0
- package/dist/types/boundaries.types.d.ts +7 -0
- package/dist/types/code.types.d.ts +3 -0
- package/dist/types/comments.types.d.ts +1 -1
- package/dist/types/files.types.d.ts +6 -1
- package/dist/types/layout.types.d.ts +10 -2
- package/dist/types/react.types.d.ts +1 -0
- package/dist/types/tests.types.d.ts +7 -0
- package/dist/types/types.types.d.ts +4 -0
- package/dist/utils/source.utils.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.5
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `arch/layout-object`: `join` option (`{ max, keep? }`). A split object with fewer than `min` properties goes on one line when it fits in `max` columns, every property is one line and none holds an object, array or function, and it has no comments. `keep` lists callees (such as `object` for `z.object`) whose object arguments stay split. `join` follows `scope`. Unset, the rule is unchanged.
|
|
8
|
+
- `arch/layout-jsx-attributes`: `join` option (`{ max }`). A split tag with fewer than `min` attributes goes on one line when it fits in `max` columns, every attribute is one line, its name and type arguments are one line and it has no comments. Unset, the rule is unchanged.
|
|
9
|
+
- `arch/layout-ternary`, `arch/layout-call-arguments`: `indent` accepts `'tab'` like the other layout rules.
|
|
10
|
+
- `arch/code-branch-once`: `min` option (default `2`), the smallest number of ternaries on one subject that is reported.
|
|
11
|
+
- `arch/tests-concurrent-db`: `fixtures` (default `['db']`) and `callees` (default `['test.concurrent']`) options name the shared fixtures and the concurrent test callees.
|
|
12
|
+
- `arch/tests-modifiers`: `modifiers` option (default `['only', 'skip', 'todo']`) replaces the reported modifiers.
|
|
13
|
+
- `arch/tests-titles`: `modifiers` option (default `['only', 'skip', 'concurrent', 'sequential', 'todo', 'each', 'for']`) replaces the modifiers whose titles are checked; add `'fails'` to check `test.fails` titles.
|
|
14
|
+
- `arch/boundaries-rpc-database`: `methods` option replaces the reported query-builder methods (default `selectFrom`, `insertInto`, `updateTable`, `deleteFrom`, `mergeInto`, `executeQuery`).
|
|
15
|
+
- `arch/types-service`: `suffix` (default `'Service'`) and `factory` (default `'make'`) options for the allowed `XService = ReturnType<typeof makeXService>` alias; the message names the configured suffix.
|
|
16
|
+
- `arch/comments-code`: `why` also takes a string that replaces the `Why:` prefix, such as `'NOTE:'` or `'NOTE: '`; continuation lines follow it.
|
|
17
|
+
- `arch/files-domain-constants`: `pattern` option (default `'^[A-Z][A-Z0-9_]+$'`) names the constants to report. `folders` (default `['services']`), `roles` (default `['action', 'query']`) and `file` (default `'{domain}.constants.ts'`) set the file the message points to.
|
|
18
|
+
- `arch/files-externals`: `files` option (default `'^(?:vite|next)\.config\.[cm]?[jt]s$'`) names the config files that are checked.
|
|
19
|
+
- `arch/react-props`: `suffix` option (default `'Props'`) for the props interface name.
|
|
20
|
+
- `arch/boundaries-imports`: `surfaces` option (default `['service', 'client', 'server', 'rsc', 'utils']`) names the public surface file suffixes.
|
|
21
|
+
- `arch/boundaries-tanstack`: `renderers` option (default `['renderServerComponent', 'renderToReadableStream']`) names the RSC renderers that need a server boundary.
|
|
22
|
+
- `arch/boundaries-next`: `serverHooks` option (default `['useId', 'use']`) names the hooks server and RSC modules may use.
|
|
23
|
+
- `arch/backend-registry`: `file` option (default `'{folder}.service.ts'`) names the service file each domain folder needs.
|
|
24
|
+
|
|
25
|
+
- `arch/layout-call-arguments`: `join.items` option (default `2`) sets how many one-line items `join` puts on one line; while `split` is on it stays below `min`.
|
|
26
|
+
- `arch/files-components-only`: `filename: 'each'` checks that every component starts with the file name; the default `true` still lets one exact match or a shared prefix cover the file.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- `arch/layout-call-arguments`: `join` counts a kept trailing comma toward `max`.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- `arch/layout-call-arguments`: with `min: 2` and `split` on, `join` no longer joins a two-argument call that `split` breaks again.
|
|
35
|
+
- `arch/tests-concurrent-db`: a fixture destructured with a string key, like `({ 'db': database })`, is reported.
|
|
36
|
+
- `arch/code-paired-call`: an import alias counts only where it resolves to the import, so a local `r` shadowing `import { required as r }`, or a method `form.r()`, no longer satisfies `required`.
|
|
37
|
+
- `arch/code-traced`: an untraced value exported by name, like `export { send }` or `export { send as deliver }`, is reported.
|
|
38
|
+
- `arch/naming-declarations`: declarations inside a loop body, like `for (;;) { const wrong = 1 }`, are checked; only the loop header stays exempt.
|
|
39
|
+
- `arch/naming-exports`: an aliased export is checked by its exported name, so `export { invoiceX as bad }` is reported.
|
|
40
|
+
- `arch/tests-concurrent-db`: a computed key, like `({ [db]: value })`, is no longer reported.
|
|
41
|
+
- `arch/code-inline`: a const is no longer reported when a call, assignment or other side effect sits between it and its one read.
|
|
42
|
+
- `arch/schemas-local`: the import check follows references to the imported binding, so a property key or a shadowing parameter named `z` no longer marks a `z.config` import as a runtime import.
|
|
43
|
+
|
|
3
44
|
## 0.12.4
|
|
4
45
|
|
|
5
46
|
### Added
|