Skip to content

Commit

Permalink
Revert to eslint-plugin-cypress
Browse files Browse the repository at this point in the history
I noticed that they cut a new release, is this sufficient for us to
revert back?

https://github.com/cypress-io/eslint-plugin-cypress/releases/tag/v3.0.0

See #106 and #111 for historical context.
  • Loading branch information
72636c committed Apr 22, 2024
1 parent c2d1930 commit 1f7cdb4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 134 deletions.
10 changes: 10 additions & 0 deletions .changeset/famous-cobras-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'eslint-config-seek': patch
---

Revert from [`@finsit/eslint-plugin-cypress`] back to [`eslint-plugin-cypress`]

The official plugin now supports ESLint v8. Consumers that were overriding `@finsit/cypress/*` rules will need to override `cypress/*` rules instead.

[`@finsit/eslint-plugin-cypress`]: https://github.com/foretagsplatsen/eslint-plugin-cypress
[`eslint-plugin-cypress`]: https://github.com/cypress-io/eslint-plugin-cypress
16 changes: 3 additions & 13 deletions base.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
const path = require('path');
const root = require('find-root')(process.cwd());

const OFF = 0;
const ERROR = 2;

const rulesDirPlugin = require('eslint-plugin-rulesdir');
rulesDirPlugin.RULES_DIR = path.join(__dirname, 'rules');

const baseRules = {
// Possible Errors
'no-console': ERROR,
Expand Down Expand Up @@ -218,17 +214,11 @@ const baseConfig = {
{
// Cypress config
files: [`**/cypress/**/*.{${allExtensions}}`],
// eslint-plugin-cypress doesn't support ESLint v8.
// Use fork by `@finsit` until this is solved.
// https://github.com/cypress-io/eslint-plugin-cypress/issues/89
extends: ['plugin:@finsit/cypress/recommended'],
extends: ['plugin:cypress/recommended'],
env: {
'@finsit/cypress/globals': true,
},
plugins: ['@finsit/cypress', 'rulesdir'],
rules: {
'rulesdir/unsafe-to-chain-command': ERROR,
'cypress/globals': true,
},
plugins: ['cypress'],
},
],
};
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"files": [
"index.js",
"base.js",
"extensions.js",
"rules/*"
"extensions.js"
],
"repository": {
"type": "git",
Expand All @@ -28,7 +27,7 @@
"@babel/core": "^7.22.6",
"@babel/eslint-parser": "^7.22.6",
"@babel/preset-react": "^7.22.5",
"@finsit/eslint-plugin-cypress": "^3.1.1",
"eslint-plugin-cypress": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"eslint-config-prettier": "^8.8.0",
Expand All @@ -37,7 +36,6 @@
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-rulesdir": "^0.2.2",
"find-root": "^1.1.0"
},
"devDependencies": {
Expand Down
40 changes: 19 additions & 21 deletions pnpm-lock.yaml

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

96 changes: 0 additions & 96 deletions rules/unsafe-to-chain-command.js

This file was deleted.

0 comments on commit 1f7cdb4

Please sign in to comment.