no-multi-spaces ignores multiple spaces before inline comments
See original GitHub issueTell us about your environment
- ESLint Version: v3.10.2
- Node Version: v7.2.0
- npm Version: 4.0.2
What parser (default, Babel-ESLint, etc.) are you using? default
What did you do? Please include the actual source code causing the issue.
$ eslint --no-eslintrc foo.js
/*eslint no-multi-spaces: "error"*/
console.log('hello', 'world'); // comment
What did you expect to happen?
Two problems should be reported ('world'
, // comment
)
What actually happened? Please include the actual, raw output from ESLint.
foo.js
2:23 error Multiple spaces found before ''world'' no-multi-spaces
✖ 1 problem (1 error, 0 warnings)
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (13 by maintainers)
Top Results From Across the Web
No-multi-spaces - ESLint - W3cubDocs
This rule's configuration consists of an object with the following properties: "ignoreEOLComments": true (defaults to false ) ignores multiple spaces before ...
Read more >At least two spaces before inline comment (E261) - Flake8 Rules
Inline comments should have two spaces before them. Often programmers will only include one space, which will trigger this warning.
Read more >vue/no-multi-spaces
This rule aims at removing multiple spaces in tags, which are not used for indentation. 1. 2.
Read more >eslintrc.json - Google Git
"no-extra-parens": "error",. "no-prototype-builtins": "error", ... "no-inline-comments": "off", ... "no-whitespace-before-property": "error",.
Read more >Reduce smelling code and detect JavaScript issues with ESLint
Not all Linters analyze source code for performance and security, but some do. ... Instead, use the mentioned inline comment options.
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 Free
Top 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
That being said, I don’t think an option is necessary. As a user, I would expect these cases to be flagged.
@platinumazure I vote for semver-minor fix and, if we see requests for an option to relax comments at the end of lines, implement the option then