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