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 issue

See original GitHub issue

Tell us about your environment

  • ESLint Version: 3.7.1
  • Node Version: 6.7.0
  • npm Version: 3.10.8

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

Please show your full configuration:

{
    "rules": {
        "indent": "error"
    }
}

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

JSON
    .stringify(
        {
            test: "test"
        }
    );

What did you expect to happen? No warnings

What actually happened? Please include the actual, raw output from ESLint. Warnings: 3:9 - Expected indentation of 4 spaces but found 8. (indent) 4:13 - Expected indentation of 8 spaces but found 12. (indent) 5:9 - Expected indentation of 4 spaces but found 8. (indent)

Issue Analytics

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

github_iconTop GitHub Comments

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

No, I think it would be:

{
    "rules": {
      "indent": ["error", 4, {"CallExpression": {"arguments": 1}}]
    }
}

because the 1 refers to indent levels, which are multiplied by the indent size (4).

0reactions
alexander-akaitcommented, Jan 31, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

[indent][meta issue] Problems with the indent rule #1824
TL;DR - the indent rule is broken on TypeScript codebases. Due to bandwidth constraints it will remain broken indefinitely unless the community ...
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 >
indent - Rule
Rule: indent. Enforces indentation with tabs or spaces. Rationale. Using only one of tabs or spaces for indentation leads to more consistent editor...
Read more >
Cannot fix eslint rule on indenting case statements in switch ...
In the following example, ESLint's indent rule is causing errors in a typescript file.
Read more >
Importing 'indent' rule from ESLint configuration ... - YouTrack
Importing 'indent' rule from ESLint configuration should disable conflicting settings. 2. Relates to 1 Is duplicated by 2. Relates to 1 issue (0...
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