You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/rules/no-unused-vars.md
+60-60Lines changed: 60 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -247,25 +247,6 @@ Examples of **correct** code for the `{ "args": "none" }` option:
247
247
248
248
:::
249
249
250
-
### ignoreRestSiblings
251
-
252
-
The `ignoreRestSiblings` option is a boolean (default: `false`). Using a [Rest Property](https://github.com/tc39/proposal-object-rest-spread) it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.
253
-
254
-
Examples of **correct** code for the `{ "ignoreRestSiblings": true }` option:
// 'foo' and 'bar' were ignored because they have a rest property sibling.
261
-
var { foo, ...coords } = data;
262
-
263
-
var bar;
264
-
({ bar, ...coords } = data);
265
-
```
266
-
267
-
:::
268
-
269
250
### argsIgnorePattern
270
251
271
252
The `argsIgnorePattern` option specifies exceptions not to check for usage: arguments whose names match a regexp pattern. For example, variables whose names begin with an underscore.
@@ -285,47 +266,6 @@ foo();
285
266
286
267
:::
287
268
288
-
### destructuredArrayIgnorePattern
289
-
290
-
The `destructuredArrayIgnorePattern` option specifies exceptions not to check for usage: elements of array destructuring patterns whose names match a regexp pattern. For example, variables whose names begin with an underscore.
291
-
292
-
Examples of **correct** code for the `{ "destructuredArrayIgnorePattern": "^_" }` option:
The `caughtErrors` option is used for `catch` block arguments validation.
@@ -395,6 +335,66 @@ try {
395
335
396
336
:::
397
337
338
+
### destructuredArrayIgnorePattern
339
+
340
+
The `destructuredArrayIgnorePattern` option specifies exceptions not to check for usage: elements of array destructuring patterns whose names match a regexp pattern. For example, variables whose names begin with an underscore.
341
+
342
+
Examples of **correct** code for the `{ "destructuredArrayIgnorePattern": "^_" }` option:
The `ignoreRestSiblings` option is a boolean (default: `false`). Using a [Rest Property](https://github.com/tc39/proposal-object-rest-spread) it is possible to "omit" properties from an object, but by default the sibling properties are marked as "unused". With this option enabled the rest property's siblings are ignored.
382
+
383
+
Examples of **correct** code for the `{ "ignoreRestSiblings": true }` option:
0 commit comments