Skip to content

Commit

Permalink
docs(linter): add docs on checkDynamicDependenciesExceptions flag (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Mar 28, 2023
1 parent 6749701 commit 15f6714
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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<string>_ | _[]_ | 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<object>_ | _[]_ | List of dependency constraints between projects |

### Dependency constraits
| Property | Type | Default | Description |
| ---------------------------------- | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| allow | _Array<string>_ | _[]_ | 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<string>_ | _[]_ | 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<object>_ | _[]_ | 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.

Expand Down
23 changes: 12 additions & 11 deletions docs/shared/packages/linter/enforce-module-boundaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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<string>_ | _[]_ | 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<object>_ | _[]_ | List of dependency constraints between projects |

### Dependency constraits
| Property | Type | Default | Description |
| ---------------------------------- | --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| allow | _Array<string>_ | _[]_ | 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<string>_ | _[]_ | 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<object>_ | _[]_ | 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.

Expand Down

1 comment on commit 15f6714

@vercel
Copy link

@vercel vercel bot commented on 15f6714 Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev

Please sign in to comment.