Skip to content

Conversation

me4502
Copy link
Contributor

@me4502 me4502 commented Jun 12, 2023

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[X] Add something to the core
[ ] Other, please explain:

https://github.com/eslint/rfcs/tree/main/designs/2023-only-run-reporting-rules

Fixes #16450

What changes did you make? (Give an overview)

This PR implements the RFC around only running rules that actually report information in quiet mode. This adds a predicate function that is passed down to the runRules function that filters out all non-error rules when the --quiet flag is entered and maxWarnings is not in use. All rules returning false from the predicate function are skipped during rule running.

TODO:

  • Tests
  • Documentation changes
  • Ignoring of unused disable directives

I believe the --max-warnings flag handling is already covered by the existing tests, as from a test perspective it only cares about if it still works with quiet mode (everything else is an implementation detail). I've added tests that the ruleFilter option does actually filter out rules to the linter.

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot bot added breaking This change is backwards-incompatible feature This change adds a new feature to ESLint labels Jun 12, 2023
@github-actions
Copy link

Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.

@github-actions github-actions bot added the Stale label Jun 22, 2023
@Rec0iL99 Rec0iL99 removed the Stale label Jun 22, 2023
@Rec0iL99
Copy link
Member

Not stale. Work in progress.

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.

@github-actions github-actions bot added the Stale label Jul 3, 2023
@me4502
Copy link
Contributor Author

me4502 commented Jul 3, 2023

Sorry am still working on it; have been a bit busy and given this is blocked by the next major release it’s not too high on my list of priorities as I’m assuming that’s still at least a little while away - I’ll try to finish it up sometime soonish then rebase it every so often to keep the bot happy

@Rec0iL99 Rec0iL99 removed the Stale label Jul 4, 2023
@github-actions
Copy link

Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.

@github-actions github-actions bot added the Stale label Jul 14, 2023
@me4502
Copy link
Contributor Author

me4502 commented Jul 15, 2023

Not stale sorry, I’ve been fairly busy

@Rec0iL99 Rec0iL99 removed the Stale label Jul 15, 2023
@github-actions
Copy link

Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.

@github-actions github-actions bot added the Stale label Jul 25, 2023
@me4502 me4502 force-pushed the feature/quiet-mode-skip-warnings branch from ca15aa6 to d7f3918 Compare July 26, 2023 00:51
@netlify
Copy link

netlify bot commented Jul 26, 2023

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 504cfa5
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/658aa57c87fbb40008815f6c

@github-actions
Copy link

github-actions bot commented Aug 6, 2023

Hi everyone, it looks like we lost track of this pull request. Please review and see what the next steps are. This pull request will auto-close in 7 days without an update.

@github-actions github-actions bot added the Stale label Aug 6, 2023
@me4502 me4502 force-pushed the feature/quiet-mode-skip-warnings branch from 57ee39c to 451edeb Compare August 6, 2023 23:54
@fasttime fasttime removed the Stale label Aug 7, 2023
@me4502 me4502 force-pushed the feature/quiet-mode-skip-warnings branch 2 times, most recently from 44f46c5 to bd74353 Compare August 21, 2023 02:19
@me4502 me4502 force-pushed the feature/quiet-mode-skip-warnings branch from bd74353 to acff363 Compare August 28, 2023 02:46
@me4502 me4502 marked this pull request as ready for review August 28, 2023 02:52
@me4502 me4502 requested a review from a team as a code owner August 28, 2023 02:52
@me4502
Copy link
Contributor Author

me4502 commented Aug 28, 2023

I believe this should be ready for review. I looked over it and wrote some tests to validate that the ruleFilter option on the linter functions correctly, and the interactions with the --max-warnings flag appear to be fully covered by existing tests

@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jun 25, 2024
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion breaking This change is backwards-incompatible contributor pool feature This change adds a new feature to ESLint

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Change Request: stop running rules set to "warn" when --quiet is used

5 participants