@starkertyp/eslint-no-for-in
v1.1.0
Published
Custom eslint rule that blocks for in loops
Downloads
18
Readme
Simple plugin that blocks for..in loops. In my experience they seem to be mostly used by accident when for..of is actually intended.
Usage in eslint.config.js
const noForIn = require("@starkertyp/eslint-no-for-in");
module.exports = [
{
files: ["examples/*.js"],
plugins: {
"starkertyp": noForIn
},
rules: {
"starkertyp/no-for-in": "error"
}
}
]
Changelog
1.1.0
- Add a fix