Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint: enable @typescript-eslint/no-unnecessary-type-assertion #292

Merged
merged 2 commits into from
Feb 19, 2021

Conversation

0b5vr
Copy link
Contributor

@0b5vr 0b5vr commented Dec 17, 2019

lintに不要なtype assertionを怒ってくれるルールを追加しました。
eslint-typescriptの型解析機能を使う必要がありますので、lintのパフォーマンスに問題がないかを先に見ておきたいです。

@0b5vr 0b5vr added the Refactor Cool code is cool label Dec 17, 2019
@0b5vr 0b5vr self-assigned this Dec 17, 2019
@0b5vr
Copy link
Contributor Author

0b5vr commented Dec 17, 2019

CircleCI覗いてみたら、Lint時間がだいたい2.8秒から4.2秒くらいになったらしいです。許容範囲かな?

@0b5vr 0b5vr marked this pull request as ready for review December 17, 2019 10:59
@0b5vr
Copy link
Contributor Author

0b5vr commented Feb 19, 2021

strict-boolean-expressions というもっと便利なルールがあって、それも型の情報が必要らしい。これはさすがに見逃せないので、ついでにこれも入れちゃいます

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md

@0b5vr
Copy link
Contributor Author

0b5vr commented Feb 19, 2021

strict-boolean-expressions 、想像を遥かに絶する怒られが発生したので、一旦これでマージします。

@0b5vr 0b5vr merged commit fd77714 into dev Feb 19, 2021
@0b5vr 0b5vr deleted the eslint-no-unnecessary-type-assertion branch February 19, 2021 07:47
@0b5vr 0b5vr added this to the next milestone Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Cool code is cool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant