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.

Make "indent" rule support ObjectPattern

See original GitHub issue

What version are you using?

 $ ./bin/eslint --version
 v3.11.0

What did you do?

$ cat | eslint --env es6  \
>              --parser-options '{"ecmaVersion":7,"sourceType":"module"}' \
>              --rule '{"indent":["error",4],"}' --no-eslintrc --stdin
const {
 a,
b,
   c
} = foo;^D

What happened?

No errors were reported by eslint.

What did you expect to happen?

Would like it if indent rule violations were reported for the foo const and for other object patterns.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
maxenglandercommented, Nov 28, 2016

Hey @gyandeeps I wrote the example in backwards, sorry. I originally wrote

const foo = {
    a,
  b,
      c
};

When I meant to write

const {
 a,
b,
   c
} = foo;^D
0reactions
gyandeepscommented, Nov 28, 2016

closing as duplicate of #6813 … lets continue the conversation their.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[indent][meta issue] Problems with the indent rule #1824
So I began the process of forking the base rule codebase by copying it over and adding types (#439). I had grand plans...
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 >
Adjust indents and spacing - Microsoft Support
Use Paragraph settings to change indentation, line spacing, ... To quickly create a hanging indent using the ruler, see Create a hanging indent....
Read more >
Prettier and eslint indents not working together - Stack Overflow
As per this Kai Cataldo's comment on this GitHub issue: ESLint's indent rule and Prettier's indentation styles do not match - they're ...
Read more >
indent | typescript-eslint
Enforce consistent indentation. ... indent. danger. We strongly recommend you do not use this rule or any other ... It adds support for...
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