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

[BUG] Add "max-len": ["error", 80] to .eslintrc.json and make it work #2029

Closed
isaacs opened this issue Oct 23, 2020 · 9 comments
Closed

[BUG] Add "max-len": ["error", 80] to .eslintrc.json and make it work #2029

isaacs opened this issue Oct 23, 2020 · 9 comments
Labels
Bug thing that needs fixing Enhancement new feature or improvement 💎 Free Internet Points 💎 similar to "Good First issue" - although more impactful Good First Issue good issue or PR for newcomers Priority Backlog a "backlogged" item that will be tracked in a Project Board Release 7.x work is associated with a specific npm 7 release

Comments

@isaacs
Copy link
Contributor

isaacs commented Oct 23, 2020

We have a lot of long lines, let's shorten them.

Be smart about making the choices to split lines, no fake internet points for cutting strings and making them unreadable!

@isaacs isaacs added Priority Backlog a "backlogged" item that will be tracked in a Project Board Enhancement new feature or improvement Good First Issue good issue or PR for newcomers Release 7.x work is associated with a specific npm 7 release 💎 Free Internet Points 💎 similar to "Good First issue" - although more impactful labels Oct 23, 2020
@ljharb
Copy link
Collaborator

ljharb commented Oct 23, 2020

You can configure max-len to ignore lines with long strings or regexes or urls; i suggest doing so. Example: https://github.com/airbnb/javascript/blob/2c5c88d0487db3024e8a20bb20f46933a03dd8aa/packages/eslint-config-airbnb-base/rules/style.js#L205

@darcyclarke darcyclarke added the Bug thing that needs fixing label Oct 30, 2020
@dominguetigs
Copy link

@isaacs
Is anyone doing this issue?

@Gurinderp
Copy link

Could I take on this issue if no one is currently working on it? @isaacs
Not sure if @dominguetigs still wants it.

@dominguetigs
Copy link

You can do it @Gurinderp

@tutur0001
Copy link

Can you assign me on this issue ? @isaacs

@Edu93Jer
Copy link
Contributor

Edu93Jer commented Dec 6, 2020

Hi @isaacs is anyone still working on the case? If no, could you please explain to me a little more about the project, I'm a newbie and would like to contribute, or is the issue is closed?

@Edu93Jer
Copy link
Contributor

@darcyclarke - @isaacs, so I just added the "max-len" to the .eslintrc.json, but what do you mean with make it work?
It should be working right, just adding this rules...
"max-len": ["error", 80, { "ignoreUrls": true, "ignoreComments": false, "ignoreRegExpLiterals": true, "ignoreStrings": true, "ignoreTemplateLiterals": true }]

@isaacs
Copy link
Contributor Author

isaacs commented Dec 16, 2020

Well, there are quite a few places (iirc?) that are longer than 80 chars. So npm run lint should not raise any errors with that option.

@a2br
Copy link

a2br commented Dec 29, 2020

Looks like #2361 has been merged. Shouldn't this issue be closed too?

@ljharb ljharb closed this as completed Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Enhancement new feature or improvement 💎 Free Internet Points 💎 similar to "Good First issue" - although more impactful Good First Issue good issue or PR for newcomers Priority Backlog a "backlogged" item that will be tracked in a Project Board Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants