Skip to content

[indent] indentation level of template string interpolation #652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cainlevy opened this issue Jun 26, 2019 · 1 comment
Closed

[indent] indentation level of template string interpolation #652

cainlevy opened this issue Jun 26, 2019 · 1 comment
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@cainlevy
Copy link

Repro

{
  "rules": {
    "@typescript-eslint/indent": ["error", 2]
  }
}
let styled: any; // as from styled-components
styled`
  color: red;
  > child {
    ${(props) =>
      'color: blue'
    }
  }
`;

Expected Result

No error.

Actual Result

  • 6:1 error Expected indentation of 4 spaces but found 6 @typescript-eslint/indent
  • 7:1 error Expected indentation of 0 spaces but found 4 @typescript-eslint/indent

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 1.11.0
@typescript-eslint/parser 1.11.0
TypeScript 3.5.2
ESLint 6.0.1
node 12.1.0
npm 6.9.0
@cainlevy cainlevy added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Jun 26, 2019
@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for team members to take a look labels Jun 26, 2019
@bradzacher bradzacher added this to the indent rewrite milestone Jun 26, 2019
@bradzacher
Copy link
Member

Merging into #1824

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

2 participants