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.

Indent of comments

See original GitHub issue
"indent": [1, 4, {
            "SwitchCase": 1,
            "VariableDeclarator": 1
        }],
function a() {
//comment
    alert('hello world')
}

Expected result:

2:1 Expected indentation of 4 space characters but found 0 indent

ESLint version v1.3.1 v1.4.3 Both has same result - “no warning/no error”.

<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:14
  • Comments:32 (25 by maintainers)

github_iconTop GitHub Comments

4reactions
nzakascommented, Jul 25, 2016

@azhang496 no problem, thanks for giving it a shot.

2reactions
not-an-aardvarkcommented, Mar 31, 2017

This is fixed as part of the indent rewrite, which is expected to be merged as part of the 4.0 release in a few weeks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Comments (indent: Indent and Format C Program Source)
indent attempts to distinguish between comments which follow statements, comments which follow declarations, comments following preprocessor directives, and ...
Read more >
HTML Indentation, Spacing, and Comments
At Epicodus, we indent our code 2 spaces and use tabs instead of spaces for indentation. ... Most coding languages have the ability...
Read more >
Comments and indentation | PracticalSeries: Web Development
Indentation (the practice of indenting code further across the page) is used to make the code more legible. It works like this: in...
Read more >
Extra Space Indent in Comments in Word - Microsoft Community
This white space takes up about 75% of the comment bubble, leaving everything else in a long vertical line of unreadable text. Any...
Read more >
Is it good practise to indent inline comments? - Stack Overflow
Is it good practise to indent inline comments? · Adding comment on top of the code with a space increases it's readability.. So,...
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