Tell us about your environment
- ESLint Version: 5.16.0
- Node Version: 10.16.0 (current LTS)
- npm Version: 6.9.0
What parser (default, Babel-ESLint, etc.) are you using? default
Please show your full configuration:
Configuration
Minimal working example for .eslintrc.json:
{
"rules": {
"max-len": [
"error",
{
"code": 20,
"ignoreTrailingComments": true
}
]
}
}
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
test.js:
"this is fine"; // Some comment... bla bla bla
"this is fine"; /* Some inline comment... */
"this isn't"; /* inline */ // Some other comment
What did you expect to happen?
No error, as trailing comments should be ignored.
What actually happened? Please include the actual, raw output from ESLint.
2:1 error Line 2 exceeds the maximum line length of 20 max-len
Comments
This happens when the trailing comments include an inline as well as a line comment.
I'm happy to submit a pull request if this is recognized as a bug.
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using? default
Please show your full configuration:
Configuration
Minimal working example for
.eslintrc.json:What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
test.js:What did you expect to happen?
No error, as trailing comments should be ignored.
What actually happened? Please include the actual, raw output from ESLint.
Comments
This happens when the trailing comments include an inline as well as a line comment.
I'm happy to submit a pull request if this is recognized as a bug.