Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 10 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ This plugin provides rules to enforce modular architecture boundaries in Vue.js

> The list of rules is a work in progress. Implemented rules are linked below; unimplemented rules are listed as plain names.
>
> ![Progress](https://progress-bar.xyz/9/?scale=92&width=500&title=9%20of%2092%20rules%20completed)
> ![Progress](https://progress-bar.xyz/10/?scale=92&width=500&title=10%20of%2087%20rules%20completed)

### File Organization Rules

Expand All @@ -122,13 +122,15 @@ This plugin provides rules to enforce modular architecture boundaries in Vue.js

### Dependency Rules

| Rule | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| no-direct-feature-imports | Features cannot import from other features directly. |
| [feature-imports-from-shared-only](./docs/rules/feature-imports-from-shared-only.md) | Features should only import from the `shared/` layer or their own internal files. |
| no-shared-imports-from-features | `shared/` folder cannot import from `features/` or `views/`. |
| app-imports | `app/` folder can import from `shared/` and `features/` (exception: `app/router.ts` may import feature route files to compose the global router). |
| cross-feature-via-shared | All cross-feature communication must go through the `shared/` layer. |
| Rule | Description |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| [feature-imports](./docs/rules/feature-imports.md) | Features should only import from the `shared/` layer or their own internal files. |
| [shared-imports](./docs/rules/shared-imports.md) | `shared/` folder cannot import from `features/` or `views/`. |
| app-imports | `app/` folder can import from `shared/` and `features/` (exception: `app/router.ts` may import feature route files to compose the global router). |
| imports-absolute-alias | Use absolute imports with `@/` alias for cross-layer imports and shared resources. |
| imports-no-deep-relative | Avoid relative imports with more than 2 levels (`../../../`) - use absolute instead. |
| imports-from-index | Import from `index.ts` files when available. |
| imports-grouping | Group imports: Vue imports, third-party imports, internal imports. |

### Component Rules

Expand Down Expand Up @@ -254,18 +256,6 @@ This plugin provides rules to enforce modular architecture boundaries in Vue.js
| config-location | App configurations must be in `app/config/` folder. |
| config-export-typed | Config files must export typed configuration objects. |

### Import Rules

| Rule | Description |
| ------------------------ | ------------------------------------------------------------------------------------ |
| imports-absolute-alias | Use absolute imports with `@/` alias for cross-layer imports and shared resources. |
| imports-relative-local | Use relative imports for same-feature or nearby file imports (within 2 levels). |
| imports-no-deep-relative | Avoid relative imports with more than 2 levels (`../../../`) - use absolute instead. |
| imports-from-index | Import from `index.ts` files when available. |
| imports-grouping | Group imports: Vue imports, third-party imports, internal imports. |
| imports-type-syntax | Type imports must use `import type` syntax. |
| imports-avoid-deep | Avoid deep imports into feature internals. |

### Export Rules

| Rule | Description |
Expand Down
91 changes: 0 additions & 91 deletions docs/rules/app-imports.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# vue-modular/feature-imports-from-shared-only
# vue-modular/feature-imports

Require that feature code imports only from the `shared/` layer (features must not import from other features).

Expand Down Expand Up @@ -26,12 +26,12 @@ Note: project-level settings control `rootPath`, `rootAlias`, `featuresPath`, an

```js
{
"vue-modular/feature-imports-from-shared-only": ["error"]
"vue-modular/feature-imports": ["error"]
}

// ignore legacy features while migrating
{
"vue-modular/feature-imports-from-shared-only": ["error", { "ignores": ["src/features/legacy-*/**"] }]
"vue-modular/feature-imports": ["error", { "ignores": ["src/features/legacy-*/**"] }]
}
```

Expand Down
63 changes: 0 additions & 63 deletions docs/rules/no-direct-feature-imports.md

This file was deleted.

57 changes: 0 additions & 57 deletions docs/rules/no-shared-imports-from-features.md

This file was deleted.

76 changes: 0 additions & 76 deletions docs/rules/routes-feature-location.md

This file was deleted.

Loading