ESLint v8.x reached end-of-life on 2024-10-05 and is no longer maintained. Upgrade or consider long-term support options
Selecting a version will take you to the chosen version of the ESLint docs.

no-spaced-func

Disallow spacing between function identifiers and their applications (deprecated)

🔧 Fixable

Some problems reported by this rule are automatically fixable by the --fix command line option

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:

Open in Playground
/*eslint no-spaced-func: "error"*/

fn ()

fn
()

Examples of correct code for this rule:

Open in Playground
/*eslint no-spaced-func: "error"*/

fn()

Version

This rule was introduced in ESLint v0.1.2.

Resources

Theme Switcher

Selecting a language will take you to the ESLint website in that language.