Skip to content

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:

Now loading...

🚀 Version

This rule was introduced in v5.1.0.

📚 References