Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

@typescript-eslint/prefer-for-of #97

Open
tetsuharuohzeki opened this issue Apr 22, 2019 · 1 comment
Open

@typescript-eslint/prefer-for-of #97

tetsuharuohzeki opened this issue Apr 22, 2019 · 1 comment

Comments

@tetsuharuohzeki
Copy link
Contributor

No description provided.

@tetsuharuohzeki
Copy link
Contributor Author

Today, in almost case, we don't have to write for loop because native implementations which supports
iterator protocols or you might use some down-level transformers. So I think we should enable this rule.

If your application cannot use any down-level transformers or if you face to some perf issue,
let's disable this.
If you would like to ban for-of loop by that the transformed code is large,
then it might be more better to ban for-of syntax.

However, by the implementation of this rule v1.7, this mis-reports the error even if the collection in for loop does not have Symbol.iterator().

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant