Skip to content

Commit

Permalink
rename whitelist to allow (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-shehane committed Jun 25, 2020
1 parent a217e2e commit d4263fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ You can add rules:
}
```

You can whitelist globals provided by Cypress:
You can allow certain globals provided by Cypress:

```json
{
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/no-assigning-return-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = {
},
}

const whitelistedCommands = {
const allowedCommands = {
now: true,
spy: true,
state: true,
Expand All @@ -61,7 +61,7 @@ function isCypressCommandDeclaration (declarator) {

const parent = get(object, 'parent.property.name') || get(declarator, 'id.name')

if (commandName && (whitelistedCommands[commandName] || whitelistedCommands[parent])) return
if (commandName && (allowedCommands[commandName] || allowedCommands[parent])) return

return object.name === 'cy'
}

0 comments on commit d4263fb

Please sign in to comment.