Skip to content

feat!: no-unused-vars default caughtErrors to 'all' #18043

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

Merged

Conversation

JoshuaKGoldberg
Copy link
Contributor

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)
[x] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Changes the default value for the no-unused-vars rule's caughtErrors option from "none" to "all".

Fixes #17974.

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

@JoshuaKGoldberg JoshuaKGoldberg requested a review from a team as a code owner January 27, 2024 14:48
@eslint-github-bot eslint-github-bot bot added breaking This change is backwards-incompatible feature This change adds a new feature to ESLint labels Jan 27, 2024
Copy link

netlify bot commented Jan 27, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 466b371
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/65bb4acb4169a90008a4e0a6
😎 Deploy Preview https://deploy-preview-18043--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Tanujkanti4441
Copy link
Contributor

Tanujkanti4441 commented Jan 27, 2024

Could you change the docs too?

@JoshuaKGoldberg
Copy link
Contributor Author

D'oh, right, thanks.

@snitin315
Copy link
Contributor

snitin315 commented Jan 28, 2024

We need to mention this in the migration guide, where we have mentioned other breaking changes as well.

@mdjermanovic mdjermanovic added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jan 29, 2024
@@ -33,6 +33,7 @@ The lists below are ordered roughly by the number of users each change is expect
* [`no-restricted-imports` now accepts multiple config entries with the same `name`](#no-restricted-imports)
* [`"eslint:recommended"` and `"eslint:all"` strings no longer accepted in flat config](#string-config)
* [`no-inner-declarations` has a new default behavior with a new option](#no-inner-declarations)
* [`no-unused-vars` now defaults `caughtErrors` to `"all"`](#no-unused-vars)
Copy link
Member

Choose a reason for hiding this comment

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

As an aside, it would be nice in a separate PR to group all default rule option changes together in this list or a sub-list.

JoshuaKGoldberg and others added 2 commits January 30, 2024 14:24
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM pending @amareshsm's grammar update.

Copy link
Member

@amareshsm amareshsm left a comment

Choose a reason for hiding this comment

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

LGTM.

@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jul 31, 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 Jul 31, 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 feature This change adds a new feature to ESLint
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Rule Change: Change default for no-unused-var's caughtErrors option to "all"
7 participants