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

[eslint] Enforce max-len #2381

Merged
merged 1 commit into from
Dec 5, 2015
Merged

[eslint] Enforce max-len #2381

merged 1 commit into from
Dec 5, 2015

Conversation

oliviertassinari
Copy link
Member

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)

@oliviertassinari
Copy link
Member Author

@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.',
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍 👍 😁

@alitaheri
Copy link
Member

@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" />
Copy link
Member

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?

Copy link
Member Author

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 😁

Copy link
Member

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.

@oliviertassinari
Copy link
Member Author

Alright, I'm gona fix the object. And ignore the rest, for now.
Thanks for reviewing.

@oliviertassinari oliviertassinari merged commit dc73f45 into mui:master Dec 5, 2015
@oliviertassinari oliviertassinari deleted the eslint-max-len branch December 5, 2015 14:23
@alitaheri
Copy link
Member

nice work 👍

@zannager zannager added package: system Specific to @mui/system package: eslint Specific to eslint-plugin-material-ui labels Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: eslint Specific to eslint-plugin-material-ui package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants