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
Update: add ignoreRestSiblings option to no-unused-vars (#7968)
Update: no-unused-vars to account for rest property omissions
Update docs
Update: use RestProperty and only check last property
Temp
temp
temp
Use parent type
@@ -195,6 +195,18 @@ Examples of **correct** code for the `{ "args": "none" }` option:
195
195
})();
196
196
```
197
197
198
+
### ignoreRestSiblings
199
+
200
+
The `ignoreRestSiblings` option is a boolean (default: `false`). Using a [Rest Property](https://github.com/sebmarkbage/ecmascript-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.
201
+
202
+
Examples of **correct** code for the `{ "ignoreRestSiblings": true }` option:
// 'type' is ignored because it has a rest property sibling.
207
+
var { type, ...coords } = data;
208
+
```
209
+
198
210
### argsIgnorePattern
199
211
200
212
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.
0 commit comments