oxlint-plugin-arch 0.2.1 → 0.2.3

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +5 -3
  3. package/dist/index.js +2119 -0
  4. package/package.json +7 -8
  5. package/src/index.ts +0 -57
  6. package/src/rules/export-file-prefix.ts +0 -70
  7. package/src/rules/export-name-pattern.ts +0 -71
  8. package/src/rules/filename-export-name.ts +0 -86
  9. package/src/rules/filename-match.ts +0 -47
  10. package/src/rules/folder-prefix.ts +0 -73
  11. package/src/rules/no-extra-exports.ts +0 -60
  12. package/src/rules/no-extra-factory-keys.ts +0 -58
  13. package/src/rules/no-file-level-helpers.ts +0 -58
  14. package/src/rules/no-imported-type-alias.ts +0 -83
  15. package/src/rules/no-inline-schema-elements.ts +0 -70
  16. package/src/rules/no-local-schema-construction.ts +0 -162
  17. package/src/rules/no-rederive-schema.ts +0 -66
  18. package/src/rules/no-restricted-files.ts +0 -40
  19. package/src/rules/no-restricted-token.ts +0 -71
  20. package/src/rules/no-runtime-in-types.ts +0 -72
  21. package/src/rules/no-single-use-scalar-schema.ts +0 -164
  22. package/src/rules/no-top-level-functions.ts +0 -77
  23. package/src/rules/no-trivial-functions.ts +0 -56
  24. package/src/rules/no-unescaped-like.ts +0 -67
  25. package/src/rules/only-export-components.ts +0 -78
  26. package/src/rules/require-file-factory.ts +0 -67
  27. package/src/rules/require-object-params.ts +0 -32
  28. package/src/rules/require-orpc-output.ts +0 -64
  29. package/src/rules/require-paired-call.ts +0 -71
  30. package/src/rules/route-surface.ts +0 -62
  31. package/src/utils/helpers/ast.ts +0 -101
  32. package/src/utils/helpers/declarations.ts +0 -203
  33. package/src/utils/helpers/exports.ts +0 -158
  34. package/src/utils/helpers/factories.ts +0 -67
  35. package/src/utils/helpers/index.ts +0 -11
  36. package/src/utils/helpers/naming.ts +0 -89
  37. package/src/utils/helpers/options.ts +0 -5
  38. package/src/utils/helpers/orpc.ts +0 -31
  39. package/src/utils/helpers/react-components.ts +0 -146
  40. package/src/utils/helpers/routes.ts +0 -31
  41. package/src/utils/helpers/sanitizers.ts +0 -33
  42. package/src/utils/helpers/schemas.ts +0 -82
  43. package/src/utils/index.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.3
4
+
5
+ - Add `declaration-name` so selected declarations can follow a file prefix or pattern per glob.
6
+ - Add `export-file-prefix` `singularize` so plural filenames accept singular prefixes.
7
+ - Add `no-type-declarations` to keep type aliases and interfaces out of matched files.
8
+
9
+ ## 0.2.2
10
+
11
+ - Publish compiled `dist/index.js` so Oxlint can load the package from `node_modules`.
12
+
13
+ ## 0.2.1
14
+
15
+ - First npm tarball. Raw TypeScript entry could not load from `node_modules`.
16
+
3
17
  ## 0.2.0
4
18
 
5
19
  First npm release.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Configurable, filename-aware architecture rules for Oxlint.
4
4
 
5
- Install the package, then put repository paths and policy in your Oxlint config. Rules contain no application-specific names or folders.
5
+ Install the package, then put repository paths and policy in your Oxlint config. The npm package ships compiled JavaScript; `src/` stays TypeScript for development. Rules contain no application-specific names or folders.
6
6
 
7
7
  ## Install
8
8
 
@@ -41,13 +41,14 @@ Then point `jsPlugins[].specifier` at the copied entry file instead of the packa
41
41
  ## Configuration examples
42
42
 
43
43
  - [`examples/minimal.oxlint.config.ts`](examples/minimal.oxlint.config.ts) — three small rules showing plugin registration, glob ownership, and options.
44
- - [`examples/full.oxlint.config.ts`](examples/full.oxlint.config.ts) — all 25 rules across representative component, action, service, route, API, schema, and database scopes.
44
+ - [`examples/full.oxlint.config.ts`](examples/full.oxlint.config.ts) — all 27 rules across representative component, action, service, route, API, schema, and database scopes.
45
45
 
46
46
  Copy the shapes that match your repository; do not copy globs or naming policy blindly.
47
47
 
48
48
  ## Rules
49
49
 
50
- - `export-file-prefix` — require export names, or every function and type, to start with a filename-derived prefix.
50
+ - `declaration-name` — require selected declarations to match a filename-derived prefix or a consumer pattern.
51
+ - `export-file-prefix` — require export names, or every function and type, to start with a filename-derived prefix, optionally singularized.
51
52
  - `export-name-pattern` — require export names, or every function and type, to match a configured regular expression.
52
53
  - `filename-export-name` — derive expected function names from filename templates, optionally including locals.
53
54
  - `filename-match` — require filenames to match a configured pattern.
@@ -65,6 +66,7 @@ Copy the shapes that match your repository; do not copy globs or naming policy b
65
66
  - `no-single-use-scalar-schema` — reject local scalar Zod aliases used once where they can be safely inlined.
66
67
  - `no-top-level-functions` — reject top-level functions and optional re-exports.
67
68
  - `no-trivial-functions` — reject empty or passthrough top-level functions.
69
+ - `no-type-declarations` — reject type aliases and interfaces in matched files.
68
70
  - `no-unescaped-like` — require configured sanitizers for configured query methods.
69
71
  - `only-export-components` — allow only React component and type exports.
70
72
  - `require-file-factory` — derive and require a filename-based factory function.