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.

different indentation for function arguments of same nesting level expected

See original GitHub issue

Version: 1.10.3 Parser: default Rule: "indent": 2

// EX.1 eslint complains
lib.then(function() {
    lib.waitFor(function then() {
            x = 1;
        }, // A
        function onTimeout() {
            x = 2;
        }, // B
        500
    );
});

// Ex.2 eslint happy
lib.then(function() {
    lib.waitFor(function then() {
        x = 1;
    }, // A
        function onTimeout() {
            x = 2;
        }, // B
        500
    );
});

this does not appear to be right. A and B are on the same nesting level, yet ESLint approves EX.2 instead of EX.1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
isonmadcommented, Dec 30, 2016

This still potentially affects other people and nothing in eslint has changed, couldn’t this still be open?

0reactions
colinjoycommented, Dec 29, 2016

we were able to adapt our code-style so it pleases eslint. thank you for the input.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can a line of Python code know its indentation nesting level?
the two calls to get_nesting_level are at different nesting levels, despite the fact that the leading whitespace is identical.
Read more >
Incorrect (potentially) indentation of function arguments ...
I would expect to see this result instead though: function myFunc(arg1 ... Align constructor and function params to have the same indent ......
Read more >
Indenting C Programs
"Levels" of Indentation ... The observation to make is that the body of a statement is one level deeper than the statement's own...
Read more >
indent - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
PEP 8 – Style Guide for Python Code
Use 4 spaces per indentation level. Continuation lines should align wrapped elements either vertically using Python's implicit line joining ...
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