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
{{ message }}
Repository navigation
Commit 48d5cc4
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/src/rules/no-use-before-define.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,12 +148,14 @@ export { foo };
148
148
This flag determines whether or not the rule checks class declarations of upper scopes.
149
149
If this is `true`, the rule warns on every reference to a class before the class declaration.
150
150
Otherwise, the rule ignores such references, provided the declaration is in an upper function scope.
151
+
References inside a synchronous, non-generator function expression that is called directly before the declaration (an IIFE) are still reported, because the function body runs immediately.
151
152
Class declarations are not hoisted, so it might be dangerous to disable this option.
152
153
Default is `true`.
153
154
*`variables` (`boolean`) -
154
155
This flag determines whether or not the rule checks variable declarations in upper scopes.
155
156
If this is `true`, the rule warns on every reference to a variable before the variable declaration.
156
157
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.
158
+
References inside a synchronous, non-generator function expression that is called directly before the declaration (an IIFE) are also reported, because the function body runs immediately.
157
159
Default is `true`.
158
160
*`allowNamedExports` (`boolean`) -
159
161
If this flag is set to `true`, the rule always allows references in `export {};` declarations.
0 commit comments