Skip to content

A case not handled by no-for-loop #295

@chiawendt

Description

@chiawendt

Issuehunt badges

/* eslint unicorn/no-for-loop: 2 */

const arr = [];

for (let i = 0, j = arr.length; i < j; i += 1) {
  const element = arr[i];
  console.log(element);
}

no-for-loop should report on this but it does not.

This slightly unusual pattern is used all over the place in eslint-plugin-react.

This issue is a subtask of #250.

IssueHunt Summary

Sponsors (Total: $40.00)

Become a sponsor now!

Or submit a pull request to get the deposits!

Tips

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions