-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: loosen up eslint rules #7335
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if wouldn't be feasible to provide each config there with a set of strict rules (enabled conditionally) which would enable some of these "blocking" rules.
These rules would be intended for a development, while for demos/ clients projects we would deliver configs with strict rules disabled (or even better - without strict enabled)
@Razz21 that proposal makes sense, I'll add it to our backlog! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we change these rules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes like that affects the whole company. It will have a great impact on the code quality and it should be not merged in such task. I understand the problem of reducing warnings when we lint the code but the goal should be do align with the best possible set of rules that will help us maintain the code, not to remove rules to address the threshold requirement. Such changes deserves RFC with an explanation of why do we things like we do. Currently warns are mostly harmless and it is a shame that we ignore them in the first place. If we turn off relative rules it will be nothing more like turning your back to the problem.
"@typescript-eslint/no-use-before-define": [ | ||
"warn", | ||
{ | ||
functions: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making that change. I never understood why we disallowed ordering functions by relevance and making good use of hoisting.
Can we get use cases and reasoning? The statement that some rules are problematic is not so mature here. We need a wider discussion about these rules, some of them are a real pain in the ass, but at the same time, they're quite important, and someone decided to use them not on top of a hunch, right? |
@lukasborawski @lsliwaradioluz @bartoszherba Sorry, I thought those rules will be rather insignificant for you. I'll move everything else into storefronts repo as I don't want to waste too much of your time on eslint-rules-related discussions 😄 Sorry again, should've pinged you for your opinion |
I think this package may miss |
2315801
to
9e8ef46
Compare
9e8ef46
to
d4b279a
Compare
Quality Gate passedIssues Measures |
https://alokai.atlassian.net/browse/UST-1825