Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9ddb645

Browse files
authored
Apply suggestions from code review
Signed-off-by: Athan <kgryte@gmail.com>
1 parent 3c1f395 commit 9ddb645

File tree

1 file changed

+3
-4
lines changed
  • lib/node_modules/@stdlib/_tools/eslint/rules/no-unnecessary-nested-functions/lib

1 file changed

+3
-4
lines changed

‎lib/node_modules/@stdlib/_tools/eslint/rules/no-unnecessary-nested-functions/lib/main.js‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function referencesOuterVariables( node, context ) {
149149
* @private
150150
* @param {string} varName - variable name
151151
* @param {Object} startScope - scope to start searching from
152-
* @returns {Object|null} scope where variable is defined or null if not found
152+
* @returns {(Object|null)} scope where variable is defined or null if not found
153153
*/
154154
function findVariableScope( varName, startScope ) {
155155
var currentScope;
@@ -177,7 +177,7 @@ function findVariableScope( varName, startScope ) {
177177
* @private
178178
* @param {ASTNode} node - function declaration node
179179
* @param {Object} context - ESLint context
180-
* @returns {Object|null} highest scope object or null if cannot be moved
180+
* @returns {(Object|null)} highest scope object or null if cannot be moved
181181
*/
182182
function getHighestPossibleScope( node, context ) {
183183
var parentFuncScope;
@@ -200,8 +200,7 @@ function getHighestPossibleScope( node, context ) {
200200
highestScope = highestScope.upper;
201201
}
202202

203-
// If we're already at module level, we still want to check if we can move there
204-
// (This handles the case where the function is directly nested in a top-level function)
203+
// If we're already at module level, we still want to check if we can move there (note: this handles the case where the function is directly nested in a top-level function)...
205204

206205
// Check all references in this function's scope...
207206
for ( i = 0; i < currentScope.references.length; i++ ) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /