11 Commits

Author SHA1 Message Date
Leosvel Pérez Espinosa
c7a9c71c07
fix(linter): handle ng-package.json file with no lib.entryFile in @nx/enforce-module-boundaries rule (#31360)
## Current Behavior

When an `ng-package.json` file of an Angular library secondary entry
point does not specify `lib.entryFile`, the
`@nx/enforce-module-boundaries` rule throws an error. The
`ng-package.json` file of an Angular secondary entry point can be as
simple as `{}`, but it would cause the rule to throw an error.

## Expected Behavior

The `@nx/enforce-module-boundaries` rule should correctly handle an
`ng-package.json` file of an Angular library secondary entry point that
does not specify `lib.entryFile`. The property should [default to
`src/public_api.ts`](22a7ba1979/src/ng-entrypoint.schema.json (L20)).

Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
2025-05-28 09:45:32 +02:00
Miroslav Jonaš
cd55dfcb3e
feat(linter): add support for package based secondary entry points (#30809)
This PR adds support for package.json based secondary entry points and
implements fix for situation when package imports base entry point as
dynamic dependency and secondary entry point as static dependency.

## Current Behavior
When the package is imported from itself, check for a secondary entry
point checks only Angular-style secondary entry points.

When package is importing from the same library as dynamic import from
root and static import from secondary entry point we still get linter
errror.

## Expected Behavior
Check for secondary entry points should also support standard
package.json-based entry points.

Importing from the same library as dynamic import from root and static
import from secondary entry point should be allowed.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #18552
2025-04-25 14:31:33 +02:00
Jack Hsu
bc43243498
chore(repo): add eslint and jest plugins to use inferred targets (#22946) 2024-04-23 21:52:13 -04:00
Miroslav Jonaš
3981c90fe8
fix(linter): ensure angular entry point checks are correct (#20859) 2023-12-20 18:16:58 +01:00
Miroslav Jonaš
bf7e663168
feat(linter): add app import exception for remotes (#19301) 2023-09-28 00:25:11 +00:00
Craigory Coppola
de2824a450
feat(devkit): add method for tree-aware glob search (#19128) 2023-09-13 17:39:45 -04:00
jogelin
1f9b3c4a5c
fix(linter): Normalize paths when in getSourceFilePath (#18601)
Co-authored-by: jgelin <jgelin@seligent.com>
2023-08-17 11:28:52 +02:00
Miroslav Jonaš
6b82a2ff59
feat(linter): allow banning of deep/secondary paths (#17755) 2023-07-03 14:41:45 +02:00
Eric Yancey Dauenhauer
576262bb03
feat(linter): allow globs in onlyDependOnLibsWithTags eslint-plugin configuration option (#17530)
Co-authored-by: Miroslav Jonas <missing.manual@gmail.com>
2023-06-30 21:17:12 +02:00
Victor Savkin
0848031dd9 feat(core): move task hashing into daemon 2023-05-17 11:37:57 -04:00
Jason Jean
739b4c2924
feat(linter): rename @nx/eslint-plugin-nx to @nx/eslint-plugin (#16420) 2023-04-20 13:25:56 -04:00