Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

False negative on function call parameter alignment #66

@hktonylee

Description

@hktonylee

In 7.15 the example shows that we need to align this way:

// good
function foo(
  bar,
  baz,
  quux,
) {
  // ...
}

and forbid this way

// bad
function foo(bar,
             baz,
             quux) {
  // ...
}

However the current tslint config does not report error in this example:

function test(a: any,
              ...args: any[]) {
  console.log(a);
}

const bbs = test(123,
                 456);

And now it even accepts the following intendation, which looks weird:

const bba = test(
          body.fieldA,
          body.fieldB,
          body.fieldC,
          body.fieldD,
          () => {
            console.log(1);
          },
    );

The current version I am using is ^5.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions