no-loop-func
Disallow function declarations that contain unsafe references inside loop statements.
Attributes
- Included in configs
- ✅ Recommended
- 🔒 Strict
- Fixable
- 🔧 Automated Fixer
- 💡 Suggestion Fixer
- 💭 Requires type information
Rule Details
This rule extends the base eslint/no-loop-func
rule.
It adds support for TypeScript types.
How to Use
.eslintrc.cjs
module.exports = {
// Note: you must disable the base rule as it can report incorrect errors
"no-loop-func": "off",
"@typescript-eslint/no-loop-func": "warn"
};
Options
See eslint/no-loop-func
options.
Taken with ❤️ from ESLint core