Create-react-app: Upgrade typescript-eslint to v2

Created on 14 Aug 2019  路  2Comments  路  Source: facebook/create-react-app

v2 supports ESLint 6. However it also includes a number of breaking changes so we need to determine if any of them will impact our users: https://github.com/typescript-eslint/typescript-eslint/releases/tag/v2.0.0

typescript

Most helpful comment

@typescript-eslint/no-angle-bracket-type-assertion is deprecated. So we need to change this line:

https://github.com/facebook/create-react-app/blob/4410f5ec30783cc60360b6e2306b95eead56c015/packages/eslint-config-react-app/index.js#L81

It's now called @typescript-eslint/consistent-type-assertions. I believe it can be set as:

{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' }

Not so sure about objectLiteralTypeAssertions though. There wasn't any existing rule on our config related to this.

All 2 comments

@typescript-eslint/no-angle-bracket-type-assertion is deprecated. So we need to change this line:

https://github.com/facebook/create-react-app/blob/4410f5ec30783cc60360b6e2306b95eead56c015/packages/eslint-config-react-app/index.js#L81

It's now called @typescript-eslint/consistent-type-assertions. I believe it can be set as:

{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' }

Not so sure about objectLiteralTypeAssertions though. There wasn't any existing rule on our config related to this.

Is there a release ETA for this? I see it's already been PRed and merged. Great job and thanks, btw! 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Aranir picture Aranir  路  3Comments

jnachtigall picture jnachtigall  路  3Comments

dualcnhq picture dualcnhq  路  3Comments

AlexeyRyashencev picture AlexeyRyashencev  路  3Comments

alleroux picture alleroux  路  3Comments