Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to eslint-plugin-cypress #141

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading