-
Notifications
You must be signed in to change notification settings - Fork 15
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(lint): add complexity rules to picasso #860
Conversation
.eslintrc
Outdated
"max-lines": [ | ||
"error", | ||
{ | ||
"max": 150, |
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.
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.
So weird now that you pointed that out, I started to get many more errors... Yes, you are probably right, will increase to 200 it's pretty common limit.
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.
maybe 300 as for the beginning? 😄
47eb406
to
883f3b9
Compare
d24614b
to
d1ccbae
Compare
🎉 Last commit is successfully deployed 🎉 Demo is available on: Your davinci-bot 🚀 |
* Also you have cool destructuring feature, use it. | ||
*/ | ||
"complexity": ["warn", { "max": 5 }], | ||
"max-params": ["warn", 3], |
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 would probably start with this, based on warnings we will see what to tweak and what to add to davinci
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'm fine with this change, let's try it out.
PS @OleksandrNechai did you fix formatting manually? :) it was done by prettier-standard
🎉 This PR is included in version 3.42.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
FX-592
As we do not have much experience in complexity I was inspired by airbnb rules and this post:airbnb/javascript#1758. Especially this comment:
Taken comment from here: airbnb/javascript#1089
Another article was used.
All these rules cause 26 errors in staff-portal and hundreds in picasso. Do not worry, most of them are in autogenerated Icons :-)