]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/docs/rules/no-unused-vars.md
import eslint 7.28.0
[pve-eslint.git] / eslint / docs / rules / no-unused-vars.md
index 2b3f093cc99830b3f28ac87ef93903f4256c14f0..30647031eb1513d4440ad9da1b959cedc05e47e5 100644 (file)
@@ -74,7 +74,7 @@ myFunc = setTimeout(function() {
     myFunc();
 }, 50);
 
-// Only the second argument from the descructured array is used.
+// Only the second argument from the destructured array is used.
 function getY([, y]) {
     return y;
 }
@@ -214,8 +214,11 @@ Examples of **correct** code for the `{ "ignoreRestSiblings": true }` option:
 
 ```js
 /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/
-// 'type' is ignored because it has a rest property sibling.
-var { type, ...coords } = data;
+// 'foo' and 'bar' were ignored because they have a rest property sibling.
+var { foo, ...coords } = data;
+
+var bar;
+({ bar, ...coords } = data);
 ```
 
 ### argsIgnorePattern