Skip to content

Commit

Permalink
[[CHORE]] Align value with variable name
Browse files Browse the repository at this point in the history
The name `isLoneArrowParam` implies a value that is `true` when the
identifier in question is a parameter for an arrow function. Update the
value and the subsquent reference to align with this name.
  • Loading branch information
jugglinmike authored and rwaldron committed Nov 7, 2019
1 parent c43f4ad commit 69767ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jshint.js
Expand Up @@ -2247,11 +2247,11 @@ var JSHINT = (function() {
// ...it should not be considered as a variable in the current scope. It
// will be added to the scope of the new function when the next token is
// parsed, so it can be safely ignored for now.
var isLoneArrowParam = state.tokens.next.id !== "=>";
var isLoneArrowParam = state.tokens.next.id === "=>";

if (isReserved(context, this)) {
warning("W024", this, v);
} else if (isLoneArrowParam && !state.funct["(comparray)"].check(v)) {
} else if (!isLoneArrowParam && !state.funct["(comparray)"].check(v)) {
state.funct["(scope)"].block.use(v, state.tokens.curr);
}

Expand Down

0 comments on commit 69767ed

Please sign in to comment.