oxlint-plugin-arch 0.6.3 → 0.8.0
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 +20 -0
- package/README.md +102 -526
- package/dist/constants/preset.constants.d.ts +11 -1
- package/dist/index.js +88 -11
- package/dist/presets/index.d.ts +3 -1
- package/dist/presets/index.js +287 -71
- package/dist/presets/next-react-modules-preset.d.ts +4 -0
- package/dist/presets/next-react-modules-preset.js +1608 -0
- package/dist/presets/react-modules-preset.d.ts +4 -0
- package/dist/presets/react-modules-preset.js +1603 -0
- package/dist/presets/tanstack-start-react-modules-preset.d.ts +1 -0
- package/dist/presets/tanstack-start-react-modules-preset.js +279 -70
- package/dist/rules/dillon-anti-slop/index.js +1155 -24
- package/dist/rules/dillon-anti-slop/rules/no-module-mocking.d.ts +7 -0
- package/dist/rules/module-policy/index.js +207 -34
- package/dist/rules/module-policy/next-runtime.d.ts +7 -0
- package/dist/types/module-policy.types.d.ts +5 -0
- package/dist/types/preset.types.d.ts +48 -0
- package/dist/utils/helpers/declarations.d.ts +1 -1
- package/dist/utils/helpers/index.d.ts +2 -0
- package/dist/utils/helpers/layout.d.ts +1 -1
- package/dist/utils/helpers/mocking.d.ts +2 -0
- package/dist/utils/helpers/naming.d.ts +1 -1
- package/dist/utils/helpers/preset.d.ts +1 -0
- package/dist/utils/helpers/runtime.d.ts +14 -0
- package/package.json +29 -20
- package/src/rules/dillon-anti-slop/UPSTREAM.md +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
- Add `tests.mocking` to choose which test-double APIs the preset bans in test files: `'modules'` (default, unchanged) or `'strict'`, which also bans `spyOn`, `stubGlobal` and `stubEnv` outside `*.driver.test.ts` and asks for a fake driver. The object form adds `deny` API patterns and per-file `allow` exceptions.
|
|
6
|
+
- Add `deny`, `allow` and `checkDestructured` options to `dillon-anti-slop/no-module-mocking`. Invalid API patterns throw. Without options it reports the same calls as before.
|
|
7
|
+
|
|
8
|
+
## 0.7.0
|
|
9
|
+
|
|
10
|
+
- Update bundled plugins: `@oxlint/plugins` and `oxlint-plugin-eslint` 1.89, `oxlint-tailwindcss` 1.16, `eslint-plugin-perfectionist` 5.13, `eslint-plugin-tsdoc` 0.5.4 and `@shadcn/lint` 0.2. `@shadcn/lint` now prints a notice when a project's `cn` is older than 0.4 and lints with its bundled `cn` instead.
|
|
11
|
+
- Add a `framework` setting per web root (`tanstack-start` by default, or `next` for the App Router) and a top-level default. Add the generic `reactModulesPreset` and `nextReactModulesPreset`; `tanstackStartReactModulesPreset` equals `reactModulesPreset` with the default framework; apart from the `.illustration.tsx` role below, it keeps its previous output.
|
|
12
|
+
- For `next` roots, apply App Router route policies to pages, layouts and `route.ts` handlers, default Tailwind to `src/app/globals.css`, and ignore `.next/**` and `next-env.d.ts`. Monorepos can mix TanStack Start and Next web roots in one config.
|
|
13
|
+
- Add `modules/next-runtime`: server/client ownership for Next services and lib from file names (`.server`, `.rsc`, `.action`, `.client`) and `'use server'`/`'use client'` directives. Client hooks are rejected in server, RSC and shared modules, named or through a `React` namespace, and `globalThis.window`-style access counts as a bare global. Options: `next.additionalServerOnlyImports`, `next.additionalClientOnlyImports` and `next.computedImportAllowedFiles`.
|
|
14
|
+
- Add `allowedExports` and `inspectExports` to `arch/route-surface`. Defaults keep today's behavior.
|
|
15
|
+
- Next `route.ts` handlers may export HTTP methods and route segment config such as `generateStaticParams`, also through aliases like `export { handler as GET }`, without `no-file-level-helpers` reporting them. Page-only exports such as `metadata` stay rejected there. Next service roots accept `.action.ts` files.
|
|
16
|
+
- Add the `.illustration.tsx` component role for artwork: the shadcn rules allow arbitrary colour, shadow, gradient, background, mask, blur, fill and stroke values there, while type size, tracking, leading, radius and spacing stay on the theme scale. Component contracts and the `components/ui` exemption still apply. `only-export-components` accepts `trailingRoles` so `foo-bar.illustration.tsx` may export `FooBar` as well as the existing `FooBarIllustration`.
|
|
17
|
+
- When the architecture has no backend root, Next web `types/` files own schemas: Zod construction is allowed there and `no-runtime-in-types` does not apply. TanStack Start roots and configurations with a backend keep their previous schema policy.
|
|
18
|
+
- Add `sourceDir` to web, server and runner architecture entries for code outside `src`, such as a Next app with `app/` at the root (`sourceDir: '.'`). Defaults to `src`.
|
|
19
|
+
- Add `formatting: { semi, quotes }` to choose semicolons (`always` or `never`) and quote style (`single` or `double`). Defaults keep today's style.
|
|
20
|
+
- Add `ruleSeverities` to set single preset rules to `error`, `warn` or `off` after the global `severity` and policy callbacks. Rules from Oxlint categories, such as `no-debugger`, are set at the top level.
|
|
21
|
+
- Add `modules.colocatedTypeFiles` to allow listed type files outside `types/`; they follow the backend `types/` contract.
|
|
22
|
+
|
|
3
23
|
## 0.6.3
|
|
4
24
|
|
|
5
25
|
- Add a trailing comma when `object-multiline` splits an object, so the fix agrees with multiline comma rules.
|