]> git.proxmox.com Git - pve-eslint.git/blob - eslint/docs/src/rules/space-unary-word-ops.md
import 8.41.0 source
[pve-eslint.git] / eslint / docs / src / rules / space-unary-word-ops.md
1 ---
2 title: space-unary-word-ops
3
4 ---
5
6 Requires spaces after unary word operators.
7
8 (removed) This rule was **removed** in ESLint v0.10.0 and **replaced** by the [space-unary-ops](space-unary-ops) rule.
9
10 Require spaces following unary word operators.
11
12 ## Rule Details
13
14 Examples of **incorrect** code for this rule:
15
16 ::: incorrect
17
18 ```js
19 typeof!a
20 ```
21
22 :::
23
24 ::: incorrect
25
26 ```js
27 void{a:0}
28 ```
29
30 :::
31
32 ::: incorrect
33
34 ```js
35 new[a][0]
36 ```
37
38 :::
39
40 ::: incorrect
41
42 ```js
43 delete(a.b)
44 ```
45
46 :::
47
48 Examples of **correct** code for this rule:
49
50 ::: correct
51
52 ```js
53 delete a.b
54 ```
55
56 :::
57
58 ::: correct
59
60 ```js
61 new C
62 ```
63
64 :::
65
66 ::: correct
67
68 ```js
69 void 0
70 ```
71
72 :::