You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BREAKING:
Remove deprecated eslint-plugin-cypress/flat configuration
Use eslint-plugin-cypress instead
Update globals to 17.3.0
Other changes:
Add package type commonjs
Documentation updates related to flat configuration
Update Node.js to 24.13.1
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -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))
This document previously described how to use the Cypress ESLint Plugin (`eslint-plugin-cypress`) with an [ESLint legacy config environment](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated).
3
+
This document previously described how to use the Cypress ESLint Plugin (`eslint-plugin-cypress`) with an [ESLint legacy config environment](https://eslint.org/docs/v9.x/use/configure/configuration-files-deprecated).
4
4
5
-
This form of configuration was deprecated with the release of ESLint `v9` and its use with `eslint-plugin-cypress` is no longer supported.
5
+
This form of configuration was deprecated with the release of ESLint `v9`, then removed with ESLint `v10`.
6
+
Its use with `eslint-plugin-cypress` is no longer supported.
6
7
7
8
Users who were previously using a deprecated configuration environment should migrate to a [flat configuration](https://eslint.org/docs/latest/use/configure/configuration-files).
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
27
29
```shell
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.
0 commit comments