`max-len` rule `ignoreTemplateLiterals` not ignore multi-line template literals
See original GitHub issueTell us about your environment
- ESLint Version: 3.5.0
- Node Version: 6.2.1
- npm Version: 3.9.6
What parser (default, Babel-ESLint, etc.) are you using? Babel-eslint
Please show your full configuration: Isolated config and used only one rule.
"max-len": [
2,
100, {
"ignoreComments": true,
"ignoreTrailingComments": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
]
What did you do? Please include the actual source code causing the issue.
this.x = `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaa`;
What did you expect to happen? I expected eslint to not throw a max-len
error as I have ignoreTemplateLiterals turned on.
What actually happened? Please include the actual, raw output from ESLint. It threw an error for multi-line template literal.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to Create Multi-Line String with Template Literals
It's super easy now to create multi-line strings with Template Literals in JavaScript. No more messy string line breaks. Yay, ES6!
Read more >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)
Here are the configurations for ignoring comments, urls, strings, and template literals: “ignoreComments”: true; “ignoreUrls”: true; “ ...
Read more >vue/max-len
This rule enforces a maximum line length to increase code readability and maintainability. This rule is the similar rule as core max-len ...
Read more >max-len - ESLint - Pluggable JavaScript Linter
This rule enforces a maximum line length to increase code readability and ... "ignoreTemplateLiterals": true ignores lines that contain a template literal ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ljharb Thanks for the PR. I apologize for my late reply, I fell ill and was resting.
https://github.com/eslint/eslint/pull/7138 filed