eslint-plugin-cypress 5.3.0 → 6.0.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
@@ -35,7 +35,7 @@ To add a new rule:
35
35
  - Run `npm run format`
36
36
  - Run `npm test` to run [Vitest](https://vitest.dev/)
37
37
  - Make sure all tests are passing
38
- - Add the rule to [flat.js](https://github.com/cypress-io/eslint-plugin-cypress/blob/master/lib/flat.js)
38
+ - Add the rule to [index.js](./lib/index.js)
39
39
  - Create a git commit with a commit message similar to: `feat: add rule <description>` (see [commit message conventions](https://github.com/semantic-release/semantic-release#commit-message-format))
40
40
  - Create a PR from your branch
41
41
 
package/README.md CHANGED
@@ -20,7 +20,9 @@ yarn add eslint eslint-plugin-cypress --dev
20
20
 
21
21
  ## Usage
22
22
 
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.
23
+ ESLint as of `v10` and this plugin no longer support the use of the deprecated [eslintrc-type](https://eslint.org/docs/v9.x/use/configure/configuration-files-deprecated) config file format.
24
+ You must use a [Flat config file](https://eslint.org/docs/latest/use/configure/configuration-files) format.
25
+ This is the default in ESLint `v9`, and in ESLint `v10` it is the only config format available.
24
26
 
25
27
  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
28
 
@@ -28,11 +30,10 @@ To set up a configuration, add a file `eslint.config.mjs` to the root directory
28
30
  import pluginCypress from 'eslint-plugin-cypress'
29
31
  ```
30
32
 
31
- For backwards compatibility with previous plugin versions `3.3.0` - `4.3.0`, the following equivalent deprecated form is also supported. This is planned to be removed in a future major version:
33
+ The configuration `eslint-plugin-cypress/flat`, which was deprecated in plugin version `5.0.0`, is no longer available.
34
+ Migrate to using the equivalent configuration `eslint-plugin-cypress` by dropping the `/flat` suffix.
32
35
 
33
- ```shell
34
- import pluginCypress from 'eslint-plugin-cypress/flat' # deprecated
35
- ```
36
+ Refer to ESLint `v10` [Configuration File Resolution](https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-resolution) for hierachical use of configuration files.
36
37
 
37
38
  ## Configurations
38
39
 
@@ -81,7 +82,7 @@ The examples use the `defineConfig()` helper, introduced with ESLint [9.22.0](ht
81
82
 
82
83
  All rules are available by importing from `eslint-plugin-cypress` and can be individually activated.
83
84
 
84
- - [cypress/unsafe-to-chain-command](https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/unsafe-to-chain-command.md) is activated and set to `error`
85
+ - [cypress/unsafe-to-chain-command](./docs/rules/unsafe-to-chain-command.md) is activated and set to `error`
85
86
 
86
87
  ```js
87
88
  import { defineConfig } from 'eslint/config'
@@ -102,7 +103,7 @@ export default defineConfig([
102
103
 
103
104
  The `eslint-plugin-cypress` [recommended rules](#rules) `configs.recommended` are activated, except for
104
105
 
105
- - [cypress/no-unnecessary-waiting](https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-unnecessary-waiting.md) which is set to `off`
106
+ - [cypress/no-unnecessary-waiting](./docs/rules/no-unnecessary-waiting.md) which is set to `off`
106
107
 
107
108
  ```js
108
109
  import { defineConfig } from 'eslint/config'
@@ -139,7 +140,7 @@ export default defineConfig([
139
140
 
140
141
  ## Disable rules
141
142
 
142
- You can disable specific rules per file, for a portion of a file, or for a single line. See the [ESLint rules](https://eslint.org/docs/latest/use/configure/rules#disabling-rules) documentation. For example ...
143
+ You can disable specific rules per file, for a portion of a file, or for a single line. See the [ESLint rules](https://eslint.org/docs/latest/use/configure/rules#disable-rules) documentation. For example ...
143
144
 
144
145
  Disable the `cypress/no-unnecessary-waiting` rule for the entire file by placing this at the start of the file:
145
146
 
@@ -190,7 +191,7 @@ During test spec development, [Mocha exclusive tests](https://mochajs.org/#exclu
190
191
 
191
192
  ### Cypress and Mocha recommended
192
193
 
193
- [eslint-plugin-mocha@^11](https://www.npmjs.com/package/eslint-plugin-mocha) is added to the example [Cypress recommended](#cypress-recommended). This version of the plugin supports only flat file configurations with the option `configs.recommended`.
194
+ [eslint-plugin-mocha@^11](https://www.npmjs.com/package/eslint-plugin-mocha) is added to the example [Cypress recommended](#cypress-recommended).
194
195
 
195
196
  The settings for individual `mocha` rules from the `configs.recommended` option are changed.
196
197
 
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "eslint-plugin-cypress",
3
- "version": "5.3.0",
3
+ "version": "6.0.0",
4
4
  "description": "An ESLint plugin for projects using Cypress",
5
- "main": "./lib/flat.js",
5
+ "main": "./lib/index.js",
6
6
  "exports": {
7
- ".": "./lib/flat.js",
8
- "./flat": "./lib/flat.js"
7
+ ".": "./lib/index.js"
9
8
  },
10
9
  "files": [
11
10
  "lib",
@@ -14,6 +13,7 @@
14
13
  ],
15
14
  "author": "Cypress-io",
16
15
  "license": "MIT",
16
+ "type": "commonjs",
17
17
  "keywords": [
18
18
  "eslint",
19
19
  "eslintplugin",
@@ -31,19 +31,19 @@
31
31
  "eslint": ">=9"
32
32
  },
33
33
  "dependencies": {
34
- "globals": "^16.5.0"
34
+ "globals": "^17.3.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@eslint/js": "^9.39.2",
37
+ "@eslint/js": "^10.0.1",
38
38
  "@stylistic/eslint-plugin": "^5.8.0",
39
- "eslint": "^9.39.2",
40
- "eslint-plugin-eslint-plugin": "^7.3.0",
39
+ "eslint": "^10.0.0",
40
+ "eslint-plugin-eslint-plugin": "^7.3.1",
41
41
  "eslint-plugin-mocha": "^11.2.0",
42
42
  "husky": "^9.1.7",
43
43
  "prettier": "^3.8.1",
44
44
  "semantic-release": "^25.0.3",
45
45
  "typescript": "^5.9.3",
46
- "typescript-eslint": "^8.54.0",
46
+ "typescript-eslint": "^8.56.0",
47
47
  "vitest": "^4.0.18"
48
48
  },
49
49
  "scripts": {
File without changes
File without changes