Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

multi-line argument indentation #14596

Copy link
Copy link
@WuTheFWasThat

Description

@WuTheFWasThat
Issue body actions

I've seen a number of indentation related bugs floating around but none quite like this. Not sure if this is fixed by #13574.

TypeScript Version: 2.2.1

Explanation

  public async setPosition(path: Path, col: Col, 
                           cursorOptions?: CursorOptions) {
    await this._setPath(path);
    await this.setCol(col, cursorOptions);
  }

  public async setPath(path: Path, cursorOptions?: CursorOptions) {
    await this._setPath(path);
    await this._fromMoveCol(cursorOptions);
  }

gets autoformatted to

  public async setPosition(path: Path, col: Col,
                           cursorOptions?: CursorOptions) {
                             await this._setPath(path);
                             await this.setCol(col, cursorOptions);
                           }

                           public async setPath(path: Path, cursorOptions?: CursorOptions) {
                             await this._setPath(path);
                             await this._fromMoveCol(cursorOptions);
                           }

If the arguments to setPosition are put on a single line, then it works fine.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatterHelp WantedYou can do thisYou can do this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.