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 rule doesn’t validate multiline expressions

See original GitHub issue

The following example has no error:

if (true) {
    a = (
1 +
2);
}

I would expect the following errors:

3:0  error  Expected indentation of 8 characters  indent
4:0  error  Expected indentation of 8 characters  indent

<bountysource-plugin>

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

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
Trottcommented, Apr 23, 2016

I’m working on something to hopefully address part of this issue, specifically enforcing indentation of multi-line chained properties. So the end user will be able to choose this style:

foo()
.bar
.baz();

Or this style instead:

foo()
  .bar
  .baz();

And so on…

4reactions
benderTheCrimecommented, Dec 7, 2016

Any indication as to when we can expect the fix associated with this will be available?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Break a statement (expression) into multiple lines: how to indent
Each of these is a valid expression that returns something (function, number, empty list) and then ignores the result and continues.
Read more >
Rules - ESLint - Pluggable JavaScript Linter
Rules in ESLint are grouped by type to help you understand their purpose. ... Disallow expressions where the operation doesn't affect the value....
Read more >
Rules - JavaScript Standard Style
This is a summary of the standard JavaScript rules. The best way to learn about standard is to just install it and give...
Read more >
Rules — yamllint 1.28.0 documentation
When linting a document with yamllint, a series of rules (such as line-length ... defines whether to lint indentation in multi-line strings.
Read more >
PEP 8: The Style Guide for Python Code
(See the previous discussion on multiline if-statements for further thoughts on the indentation of such multiline with -statements.) Another such case is with ......
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