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

New: max-lines rule (fixes #6078) #6321

Merged
merged 1 commit into from Jun 10, 2016
Merged

New: max-lines rule (fixes #6078) #6321

merged 1 commit into from Jun 10, 2016

Conversation

alberto
Copy link
Member

@alberto alberto commented Jun 4, 2016

No description provided.

@eslintbot
Copy link

LGTM

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @nzakas, @scriptdaemon and @pedrottimark to be potential reviewers


This rule has a number or object option:

* `"max"` (default `100`) enforces a maximum number of lines in a file
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

@alberto alberto Jun 6, 2016

Choose a reason for hiding this comment

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

Thanks @TimvdLippe good catch. I intended to leave it as it is in JSCS (100) when I noticed it was different from what was proposed, but forgot to update the code.

@mysticatea why did you change it from 100 to 300? @eslint/eslint-team any opinions on what value this should be?

Copy link
Contributor

Choose a reason for hiding this comment

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

Keep it at the same default as JSCS for maximum compatibility.

Copy link
Member

Choose a reason for hiding this comment

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

That's an interesting question for larger discussion-- does JSCS compatibility mean match JSCS as closely as possible to make integration require less effort, or is ESLint allowed to have a different opinion on defaults and "JSCS compatibility" merely means there is a way to run your old JSCS settings in ESLint (even with different/non-default configuration)?

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 matching JSCS is the way to go.

Copy link
Member

Choose a reason for hiding this comment

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

I'm sorry, I'm not sure why I changed it. No reason.

Copy link
Member

Choose a reason for hiding this comment

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

There is no "default" for this rule in JSCS, what mentioned in the docs is just an example.

100 feels weird to me, i'd say http://www.mind2b.com/component/content/article/24-software-module-size-and-file-size is interesting, my vote for default (if one should exist) is 500

Copy link
Member Author

@alberto alberto Jun 8, 2016

Choose a reason for hiding this comment

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

Oh, you are right, sorry for misleading here. We do have defaults for every rule, so yes, we have to choose one.

I'd go with something lower, the 300 lines proposed by @mysticatea seems like the sweet spot according to the article you linked. :D

Copy link
Member

Choose a reason for hiding this comment

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

👍 for 300

@nzakas
Copy link
Member

nzakas commented Jun 6, 2016

Overall looks good, just need to update the default and the docs.

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@alberto
Copy link
Member Author

alberto commented Jun 7, 2016

PR updated addressing comments above.

@eslintbot
Copy link

LGTM

@alberto
Copy link
Member Author

alberto commented Jun 8, 2016

Default value updated to 300.

@markelog
Copy link
Member

markelog commented Jun 9, 2016

Default value updated to 300.

Perhaps we can add some sort of explanation why we choose this number?

@nzakas
Copy link
Member

nzakas commented Jun 9, 2016

Agree with @markelog, I think a little note and a reference to that link would go a long way.

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@nzakas
Copy link
Member

nzakas commented Jun 10, 2016

Lgtm

@nzakas nzakas merged commit 2520f5a into master Jun 10, 2016
@alberto alberto deleted the issue6078 branch June 13, 2016 19:48
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet