Warm tip: This article is reproduced from serverfault.com, please click

What is the TsLint rule name for breaking lambda expression arrow?

发布于 2020-02-01 18:34:49

I used the syntax with broken arrow like this.

const result = data.map( _ 
  => this.reallyLongExpressionSoBreakingArrowMakesSense(_));

Then I noticed that TsLint flagged the spot and gave me the following information.

Line terminator not permitted before arrow. (ts1200)

I haven't found anything similar to it in my tslint.json so I went to the docs to see what the actual name is. As far I can see, there's nothing corresponding to the message.

  1. What is the TsLint rule corresponding to the message?
  2. What is the point of ts1200 in the parentheses after the message?
Questioner
Konrad Viltersten
Viewed
11
Balázs Takács 2020-02-02 03:01:51
  1. Seems like there is no tslint rule for that, only ESLint.
  2. ts1200 the code of the error. Check it here. Check the original pr here.