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.

no-multi-spaces ignores multiple spaces before inline comments

See original GitHub issue

Tell 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:closed
  • Created 7 years ago
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
kaicataldocommented, Dec 4, 2016

That being said, I don’t think an option is necessary. As a user, I would expect these cases to be flagged.

2reactions
kaicataldocommented, Dec 4, 2016

@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

Read more comments on GitHub >

github_iconTop 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 >

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