-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[eslint] Enforce max-len #2381
[eslint] Enforce max-len #2381
Conversation
@subjectix Could you review ? Feel free to merge. |
@@ -90,7 +90,8 @@ export default class AppBarPage extends React.Component { | |||
name: 'title', | |||
type: 'node', | |||
header: 'optional', | |||
desc: 'The title to display on the app bar. Could be number, string, element or an array containing these types.', | |||
desc: 'The title to display on the app bar. ' + | |||
'Could be number, string, element or an array containing these types.', |
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.
Use template string like below, keep consistency.
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 guess we should, that we be simpler when moving the description to the source code.
By the way, I have started doing it with one component to test.
Expect a PR soon.
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.
nice 👍 👍 😁
@oliviertassinari Don't sweat it, ignore the template string comments, there are too many, and not just in this PR. I'll make another PR to make them consistent all across the lib. just take care of the objects and prop formats :D |
|
||
<IconButton iconClassName="muidocs-icon-custom-github" tooltip="top-left" tooltipPosition = "top-left" /> | ||
<IconButton iconClassName="muidocs-icon-custom-github" tooltip="bottom-right" | ||
tooltipPosition="bottom-right" /> |
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 think props should be formatted properly too like this:
<IconButton
iconClassName="muidocs-icon-custom-github"
tooltip="bottom-right"
tooltipPosition="bottom-right" />
Thoughts?
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 is a eslint rule for this. Could be a good idea to enforce it.
But I would say it's for later 😁
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.
Ooo, I didn't know that. nice 👍 Sure, let's enforce that rule later too.
Alright, I'm gona fix the object. And ignore the rest, for now. |
nice work 👍 |
This is needed to review github PRs without having to scroll, same for reading the source code on my IDE.
I'm using
120
that's the minimum.We could use
80
as suggested by Airbnb, but that's more work to do (https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/rules/legacy.js#L6)