question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`eslint-disable-line` causes line `max-len`

See original GitHub issue
import CommonService from "./service/commons"; // eslint-disable-line no-unused-vars
ESLint Warning max-len Line 1 exceeds the maximum line length of 80. at line 1 col 1

Could we add another comment like this, to disable the next line?

// eslint-disable-next-line no-unused-vars
import CommonService from "./service/commons";

My ESLint version is v1.9.0.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nzakascommented, Nov 18, 2015

You can already do this:

/* eslint-disable no-unused-vars */
import CommonService from "./service/commons";
/* eslint-enable no-unused-vars */
0reactions
Zorgatonecommented, Nov 18, 2015

The code here is an example. I could be disabling any rule there

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable eslint rule max line length for paragraph in ...
Original Answer. AFAIK, there is no way to apply eslint rules to the template, and specifically to one line in a template. I...
Read more >
How To Use and Disable ESLint Max-Len (Line Length Rule)
The ESLint max-len rule is a useful rule for clean code and code organization. However, it is not enabled by default in ESLint, ......
Read more >
max-len - ESLint - Pluggable JavaScript Linter
This rule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number...
Read more >
max-lines suppression should not need to be the first ... - GitHub
If I move /* eslint-disable max-lines */ to be the first line in the file, then it correctly suppresses the error.
Read more >
Use ignore pattern of eslint for max-lenth to allow for long ...
When working with Vue and Typescript the default settings for eslint are to complain about lines longer then 140 characters.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found