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's unexpected warnings around method chaining.

See original GitHub issue

I got unexpected warnings of indentations around method chaining. ESLint v1.6.0 This might be duplicate of #4076.

/* eslint-env es6 */
/* eslint indent:[2,4] */
http.get(`http://localhost:${port}/`, () => {
        reject(new Error("Already started."));
    })
    .on("error", () => {
        resolve();
    });

image

I expected no errors.

I can resolve this with below:

/* eslint-env es6 */
/* eslint indent:[2,4] */
http
    .get(`http://localhost:${port}/`, () => {
        reject(new Error("Already started."));
    })
    .on("error", () => {
        resolve();
    });

If http was longer, I would do so, but…

<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
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
gyandeepscommented, Apr 14, 2017

@eslint/eslint-team I think we can close this ? No movement for so long and we haven’t seen any big traction for this style.

1reaction
ilyavolodincommented, Aug 26, 2016

@kaicataldo That was my task (grouping all indent rules and triaging all of them). Unfortunately I have been unable to complete it yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto-indent lines feature wrongly indents multiline chained ...
Auto-indent lines feature wrongly indents multiline chained method calls ; Relates to 1 issue (1 unresolved) · PY-33832 ; Is duplicated by 6...
Read more >
indentation for method chaining [closed] - c++ - Stack Overflow
Method chaining is a way to cram more onto a line, so if we're then going to split the lines back out again,...
Read more >
Style Rule Set | Detekt
Style Rule Set. The Style ruleset provides rules that assert the style of the code. This will help keep code in line with...
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 - ESLint - Pluggable JavaScript Linter
Rules in ESLint are grouped by type to help you understand their purpose. ... no-unexpected-multiline ... Require braces around arrow function bodies.
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