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

Chore: enable max-len. #9414

Merged
merged 2 commits into from
Oct 22, 2017
Merged

Chore: enable max-len. #9414

merged 2 commits into from
Oct 22, 2017

Conversation

aladdin-add
Copy link
Member

@aladdin-add aladdin-add commented Oct 12, 2017

What is the purpose of this pull request? (put an "X" next to item)

[ ] Other, please explain:

What changes did you make? (Give an overview)

Is there anything you'd like reviewers to focus on?

since we are using 4 spaces indent, it's very easy to exceed 120, I set max-len to 160 and ignore options to true.

@eslintbot
Copy link

LGTM

@aladdin-add aladdin-add changed the title Chore: enable max-len. wip: Chore: enable max-len. Oct 12, 2017
@not-an-aardvark not-an-aardvark added the chore This change is not user-facing label Oct 13, 2017
@eslintbot
Copy link

LGTM

@eslintbot
Copy link

LGTM

@aladdin-add aladdin-add changed the title wip: Chore: enable max-len. Chore: enable max-len. Oct 16, 2017
@ilyavolodin
Copy link
Member

Oh, could we please not enable this rule. I have it enabled on my code-base, and I absolutely hate it. I don't see the value in limiting the length of the string, but it creates a huge number of formatting inconsistencies the developers need to spend time fixing.

@platinumazure
Copy link
Member

@ilyavolodin This PR enables the ignoreStrings option (and pretty much all ignore options). So strings don't have to be artificially broken up (unless the line is already too long even without the string, and in that case the string can go down a line). Am I missing something?

@ilyavolodin
Copy link
Member

max-len rule take into account indentation. So in the deeply nested code, you have almost no space to write your statements. I don't know, I personally just really dislike this rule. If everyone else on the team wants it in - I'll adjust.

@not-an-aardvark
Copy link
Member

I don't really feel strongly about enabling max-len. That said, I generally think it's good to replace style nitpicks with linting rules. (I think this PR was created as a result of #9389 (comment).)

If the max-len rule has ergonomic issues that are preventing us from using it, we might also want to examine whether we can fix those issues to make it easier for other users to use it.

@platinumazure
Copy link
Member

Deeply nested code also probably could/should be refactored into functions. 😀 But I don't strongly mind whether we turn this on or not.

@ilyavolodin
Copy link
Member

I just know that I've had max-len enabled on my work project for a year now, and I finally gave up and disabled it few days ago, cause I couldn't force myself to constantly correct my code when it's perfectly readable as is. So it's a personal thing. As I said, if everyone else fills like we should enable it, I'll adjust (I've been doing it for over a year, so it's inconvenient but fine).

@aladdin-add
Copy link
Member Author

aladdin-add commented Oct 21, 2017

haha, I had the similar experience. so the config is as tolerant as possible.
Actually we have abide by it -- there are only ~10 errors in the repo! no worries~ 😄

@aladdin-add aladdin-add merged commit 3204773 into eslint:master Oct 22, 2017
@aladdin-add aladdin-add deleted the max-len branch October 22, 2017 18:04
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Apr 21, 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 Apr 21, 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 chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants