1.0.3 • Published 3 years ago

eslint-plugin-no-implicit-map-set-loops v1.0.3

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
3 years ago

eslint-plugin-no-implicit-map-set-loops

What is this?

This is a rule that disallows implicitly iterating over Maps and Sets. For example:

const myMap = new Map();

// Bad
for (const [key, value] of myMap) {}

// Good
for (const [key, value] of myMap.entries()) {}

This is useful because implicit iteration does not work robustly with the TypeScriptToLua transpiler.

How do I use it?

  • npm install --save-dev eslint-plugin-no-implicit-map-set-loops
  • Add "plugin:no-implicit-map-set-loops/recommended" to the extends section of your .eslintrc.js file.

What rules does this plugin provide?

It only provides one rule: "no-implicit-map-set-loops/no-implicit-map-set-loops"