@noctcore/eslint-plugin-architecture 0.1.0 โ 0.3.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/README.md +9 -2
- package/dist/index.cjs +1024 -30
- package/dist/index.d.cts +77 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.js +1024 -30
- package/docs/rules/barrel-purity.md +57 -0
- package/docs/rules/colocated-test-required.md +48 -0
- package/docs/rules/filename-matches-export.md +56 -0
- package/docs/rules/max-import-depth.md +52 -0
- package/docs/rules/single-semantic-module.md +180 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -39,13 +39,20 @@ export default [
|
|
|
39
39
|
|
|
40
40
|
Every rule anchors on a configurable directory segment (default `components`) rather than an absolute
|
|
41
41
|
path, so it behaves the same whether ESLint runs from the repo root or per-package, on POSIX or
|
|
42
|
-
Windows.
|
|
43
|
-
against real file paths, not virtual sources.
|
|
42
|
+
Windows. Several rules inspect files on disk (sibling sets, barrel siblings, colocated tests), so run
|
|
43
|
+
ESLint against real file paths, not virtual sources.
|
|
44
44
|
|
|
45
45
|
## Rules
|
|
46
46
|
|
|
47
|
+
๐ง = autofixable ยท ๐ก = provides an editor suggestion.
|
|
48
|
+
|
|
47
49
|
| Rule | Description | ๐ง |
|
|
48
50
|
| --- | --- | --- |
|
|
51
|
+
| [`barrel-purity`](./docs/rules/barrel-purity.md) | A barrel (`index.ts` / `index.tsx`) must contain only re-exports โ no local declarations, side effects, or default-exported values. | |
|
|
52
|
+
| [`colocated-test-required`](./docs/rules/colocated-test-required.md) | A source file matching an `include` glob must have a colocated `*.test.*` / `*.spec.*` sibling on disk. Off until configured. | |
|
|
49
53
|
| [`component-folder-structure`](./docs/rules/component-folder-structure.md) | A component entry file must ship its full sibling set (hooks, types, story, test, barrel) on disk. | |
|
|
54
|
+
| [`filename-matches-export`](./docs/rules/filename-matches-export.md) | A file's basename must match its primary export (default export, or the sole named export). | ๐ก |
|
|
50
55
|
| [`index-must-reexport-default`](./docs/rules/index-must-reexport-default.md) | A component folder's `index.ts` must re-export the sibling default named after the folder. | |
|
|
56
|
+
| [`max-import-depth`](./docs/rules/max-import-depth.md) | A relative import may not climb more than `max` parent levels (default 3); autofixed to a path alias when one is configured. | ๐ง |
|
|
51
57
|
| [`no-cross-feature-imports`](./docs/rules/no-cross-feature-imports.md) | A file in one feature may not import runtime code from another feature. | |
|
|
58
|
+
| [`single-semantic-module`](./docs/rules/single-semantic-module.md) | A module exports one semantic concern (types, constants, functions, classes, components, hooks, schemas or enums); private helpers do not count. Off until configured. | |
|