From 15f6714ab0b049ecd1e6fcc054dca65b290618c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Tue, 28 Mar 2023 17:04:13 +0200 Subject: [PATCH] docs(linter): add docs on checkDynamicDependenciesExceptions flag (#15885) --- .../documents/enforce-module-boundaries.md | 23 ++++++++++--------- .../linter/enforce-module-boundaries.md | 23 ++++++++++--------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/docs/generated/packages/eslint-plugin-nx/documents/enforce-module-boundaries.md b/docs/generated/packages/eslint-plugin-nx/documents/enforce-module-boundaries.md index 57168ccc7b4af..7e2b539cd7731 100644 --- a/docs/generated/packages/eslint-plugin-nx/documents/enforce-module-boundaries.md +++ b/docs/generated/packages/eslint-plugin-nx/documents/enforce-module-boundaries.md @@ -2,7 +2,7 @@ The `@nrwl/nx/enforce-module-boundaries` ESLint rule enables you to define stric ## Usage -You can use `enforce-module-boundaries` rule by adding it to your ESLint rules configuration: +You can use the `enforce-module-boundaries` rule by adding it to your ESLint rules configuration: ```jsonc { @@ -26,16 +26,17 @@ You can use `enforce-module-boundaries` rule by adding it to your ESLint rules c ## Options -| Property | Type | Default | Description | -| ----------------------------- | --------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| allow | _Array_ | _[]_ | List of imports that should be allowed without any checks | -| allowCircularSelfDependency | _boolean_ | _false_ | Disable check for self circular dependency when project imports from itself via alias path | -| banTransitiveDependencies | _boolean_ | _false_ | Ban import of dependencies that were not specified in the root or project's `package.json` | -| checkNestedExternalImports | _boolean_ | _false_ | Enable to enforce the check for banned external imports in the nested packages. Check [Dependency constraits](#dependency-constraits) for more information | -| enforceBuildableLibDependency | _boolean_ | _false_ | Enable to restrict the buildable libs from importing non-buildable libraries | -| depConstraints | _Array_ | _[]_ | List of dependency constraints between projects | - -### Dependency constraits +| Property | Type | Default | Description | +| ---------------------------------- | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| allow | _Array_ | _[]_ | List of imports that should be allowed without any checks | +| allowCircularSelfDependency | _boolean_ | _false_ | Disable check for self circular dependency when project imports from itself via alias path | +| banTransitiveDependencies | _boolean_ | _false_ | Ban import of dependencies that were not specified in the root or project's `package.json` | +| checkDynamicDependenciesExceptions | _Array_ | _[]_ | List of imports that should be skipped for `Imports of lazy-loaded libraries forbidden` checks. E.g. `['@myorg/lazy-project/component/*', '@myorg/other-project']` | +| checkNestedExternalImports | _boolean_ | _false_ | Enable to enforce the check for banned external imports in the nested packages. Check [Dependency constraits](#dependency-constraits) for more information | +| enforceBuildableLibDependency | _boolean_ | _false_ | Enable to restrict the buildable libs from importing non-buildable libraries | +| depConstraints | _Array_ | _[]_ | List of dependency constraints between projects | + +### Dependency constraints The `depConstraints` is an array of objects representing the constraints defined between source and target projects. A constraint must include `sourceTag` or `allSourceTags`. The constraints are applied with **AND** logical operation - for given `source` project the resulting constraints would be **all** that match its tags. diff --git a/docs/shared/packages/linter/enforce-module-boundaries.md b/docs/shared/packages/linter/enforce-module-boundaries.md index 57168ccc7b4af..7e2b539cd7731 100644 --- a/docs/shared/packages/linter/enforce-module-boundaries.md +++ b/docs/shared/packages/linter/enforce-module-boundaries.md @@ -2,7 +2,7 @@ The `@nrwl/nx/enforce-module-boundaries` ESLint rule enables you to define stric ## Usage -You can use `enforce-module-boundaries` rule by adding it to your ESLint rules configuration: +You can use the `enforce-module-boundaries` rule by adding it to your ESLint rules configuration: ```jsonc { @@ -26,16 +26,17 @@ You can use `enforce-module-boundaries` rule by adding it to your ESLint rules c ## Options -| Property | Type | Default | Description | -| ----------------------------- | --------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| allow | _Array_ | _[]_ | List of imports that should be allowed without any checks | -| allowCircularSelfDependency | _boolean_ | _false_ | Disable check for self circular dependency when project imports from itself via alias path | -| banTransitiveDependencies | _boolean_ | _false_ | Ban import of dependencies that were not specified in the root or project's `package.json` | -| checkNestedExternalImports | _boolean_ | _false_ | Enable to enforce the check for banned external imports in the nested packages. Check [Dependency constraits](#dependency-constraits) for more information | -| enforceBuildableLibDependency | _boolean_ | _false_ | Enable to restrict the buildable libs from importing non-buildable libraries | -| depConstraints | _Array_ | _[]_ | List of dependency constraints between projects | - -### Dependency constraits +| Property | Type | Default | Description | +| ---------------------------------- | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| allow | _Array_ | _[]_ | List of imports that should be allowed without any checks | +| allowCircularSelfDependency | _boolean_ | _false_ | Disable check for self circular dependency when project imports from itself via alias path | +| banTransitiveDependencies | _boolean_ | _false_ | Ban import of dependencies that were not specified in the root or project's `package.json` | +| checkDynamicDependenciesExceptions | _Array_ | _[]_ | List of imports that should be skipped for `Imports of lazy-loaded libraries forbidden` checks. E.g. `['@myorg/lazy-project/component/*', '@myorg/other-project']` | +| checkNestedExternalImports | _boolean_ | _false_ | Enable to enforce the check for banned external imports in the nested packages. Check [Dependency constraits](#dependency-constraits) for more information | +| enforceBuildableLibDependency | _boolean_ | _false_ | Enable to restrict the buildable libs from importing non-buildable libraries | +| depConstraints | _Array_ | _[]_ | List of dependency constraints between projects | + +### Dependency constraints The `depConstraints` is an array of objects representing the constraints defined between source and target projects. A constraint must include `sourceTag` or `allSourceTags`. The constraints are applied with **AND** logical operation - for given `source` project the resulting constraints would be **all** that match its tags.