Skip to content

multi-line argument indentation #14596

Closed
Closed
@WuTheFWasThat

Description

@WuTheFWasThat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions