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/rules/consistent-boolean-name.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ Boolean names should start with a prefix that makes the boolean meaning clear.
15
15
16
16
Names that start with a boolean prefix should also refer to booleans or boolean-returning functions. Unknown values are ignored.
17
17
18
+
Configured wrapper bindings may use boolean prefixes when a configured property or method provides a boolean-like value. This applies only to variables and parameters that are not reassigned.
19
+
18
20
Reports for property and method names, and reports for non-boolean values using boolean prefixes, do not provide rename suggestions.
19
21
20
22
The default prefixes are:
@@ -231,6 +233,44 @@ And this would fail:
231
233
constdidUpdate=true;
232
234
```
233
235
236
+
### wrappers
237
+
238
+
Type: `Record<string, string>`\
239
+
Default: `{}`
240
+
241
+
Map unqualified TypeScript wrapper type names to the property or method that provides a boolean-like value. Same-named types share configuration. Derived types, intersections, and constrained type parameters are supported. Members may provide `boolean`, `Promise<boolean>`, or `PromiseLike<boolean>`; nullable results are accepted. Requires TypeScript type information.
0 commit comments