Skip to content

Commit a40348f

Browse files
docs: no-use-before-define tweaks (#19622)
* docs: no-use-before-define tweaks * tweak * the flag which shows * the rule * trunk fmt
1 parent 0ba3ae3 commit a40348f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/src/rules/no-use-before-define.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,20 +136,20 @@ export { foo };
136136
```
137137

138138
* `functions` (`boolean`) -
139-
The flag which shows whether or not this rule checks function declarations.
140-
If this is `true`, this rule warns every reference to a function before the function declaration.
141-
Otherwise, ignores those references.
142-
Function declarations are hoisted, so it's safe.
139+
This flag determines whether or not the rule checks function declarations.
140+
If this is `true`, the rule warns on every reference to a function before the function declaration.
141+
Otherwise, the rule ignores those references.
142+
Function declarations are hoisted, so it's safe to disable this option (note that some idiomatic patterns, such as [mutual recursion](https://en.wikipedia.org/wiki/Mutual_recursion), are incompatible with enabling this option).
143143
Default is `true`.
144144
* `classes` (`boolean`) -
145-
The flag which shows whether or not this rule checks class declarations of upper scopes.
146-
If this is `true`, this rule warns every reference to a class before the class declaration.
147-
Otherwise, ignores those references if the declaration is in upper function scopes.
148-
Class declarations are not hoisted, so it might be danger.
145+
This flag determines whether or not the rule checks class declarations of upper scopes.
146+
If this is `true`, the rule warns on every reference to a class before the class declaration.
147+
Otherwise, the rule ignores such references, provided the declaration is in an upper function scope.
148+
Class declarations are not hoisted, so it might be dangerous to disable this option.
149149
Default is `true`.
150150
* `variables` (`boolean`) -
151151
This flag determines whether or not the rule checks variable declarations in upper scopes.
152-
If this is `true`, the rule warns every reference to a variable before the variable declaration.
152+
If this is `true`, the rule warns on every reference to a variable before the variable declaration.
153153
Otherwise, the rule ignores a reference if the declaration is in an upper scope, while still reporting the reference if it's in the same scope as the declaration.
154154
Default is `true`.
155155
* `allowNamedExports` (`boolean`) -

0 commit comments

Comments
 (0)