Skip to content

Commit

Permalink
feat: support eslint v7 & v8 instead of ">= 3.2.1"
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Support ESLint v7 and v8 only

Support for ESlint v3, v4, v5 & v6 is removed
ESLint v9 is not yet supported

Co-Authored-By: Jennifer Shehane <shehane.jennifer@gmail.com>
  • Loading branch information
MikeMcC399 and jennifer-shehane committed Apr 19, 2024
1 parent 455dc13 commit bafb3b6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 32 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Note: If you installed ESLint globally then you must also install `eslint-plugin

## Installation

Prerequisites: [ESLint](https://www.npmjs.com/package/eslint) `v7` or `v8`. ESLint `v9` is **not** supported yet.

```sh
npm install eslint-plugin-cypress --save-dev
```
Expand Down Expand Up @@ -115,8 +117,6 @@ These rules enforce some of the [best practices recommended for using Cypress](h

Rules with a check mark (✅) are enabled by default while using the `plugin:cypress/recommended` config.

**NOTE**: These rules currently require eslint 5.0 or greater. If you would like support added for eslint 4.x, please 👍 [this issue](https://github.com/cypress-io/eslint-plugin-cypress/issues/14).

| | Rule ID | Description |
| :-- | :------------------------------------------------------------------------- | :-------------------------------------------------------------- |
|| [no-assigning-return-values](./docs/rules/no-assigning-return-values.md) | Prevent assigning return values of cy calls |
Expand Down
37 changes: 10 additions & 27 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ workflows:
main:
jobs:
- lint
- test-v5
- test-v6
- test-v7
- test-v8
- release:
requires:
- lint
- test-v5
- test-v6
- test-v7
- test-v8
filters:
branches:
only:
Expand All @@ -32,22 +30,7 @@ jobs:
name: Lint code
command: npm run lint

test-v5:
docker:
- image: cimg/node:20.12.2
steps:
- checkout
- run:
name: Install dependencies
command: npm ci
- run:
name: Install ESLint 5
command: npm install eslint@5
- run:
name: Test ESLint 5
command: npm test

test-v6:
test-v7:
docker:
- image: cimg/node:20.12.2
steps:
Expand All @@ -56,13 +39,13 @@ jobs:
name: Install dependencies
command: npm ci
- run:
name: Install ESLint 6
command: npm install eslint@6
name: Install ESLint 7
command: npm install eslint@7
- run:
name: Test ESLint 6
name: Test ESLint 7
command: npm test

test-v7:
test-v8:
docker:
- image: cimg/node:20.12.2
steps:
Expand All @@ -71,10 +54,10 @@ jobs:
name: Install dependencies
command: npm ci
- run:
name: Install ESLint 7
command: npm install eslint@7
name: Install ESLint 8
command: npm install eslint@8
- run:
name: Test ESLint 7
name: Test ESLint 8
command: npm test

release:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"homepage": "https://github.com/cypress-io/eslint-plugin-cypress#readme",
"peerDependencies": {
"eslint": ">= 3.2.1"
"eslint": ">=7 <9"
},
"dependencies": {
"globals": "^13.20.0"
Expand All @@ -44,7 +44,6 @@
"semantic-release": "semantic-release",
"start": "yarn run test-watch",
"test": "jest",
"test:v6": "npm i eslint@6.x && npm run test",
"test-watch": "jest --watchAll",
"prepare": "husky install"
}
Expand Down

0 comments on commit bafb3b6

Please sign in to comment.