]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/docs/src/rules/no-implicit-coercion.md
import 8.41.0 source
[pve-eslint.git] / eslint / docs / src / rules / no-implicit-coercion.md
index 746c9889f5a87fba74dda50e7d6a676a0b07d07b..a7d305420593dcf06a1f57a539bc3cff9122669d 100644 (file)
@@ -1,6 +1,5 @@
 ---
 title: no-implicit-coercion
-layout: doc
 rule_type: suggestion
 ---
 
@@ -103,6 +102,8 @@ Examples of **correct** code for the default `{ "number": true }` option:
 var n = Number(foo);
 var n = parseFloat(foo);
 var n = parseInt(foo, 10);
+
+var n = foo * 1/4; // `* 1` is allowed when followed by the `/` operator
 ```
 
 :::