space-unary-word-ops
要求在单数词运算符后有空格。
(已移除)此规则在 ESLint v0.10.0 中移除并被 space-unary-ops 所取代。
要求在单数词运算符后有空格。
规则细节
使用此规则的错误示例:
Open in Playground
typeof!a
Open in Playground
void{a:0}
Open in Playground
new[a][0]
Open in Playground
delete(a.b)
使用此规则的正确示例:
Open in Playground
delete a.b
Open in Playground
new C
Open in Playground
void 0
Version
This rule was introduced in ESLint v0.1.4 and removed in v0.10.0.