Suggestion: Add no-shadow
warning/error to eslint rules
#2842
lukasbuenger
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I've only been dabbling with Remix over the course of the last few weekends. I know it's only really a small tooling thing but I particularly liked how the Eslint presets imho strike a very good balance between being basic enough to not restrict varying coding styles on one hand, but also opinionated enough to communicate some preferences on the other.
That being said, I really miss the
no-shadow
rule. I always find it a little puzzling when linting rules don't check for this. From my experience it's one of the most tedious sources of bugs to debug in Javascript as a whole and I've seen it happening to folks of all levels of professional experience, especially since top level arrow functions became a thing. I admit that enforcingno-shadow
can incentivise pretty weird variable names but considering how seldom you actually have to adjust code because of it and how utterly miserable bugs caused by the patterns the rule catches make people feel on average, I think it's an absolute no-brainer.What are your thoughts on this? Would this be something you'd consider adding to your presets? If not, what is your reasoning?
Kind regards,
Lukas
Beta Was this translation helpful? Give feedback.
All reactions