disallow spacing between function identifiers and their applications (no-spaced-func)

The --fix option on the command line can automatically fix some of the problems reported by this rule.

This rule was deprecated in ESLint v3.3.0 and replaced by the func-call-spacing rule.

While it's possible to have whitespace between the name of a function and the parentheses that execute it, such patterns tend to look more like errors.

Rule Details

This rule disallows spacing between function identifiers and their applications.

Examples of incorrect code for this rule:

/*eslint no-spaced-func: "error"*/

fn ()

fn
()

Examples of correct code for this rule:

/*eslint no-spaced-func: "error"*/

fn()

Version

This rule was introduced in ESLint 0.1.2.

Resources

Js中文网,专注分享前端最新技术、大厂面试题、聊点程序员轶事、职场感悟,做前端技术的传播者.

加入前端布道师交流群

扫描二维码回复 加群 学习,与大厂大佬讨论技术.

BAT面试题大全