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
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,7 @@ By default this rule is enabled with `all` option for caught errors and variable
142
142
"args": "after-used",
143
143
"caughtErrors": "all",
144
144
"ignoreRestSiblings": false,
145
+
"ignoreUsingDeclarations": false,
145
146
"reportUsedIgnorePattern": false
146
147
}]
147
148
}
@@ -461,6 +462,34 @@ class Foo {
461
462
462
463
:::
463
464
465
+
### ignoreUsingDeclarations
466
+
467
+
The `ignoreUsingDeclarations` option is a boolean (default: `false`). Explicit resource management allows automatic teardown of disposables by calling `Symbol.dispose` or `Symbol.asyncDispose` method implicitly at the end of the variable's scope. When this option is set to `true`, this rule ignores variables declared with `using` or `await using`.
468
+
469
+
Examples of **incorrect** code for the `{ "ignoreUsingDeclarations": true }` option:
0 commit comments