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

Support no fail on empty lint run #19953

Closed
1 task done
aovens-quantifi opened this issue Oct 31, 2023 · 1 comment · Fixed by #19954
Closed
1 task done

Support no fail on empty lint run #19953

aovens-quantifi opened this issue Oct 31, 2023 · 1 comment · Fixed by #19954

Comments

@aovens-quantifi
Copy link
Contributor

Description

Currently @nx/eslint:lint throws an error when no files are found to lint (or all found files are ignored). I would like to have the option to suppress this error in order to support partial linting in CI. My goal is to pass all of the files changed in the PR to lintFilePatterns. I don't want to have to curate the list or conditionally run the task, I would simply like the lint executor to figure out what to lint and succeed if there are no files found.

Motivation

This would be a significant performance improvement on my large repo, only linting files that have changed

Suggested Implementation

Add an option to the executor: errorOnUnmatchedPattern (ESlint has a similar CLI flag: --no-error-on-unmatched-pattern) that defaults to true. Use this option to protect the throws

Alternate Implementations

I can't think of an alternative

Copy link

github-actions bot commented Dec 1, 2023

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant