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

feat: add rule to disallow usage of cypress-xpath #247

Merged
merged 6 commits into from
Mar 7, 2025

Conversation

duranbe
Copy link
Contributor

@duranbe duranbe commented Mar 2, 2025

This PR implements the feature following issue #218

It is implementing a simple rule to match usage of cy.xpath

I followed existing rules and https://github.com/cypress-io/eslint-plugin-cypress/blob/master/CONTRIBUTING.md

npm run lint ☑️
npm run test ☑️

@CLAassistant
Copy link

CLAassistant commented Mar 2, 2025

CLA assistant check
All committers have signed the CLA.

@duranbe duranbe changed the title feat: add rule disallow usage of cypress-xpath feat: add rule to disallow usage of cypress-xpath Mar 2, 2025
@cypress-app-bot
Copy link

Copy link
Collaborator

@MikeMcC399 MikeMcC399 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duranbe

Please complete the documentation by following the instructions in Document generation:

This plugin uses the ESLint eslint-doc-generator to generate consistent documentation.

  • Install with npm install eslint-doc-generator -g
  • Run eslint-doc-generator in the root directory of the plugin

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Mar 3, 2025

There are some different terms to take care of:

For consistency with other rules in the table https://github.com/cypress-io/eslint-plugin-cypress/blob/master/README.md#rules

I suggest that the description should be

"disallow using cy.xpath() calls"

@duranbe
Copy link
Contributor Author

duranbe commented Mar 3, 2025

Hi Mike, thanks for the comments. I've tried to address them - let me know what you think of it

MikeMcC399

This comment was marked as resolved.

@duranbe duranbe requested a review from MikeMcC399 March 6, 2025 16:06
@duranbe
Copy link
Contributor Author

duranbe commented Mar 6, 2025

Wow thanks for the support. Indeed I see some changes in doc, I must have run the eslint-doc-generator in wrong way

Copy link
Collaborator

@MikeMcC399 MikeMcC399 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duranbe
Thanks for your initiative to resolve this request. 👍🏻 I have approved it as an external contributor.

We have to wait for the Cypress.io team to now review before it can be merged.

@jennifer-shehane jennifer-shehane merged commit e04d43c into cypress-io:master Mar 7, 2025
6 checks passed
@jennifer-shehane
Copy link
Member

🎉 This PR is included in version 4.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@MikeMcC399
Copy link
Collaborator

@duranbe

Congratulations! 🎉 Your PR has been merged and a new version has been released!

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

Successfully merging this pull request may close these issues.

5 participants