Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
mschile committed Apr 28, 2023
1 parent 84274f2 commit ad396fb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/rules/no-unnecessary-waiting.js
Expand Up @@ -60,7 +60,6 @@ function isIdentifierNumberConstArgument (node, scope) {
const resolvedIdentifier = scope.references.find((ref) => ref.identifier === identifier).resolved
const definition = resolvedIdentifier.defs[0]
const isVariable = definition.type === 'Variable'
const isImportBinding = definition.type === 'ImportBinding'

// const amount = 1000 or const amount = '@alias'
// cy.wait(amount)
Expand All @@ -73,9 +72,7 @@ function isIdentifierNumberConstArgument (node, scope) {
// import { WAIT } from './constants'
// cy.wait(WAIT)
// we don't know if WAIT is a number or alias '@someRequest', so don't fail
if (isImportBinding) {
return false
}
if (definition.type === 'ImportBinding') return false

const param = definition.node.params[definition.index]

Expand Down

0 comments on commit ad396fb

Please sign in to comment.