镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

One-liner arrow functions are indented incorrectly #31237

Description

Repro: https://github.com/aleclarson/repro/tree/tslint-1

When a one-liner arrow function has its parameters span multiple lines, the return value is incorrectly indented.

export const Bar = ({
  foo,
  bar,
}: any) => (
    <div>Hello world</div>
  )

Activity

  1. mjbvz commented on May 3, 2019

    @mjbvz

    Moving to typescript since this is not tslint related

    Tested with typescript@3.5.0-dev.20190503

    Similar to #19167

  2. aleclarson commented on May 3, 2019

    @aleclarson
    Author

    Note: It seems to override any code fixes applied by other TSLint rules. (eg: tslint-plugin-prettier)

  3. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterFix AvailableA PR has been opened for this issueVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestone

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions