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

chore: enable stricter typescript checks #459

Merged
merged 2 commits into from
Jan 14, 2025
Merged

chore: enable stricter typescript checks #459

merged 2 commits into from
Jan 14, 2025

Conversation

43081j
Copy link
Member

@43081j 43081j commented Jan 10, 2025

Enables noUnusedLocals and noUnusedParameters.

assuming my similar change lands in pathe, it'd be good to enable them here too. if you'd rather keep them off, let me know and we can close this

Enables `noUnusedLocals` and `noUnusedParameters`.
Copy link

pkg-pr-new bot commented Jan 10, 2025

Open in Stackblitz

npm i https://pkg.pr.new/unjs/unplugin@459

commit: 5b67b42

@sxzz
Copy link
Member

sxzz commented Jan 11, 2025

In @antfu/eslint-config, we're using an ESLint plugin for checking unused vars and params

@43081j
Copy link
Member Author

43081j commented Jan 11, 2025

we are, and arguably don't need to once every project uses typescript (or at least scope it to *.js)

i'd still enable these for strictness and consistency, then update the eslint config to be more specific

the reason the TSESLint no-unused-vars rule exists is mostly because you might want to configure it, or you want to use eslint-ignore comments. though they do recommend it instead of typescript's flags because of that

if we don't need to ever configure or ignore these though, i would've just used the compiler. let me know, i don't mind either way as long as we get agreement

@antfu
Copy link
Member

antfu commented Jan 13, 2025

I am up to having noUnusedLocals, but not very sure about noUnusedParameters - as it doesn't bring much value in my opinion, force to add an understand prefix doesn't change we still need to declare the arg

@43081j
Copy link
Member Author

43081j commented Jan 13, 2025

updated to remove noUnusedParameters

@antfu antfu merged commit cb83b45 into main Jan 14, 2025
13 checks passed
@antfu antfu deleted the stricter-ts branch January 14, 2025 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants