eslint-plugin-cypress 6.4.3 → 6.4.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.
package/CONTRIBUTING.md CHANGED
@@ -29,7 +29,7 @@ To add a new rule:
29
29
  - Add a `meta.messages` property (see [MessageIds](https://eslint.org/docs/latest/extend/custom-rules#messageids))
30
30
  - Select the appropriate `meta.type` property using `problem`, `suggestion`, or `layout`
31
31
  - Complete the new rule by adding content to the three files previously created
32
- - Run `eslint-doc-generator` to generate automated documentation sections (see [Document generation](#document-generation) below)
32
+ - Run `npx eslint-doc-generator` to generate automated documentation sections (see [Document generation](#document-generation) below)
33
33
  - Review documentation changes
34
34
  - Run `npm run lint`
35
35
  - Run `npm run format`
@@ -41,14 +41,17 @@ To add a new rule:
41
41
 
42
42
  ## Document generation
43
43
 
44
- This plugin uses the ESLint [eslint-doc-generator](https://www.npmjs.com/package/eslint-doc-generator) to generate consistent documentation.
44
+ This plugin uses the [eslint-doc-generator](https://www.npmjs.com/package/eslint-doc-generator) package to generate consistent documentation.
45
45
 
46
- - Install with `npm install eslint-doc-generator@latest -g`
47
- - Run `eslint-doc-generator` in the root directory of the plugin
46
+ - Run `npx eslint-doc-generator` in the root directory of the plugin
48
47
 
49
- Note that [eslint-doc-generator](https://www.npmjs.com/package/eslint-doc-generator) has some unresolved issues running under
50
- Microsoft Windows (see issue[#265](https://github.com/cypress-io/eslint-plugin-cypress/issues/265)).
51
- Do not attempt to run under Windows until these issues are resolved.
48
+ Previous compatibility issues with Windows are resolved, and
49
+ [eslint-doc-generator](https://www.npmjs.com/package/eslint-doc-generator)
50
+ is now installed together with other dependencies through `npm ci`.
51
+ If you previously had [eslint-doc-generator](https://www.npmjs.com/package/eslint-doc-generator) installed globally,
52
+ to work with this repo, you can now uninstall it:
53
+
54
+ - Run `npm uninstall eslint-doc-generator -g` (only if previously installed)
52
55
 
53
56
  ## Merging pull requests
54
57
 
package/README.md CHANGED
@@ -114,9 +114,7 @@ import pluginCypress from 'eslint-plugin-cypress'
114
114
  export default defineConfig([
115
115
  {
116
116
  files: ['cypress/**/*.js'],
117
- extends: [
118
- pluginCypress.configs.recommended,
119
- ],
117
+ extends: [pluginCypress.configs.recommended],
120
118
  rules: {
121
119
  'cypress/no-unnecessary-waiting': 'off',
122
120
  },
@@ -134,9 +132,7 @@ import pluginCypress from 'eslint-plugin-cypress'
134
132
  export default defineConfig([
135
133
  {
136
134
  files: ['cypress/**/*.js'],
137
- extends: [
138
- pluginCypress.configs.globals,
139
- ],
135
+ extends: [pluginCypress.configs.globals],
140
136
  },
141
137
  ])
142
138
  ```
@@ -160,7 +156,7 @@ If you already have a TypeScript codebase, you can skip the next step. If not, y
160
156
  "allowJs": true,
161
157
  "checkJs": false,
162
158
  "noEmit": true
163
- },
159
+ }
164
160
  }
165
161
  ```
166
162
 
@@ -177,7 +173,7 @@ export default defineConfig([
177
173
  projectService: true,
178
174
  },
179
175
  },
180
- }
176
+ },
181
177
  ])
182
178
  ```
183
179
 
@@ -26,7 +26,10 @@ Examples of **correct** code for this rule:
26
26
  cy.get('elem').should('have.text', 'blah')
27
27
  cy.get('.err').should('be.empty').and('be.hidden')
28
28
  cy.contains('Login').and('be.visible')
29
- cy.get('foo').should('be.visible').and('have.text', 'bar').and('have.class', 'active')
29
+ cy.get('foo')
30
+ .should('be.visible')
31
+ .and('have.text', 'bar')
32
+ .and('have.class', 'active')
30
33
  ```
31
34
 
32
35
  ## When Not To Use It
@@ -22,16 +22,16 @@ cy.get('[daedta-cy=submit]').click()
22
22
  cy.get('[d-cy=submit]')
23
23
  cy.get('.btn-large').click()
24
24
  cy.get('.btn-.large').click()
25
- cy.get(condition ? "[data-cy=submit]" : ".btn-large")
25
+ cy.get(condition ? '[data-cy=submit]' : '.btn-large')
26
26
 
27
- const CLASS_SELECTOR = ".my-class";
27
+ const CLASS_SELECTOR = '.my-class'
28
28
  cy.get(CLASS_SELECTOR)
29
29
 
30
30
  const TYPE = 'submit'
31
31
  const SUBMIT_TEMPLATE = `.${TYPE}`
32
32
  cy.get(SUBMIT_TEMPLATE)
33
33
 
34
- const MY_SUBMIT_TEMPLATE = SUBMIT_TEMPLATE;
34
+ const MY_SUBMIT_TEMPLATE = SUBMIT_TEMPLATE
35
35
  cy.get(MY_SUBMIT_TEMPLATE)
36
36
  ```
37
37
 
@@ -41,16 +41,16 @@ Examples of **correct** code for this rule:
41
41
  cy.get('[data-cy=submit]').click()
42
42
  cy.get('[data-QA=submit]')
43
43
  cy.get(`[data-QA=submit]`)
44
- cy.get(condition ? "[data-cy=submit]" : "[data-QA=submit]")
44
+ cy.get(condition ? '[data-cy=submit]' : '[data-QA=submit]')
45
45
 
46
- const ASSESSMENT_SUBMIT = "[data-cy=assessment-submit]"
46
+ const ASSESSMENT_SUBMIT = '[data-cy=assessment-submit]'
47
47
  cy.get(ASSESSMENT_SUBMIT).click()
48
48
 
49
49
  const TYPE = 'submit'
50
50
  const SUBMIT_TEMPLATE = `[data-QA=${TYPE}]`
51
51
  cy.get(SUBMIT_TEMPLATE)
52
52
 
53
- const MY_SUBMIT_TEMPLATE = SUBMIT_TEMPLATE;
53
+ const MY_SUBMIT_TEMPLATE = SUBMIT_TEMPLATE
54
54
  cy.get(MY_SUBMIT_TEMPLATE)
55
55
  ```
56
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-cypress",
3
- "version": "6.4.3",
3
+ "version": "6.4.4",
4
4
  "description": "An ESLint plugin for projects using Cypress",
5
5
  "main": "./lib/index.js",
6
6
  "exports": {
@@ -37,20 +37,21 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
- "globals": "^17.7.0"
40
+ "globals": "^17.8.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@eslint/js": "^10.0.1",
44
44
  "@stylistic/eslint-plugin": "^5.10.0",
45
- "@typescript-eslint/rule-tester": "^8.62.1",
46
- "cypress": "^15.18.1",
47
- "eslint": "^10.6.0",
48
- "eslint-plugin-eslint-plugin": "^7.4.1",
45
+ "@typescript-eslint/rule-tester": "^8.65.0",
46
+ "cypress": "^15.19.0",
47
+ "eslint": "^10.7.0",
48
+ "eslint-doc-generator": "^3.7.0",
49
+ "eslint-plugin-eslint-plugin": "^7.5.0",
49
50
  "eslint-plugin-mocha": "^11.3.0",
50
51
  "husky": "^9.1.7",
51
- "prettier": "^3.9.4",
52
- "typescript": "^5.9.3",
53
- "typescript-eslint": "^8.62.1",
52
+ "prettier": "^3.9.6",
53
+ "typescript": "^6.0.3",
54
+ "typescript-eslint": "^8.65.0",
54
55
  "vitest": "^4.1.10"
55
56
  },
56
57
  "scripts": {
@@ -60,5 +61,8 @@
60
61
  "format:check": "prettier --check .",
61
62
  "test": "vitest run",
62
63
  "prepare": "husky"
64
+ },
65
+ "allowScripts": {
66
+ "cypress": true
63
67
  }
64
68
  }