eslint-plugin-cypress 5.2.0 → 5.3.0

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
@@ -43,9 +43,13 @@ To add a new rule:
43
43
 
44
44
  This plugin uses the ESLint [eslint-doc-generator](https://www.npmjs.com/package/eslint-doc-generator) to generate consistent documentation.
45
45
 
46
- - Install with `npm install eslint-doc-generator -g`
46
+ - Install with `npm install eslint-doc-generator@latest -g`
47
47
  - Run `eslint-doc-generator` in the root directory of the plugin
48
48
 
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.
52
+
49
53
  ## Merging pull requests
50
54
 
51
55
  This information is for Cypress.io Members or Collaborators who merge pull requests:
package/README.md CHANGED
@@ -6,7 +6,7 @@ Note: If you installed ESLint globally then you must also install `eslint-plugin
6
6
 
7
7
  ## Installation
8
8
 
9
- Prerequisites: [ESLint](https://www.npmjs.com/package/eslint) `v9`. Lower versions are no longer supported.
9
+ Prerequisites: [ESLint](https://www.npmjs.com/package/eslint) `v9` or `v10`. Lower versions are no longer supported.
10
10
 
11
11
  ```sh
12
12
  npm install eslint eslint-plugin-cypress --save-dev
@@ -20,7 +20,7 @@ yarn add eslint eslint-plugin-cypress --dev
20
20
 
21
21
  ## Usage
22
22
 
23
- ESLint `v9` uses a [Flat config file](https://eslint.org/docs/latest/use/configure/configuration-files) format with filename `eslint.config.*js` by default. This plugin no longer supports the use of a deprecated [eslintrc-type](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated) config file from previous ESLint versions.
23
+ ESLint `v9` and `v10` use a [Flat config file](https://eslint.org/docs/latest/use/configure/configuration-files) format with filename `eslint.config.*js` by default. This plugin no longer supports the use of a deprecated [eslintrc-type](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated) config file from previous ESLint versions.
24
24
 
25
25
  To set up a configuration, add a file `eslint.config.mjs` to the root directory of your Cypress project and include the following instructions to import the available configurations using:
26
26
 
@@ -1,4 +1,6 @@
1
- # Require screenshots to be preceded by an assertion (`cypress/assertion-before-screenshot`)
1
+ # cypress/assertion-before-screenshot
2
+
3
+ 📝 Require screenshots to be preceded by an assertion.
2
4
 
3
5
  <!-- end auto-generated rule header -->
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow assigning return values of `cy` calls (`cypress/no-assigning-return-values`)
1
+ # cypress/no-assigning-return-values
2
+
3
+ 📝 Disallow assigning return values of `cy` calls.
2
4
 
3
5
  💼 This rule is enabled in the ✅ `recommended` config.
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow using `async`/`await` in Cypress `before` methods (`cypress/no-async-before`)
1
+ # cypress/no-async-before
2
+
3
+ 📝 Disallow using `async`/`await` in Cypress `before` methods.
2
4
 
3
5
  <!-- end auto-generated rule header -->
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow using `async`/`await` in Cypress test cases (`cypress/no-async-tests`)
1
+ # cypress/no-async-tests
2
+
3
+ 📝 Disallow using `async`/`await` in Cypress test cases.
2
4
 
3
5
  💼 This rule is enabled in the ✅ `recommended` config.
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow chain of `cy.get()` calls (`cypress/no-chained-get`)
1
+ # cypress/no-chained-get
2
+
3
+ 📝 Disallow chain of `cy.get()` calls.
2
4
 
3
5
  <!-- end auto-generated rule header -->
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow using `cy.debug()` calls (`cypress/no-debug`)
1
+ # cypress/no-debug
2
+
3
+ 📝 Disallow using `cy.debug()` calls.
2
4
 
3
5
  <!-- end auto-generated rule header -->
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow using `force: true` with action commands (`cypress/no-force`)
1
+ # cypress/no-force
2
+
3
+ 📝 Disallow using `force: true` with action commands.
2
4
 
3
5
  <!-- end auto-generated rule header -->
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow using `cy.pause()` calls (`cypress/no-pause`)
1
+ # cypress/no-pause
2
+
3
+ 📝 Disallow using `cy.pause()` calls.
2
4
 
3
5
  <!-- end auto-generated rule header -->
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow waiting for arbitrary time periods (`cypress/no-unnecessary-waiting`)
1
+ # cypress/no-unnecessary-waiting
2
+
3
+ 📝 Disallow waiting for arbitrary time periods.
2
4
 
3
5
  💼 This rule is enabled in the ✅ `recommended` config.
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow using `cy.xpath()` calls (`cypress/no-xpath`)
1
+ # cypress/no-xpath
2
+
3
+ 📝 Disallow using `cy.xpath()` calls.
2
4
 
3
5
  <!-- end auto-generated rule header -->
4
6
 
@@ -1,4 +1,6 @@
1
- # Require `data-*` attribute selectors (`cypress/require-data-selectors`)
1
+ # cypress/require-data-selectors
2
+
3
+ 📝 Require `data-*` attribute selectors.
2
4
 
3
5
  <!-- end auto-generated rule header -->
4
6
 
@@ -1,4 +1,6 @@
1
- # Disallow actions within chains (`cypress/unsafe-to-chain-command`)
1
+ # cypress/unsafe-to-chain-command
2
+
3
+ 📝 Disallow actions within chains.
2
4
 
3
5
  💼 This rule is enabled in the ✅ `recommended` config.
4
6
 
@@ -49,6 +49,7 @@ const schema = {
49
49
  default: [],
50
50
  },
51
51
  },
52
+ additionalProperties: false,
52
53
  }
53
54
 
54
55
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-cypress",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "An ESLint plugin for projects using Cypress",
5
5
  "main": "./lib/flat.js",
6
6
  "exports": {
@@ -31,17 +31,20 @@
31
31
  "eslint": ">=9"
32
32
  },
33
33
  "dependencies": {
34
- "globals": "^16.2.0"
34
+ "globals": "^16.5.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@stylistic/eslint-plugin": "^5.3.1",
38
- "eslint": "^9.35.0",
39
- "eslint-plugin-eslint-plugin": "^7.0.0",
40
- "eslint-plugin-mocha": "^11.1.0",
37
+ "@eslint/js": "^9.39.2",
38
+ "@stylistic/eslint-plugin": "^5.8.0",
39
+ "eslint": "^9.39.2",
40
+ "eslint-plugin-eslint-plugin": "^7.3.0",
41
+ "eslint-plugin-mocha": "^11.2.0",
41
42
  "husky": "^9.1.7",
42
- "prettier": "^3.6.2",
43
- "semantic-release": "24.2.7",
44
- "vitest": "^3.2.4"
43
+ "prettier": "^3.8.1",
44
+ "semantic-release": "^25.0.3",
45
+ "typescript": "^5.9.3",
46
+ "typescript-eslint": "^8.54.0",
47
+ "vitest": "^4.0.18"
45
48
  },
46
49
  "scripts": {
47
50
  "lint": "eslint",