eslint-plugin-cypress 2.13.2 → 2.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- name: 'Closed Issue Comment'
1
+ name: 'Handle Comment Workflow'
2
2
  on:
3
3
  issue_comment:
4
4
  types:
5
5
  - created
6
6
  jobs:
7
7
  closed-issue-comment:
8
- uses: cypress-io/cypress/.github/workflows/triage_closed_issue_comment.yml@develop
8
+ uses: cypress-io/cypress/.github/workflows/triage_handle_new_comments.yml@develop
9
9
  secrets: inherit
package/circle.yml CHANGED
@@ -22,7 +22,7 @@ workflows:
22
22
  jobs:
23
23
  lint:
24
24
  docker:
25
- - image: circleci/node:8
25
+ - image: circleci/node:16
26
26
  steps:
27
27
  - checkout
28
28
  - run:
@@ -34,7 +34,7 @@ jobs:
34
34
 
35
35
  test-v4:
36
36
  docker:
37
- - image: circleci/node:8
37
+ - image: circleci/node:16
38
38
  steps:
39
39
  - checkout
40
40
  - run:
@@ -46,7 +46,7 @@ jobs:
46
46
 
47
47
  test-v5:
48
48
  docker:
49
- - image: circleci/node:8
49
+ - image: circleci/node:16
50
50
  steps:
51
51
  - checkout
52
52
  - run:
@@ -58,7 +58,7 @@ jobs:
58
58
 
59
59
  test-v6:
60
60
  docker:
61
- - image: circleci/node:8
61
+ - image: circleci/node:16
62
62
  steps:
63
63
  - checkout
64
64
  - run:
@@ -70,7 +70,7 @@ jobs:
70
70
 
71
71
  release:
72
72
  docker:
73
- - image: circleci/node:8
73
+ - image: circleci/node:16
74
74
  steps:
75
75
  - checkout
76
76
  - run:
@@ -69,6 +69,11 @@ function isIdentifierNumberConstArgument (node, scope) {
69
69
  return typeof definition.node.init.value === 'number'
70
70
  }
71
71
 
72
+ // import { WAIT } from './constants'
73
+ // cy.wait(WAIT)
74
+ // we don't know if WAIT is a number or alias '@someRequest', so don't fail
75
+ if (definition.type === 'ImportBinding') return false
76
+
72
77
  const param = definition.node.params[definition.index]
73
78
 
74
79
  // function wait (amount) { cy.wait(amount) }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "eslint-plugin-cypress",
3
- "version": "2.13.2",
3
+ "version": "2.13.4",
4
4
  "description": "An ESLint plugin for projects using Cypress",
5
5
  "main": "index.js",
6
- "author": "Chris Breiding (chris@cypress.io)",
6
+ "author": "Cypress-io",
7
7
  "license": "MIT",
8
8
  "keywords": [
9
9
  "eslint",
@@ -22,7 +22,7 @@
22
22
  "eslint": ">= 3.2.1"
23
23
  },
24
24
  "dependencies": {
25
- "globals": "^11.12.0"
25
+ "globals": "^13.20.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@cypress/eslint-plugin-dev": "3.2.0",
@@ -6,7 +6,7 @@ const RuleTester = require('eslint').RuleTester
6
6
  const ruleTester = new RuleTester()
7
7
 
8
8
  const errors = [{ messageId: 'unexpected' }]
9
- const parserOptions = { ecmaVersion: 6 }
9
+ const parserOptions = { ecmaVersion: 6, sourceType: 'module' }
10
10
 
11
11
  ruleTester.run('no-unnecessary-waiting', rule, {
12
12
  valid: [
@@ -27,6 +27,11 @@ ruleTester.run('no-unnecessary-waiting', rule, {
27
27
  { code: 'function customWait (ms) { cy.wait(ms) }', parserOptions, errors },
28
28
  { code: 'const customWait = (ms) => { cy.wait(ms) }', parserOptions, errors },
29
29
 
30
+ { code: 'import BAR_BAZ from "bar-baz"; cy.wait(BAR_BAZ)', parserOptions },
31
+ { code: 'import { FOO_BAR } from "foo-bar"; cy.wait(FOO_BAR)', parserOptions },
32
+ { code: 'import * as wildcard from "wildcard"; cy.wait(wildcard.value)', parserOptions },
33
+ { code: 'import { NAME as OTHER_NAME } from "rename"; cy.wait(OTHER_NAME)', parserOptions },
34
+
30
35
  // disable the eslint rule
31
36
  {
32
37
  code: `