Skip to content

Disallow for-of #1122

@aboyton

Description

@aboyton

The style guide 11.1 says that you shouldn't use for-of and instead should use forEach (which I completely agree with).

That said, the ESLint rule no-iterator doesn't seem to enforce this, and the entry for no-restricted-syntax contains ForInStatement but not ForOfStatement.

Can we add ForOfStatement to no-restricted-syntax (or is the a better way of restricting for-of statements?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions