no-spaced-func

不允许函数标识符及其应用之间的空格(不推荐)

🔧 Fixable

此规则报告的一些问题可通过 --fix 命令行 选项自动修复

Important

This rule was deprecated in ESLint v3.3.0. Please use the corresponding rule in @stylistic/eslint-plugin.

Learn more

虽然函数名和执行它的括号之间可以有空格,但这种模式看起来更像是错误。

¥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()

版本

此规则是在 ESLint v0.1.2 中引入。

资源