es-x/no-function-declarations-in-if-statement-clauses-without-block ​
disallow function declarations in if statement clauses without using blocks
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
This rule reports Annex B feature the function declarations in if statement clauses without using blocks as errors.
💡 Examples ​
â›” Examples of incorrect code for this rule:
🚀 Version ​
This rule was introduced in v5.1.0.