Skip to content

Repo: Enable no-unused vars caughtErrors: all internally #8224

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

Closed
JoshuaKGoldberg opened this issue Jan 8, 2024 · 1 comment · Fixed by #8369
Closed

Repo: Enable no-unused vars caughtErrors: all internally #8224

JoshuaKGoldberg opened this issue Jan 8, 2024 · 1 comment · Fixed by #8369
Labels
accepting prs Go ahead, send a pull request that resolves this issue locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Jan 8, 2024

#8142 (comment) reminded me that we don't have any linting to prevent unused catch locals.

In our repo right now, this would present zero lint complaints from @typescript-eslint/no-unused-vars:

try {
  // ...
} catch (error) {
  // ...
}

Proposal: let's set https://eslint.org/docs/latest/rules/no-unused-vars#caughterrors to "all" in our lint config?

@JoshuaKGoldberg JoshuaKGoldberg added triage Waiting for team members to take a look repo maintenance things to do with maintenance of the repo, and not with code/docs labels Jan 8, 2024
@JoshuaKGoldberg
Copy link
Member Author

Since eslint/eslint#17974 was merged, it'll be enabled by the next ESLint major anyway. I'll go ahead and send a PR now in the interim.

@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Feb 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
@bradzacher bradzacher added the locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. label Apr 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue locked due to age Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing. repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants