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.

Version 3.9.0 broke multiline array indentation

See original GitHub issue

Tell us about your environment

  • ESLint Version: v3.9.0
  • Node Version: v7.0.0-pre
  • npm Version: 3.10.8

What parser (default, Babel-ESLint, etc.) are you using? default

Please show your full configuration:

{
    "rules": {
        "indent": [
            "error",
            4
        ]
    }
}

What did you do? Please include the actual source code causing the issue.

var array = [1,
             2,
             3];

What did you expect to happen?

This was considered valid before this release. It would be great to have the first option for arrays too.

What actually happened? Please include the actual, raw output from ESLint.

2:14  error  Expected indentation of 4 spaces but found 13  indent
3:14  error  Expected indentation of 4 spaces but found 13  indent

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:10
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
not-an-aardvarkcommented, Nov 6, 2016

@eslint/eslint-team We need one more +1 to accept this issue; any takers?

@nunocastromartins Ideally, I think nothing would be disabled by default. The user shouldn’t have to specify ten different config options just to check indentation.

1reaction
not-an-aardvarkcommented, Oct 29, 2016

@ilyavolodin: I saw that you added the “regression”/“patch candidate” labels. However, I disagree that this is a regression; the bugfix is working as intended, which in this case means that more errors are reported. If we added an additional option, it would be semver-minor, not semver-patch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Indentation in multiline arrays with addition broken after reformat
What is the expected result? code should remain the same. What happens instead? Extra indentation added inside array. Please attach idea.log (Help->Show Log ......
Read more >
What's New In Python 3.9 — Python 3.11.1 documentation
Python 3.9 is the last version providing those Python 2 backward ... the indent option to dump() which allows it to produce a...
Read more >
Multiline f-string in Python - Stack Overflow
Any way to capture the entirety of the terminal? 0 · Indentation appears in the output string when broken it over multiple lines...
Read more >
Clang-Format Style Options - bcain-llvm
We'll use defaults from the LLVM style, but with 4 columns indentation. ... If true , always break before multiline string literals.
Read more >
PHP Documentation Standards | Coding Standards Handbook
1.1 Parameters That Are Arrays; 1.2 Deprecated Functions. 2. Classes ... PHPDoc supports multiple @since versions in DocBlocks for this explicit reason.
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