Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linter): add option to ignore files based on pattern #18863

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Aug 28, 2023

This PR adds a ignoredFiles option to the @nx/dependency-checks rule. Useful for build config files that import dev-only dependencies.

The @nx/js:lib generator that adds the checks for package.json will also ignore build configuration files such that packges imported in them will not count towards production dependencies.

e.g. vite.config.ts imports vite, which is not a production dependency so should not be reported as a missing dependency.

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@jaysoo jaysoo requested review from a team as code owners August 28, 2023 14:32
@vercel
Copy link

vercel bot commented Aug 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Aug 28, 2023 7:29pm

@jaysoo jaysoo self-assigned this Aug 28, 2023
@jaysoo jaysoo added the scope: linter Issues related to Eslint support in Nx label Aug 28, 2023
@jaysoo jaysoo force-pushed the feat/linter-dep-check-ignore-files branch from a01d6b7 to e9b9501 Compare August 28, 2023 14:58
Copy link
Contributor

@meeroslav meeroslav left a comment

Choose a reason for hiding this comment

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

Looks good but please add migration as part of this PR (can be done separately as well)

@jaysoo jaysoo force-pushed the feat/linter-dep-check-ignore-files branch 3 times, most recently from cb27631 to 6b6d7e9 Compare August 28, 2023 17:53
@jaysoo jaysoo added the PR status: do not merge This will block a PR from being merged until this tag is removed. label Aug 28, 2023
@jaysoo
Copy link
Member Author

jaysoo commented Aug 28, 2023

Doing some local testing before merging.

- Useful for build config files that import dev-only dependencies
@jaysoo jaysoo force-pushed the feat/linter-dep-check-ignore-files branch from 6b6d7e9 to f23b2b0 Compare August 28, 2023 19:28
@jaysoo jaysoo removed the PR status: do not merge This will block a PR from being merged until this tag is removed. label Aug 28, 2023
@jaysoo jaysoo merged commit 90ca436 into nrwl:master Aug 28, 2023
@jaysoo jaysoo deleted the feat/linter-dep-check-ignore-files branch August 28, 2023 20:36
@github-actions
Copy link

github-actions bot commented Sep 3, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: linter Issues related to Eslint support in Nx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants