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

ci: add eslint cypress/recommended #666

Merged

Conversation

MikeMcC399
Copy link
Collaborator

This PR is an enhancement to the CI process of the repository. It adds the eslint-plugin-cypress > Recommended configuration to the set of rules which are checked.

Change

The .eslintrc ESLint configuration file has the following configuration option added:

  "extends": [
    "plugin:cypress/recommended"
  ],

Additionally, and pending resolution of issue #661, the eslint rule cypress/unsafe-to-chain-command from eslint-plugin-cypress: Rules is disabled:

  "rules": {
    "cypress/unsafe-to-chain-command": "off"
  }

PR #662 already disabled the eslint rule cypress/no-unnecessary-waiting from eslint-plugin-cypress: Rules in the following tests to prevent the rule being applied where it did not fit:

Benefit

Linting against the set of rules defined by eslint-plugin-cypress > Recommended configuration ensures that the Cypress examples adhere to a documented set of Cypress standard rules. This retains the on-going quality of the examples provided and their ease-of-use.

Verification

Execute:

npm ci
npm run lint

and confirm that no errors are reported.

References

@MikeMcC399 MikeMcC399 marked this pull request as ready for review May 8, 2023 12:26
@MikeMcC399 MikeMcC399 force-pushed the add/eslint-cypress-recommended branch from 4976129 to cbb9f66 Compare May 8, 2023 13:04
disable cypress/unsafe-to-chain-command rule
@MikeMcC399 MikeMcC399 force-pushed the add/eslint-cypress-recommended branch from cbb9f66 to 7fa001b Compare May 8, 2023 16:30
.eslintrc Show resolved Hide resolved
@mschile mschile merged commit 8f31838 into cypress-io:master May 8, 2023
@MikeMcC399 MikeMcC399 deleted the add/eslint-cypress-recommended branch May 8, 2023 17:47
@cypress-app-bot
Copy link
Collaborator

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants