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

fix: Fix crashing bug in no-force rule when using spread operator #79

Merged
merged 1 commit into from
May 4, 2021

Conversation

emilgoldsmith
Copy link
Contributor

This was causing my Eslint to crash, I think on the cy.document({ log: false }) nodes if someone is interested in that, so just quickly fixed it

@chrisbreiding
Copy link
Contributor

Thanks! Could you add a test for it please?

@emilgoldsmith
Copy link
Contributor Author

emilgoldsmith commented Apr 26, 2021 via email

@emilgoldsmith
Copy link
Contributor Author

Actually I have some time now on this random Monday as I'm recovering from a full on weekend so this is actually a nice little task, so I'll do that now :)

@emilgoldsmith
Copy link
Contributor Author

Okay added!

It looks like it was the spread operator that was causing issues, I used a trimmed down version for exactly what fails of the example that had failed in my own code as the test case.

I had to first debug that it wasn't parsing the spread operator, which was because the test ecmaVersion was too low so I upped that, and I also noticed that there were a lot of redundant error options for the valid test cases which aren't even part of the spec so I removed those, hope that's okay too

Copy link
Contributor

@chrisbreiding chrisbreiding left a comment

Choose a reason for hiding this comment

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

Awesome - thanks again!

@chrisbreiding chrisbreiding changed the title Fix crashing bug in no-force fix: Fix crashing bug in no-force rule when using spread operator May 4, 2021
@chrisbreiding chrisbreiding merged commit 61a9de1 into cypress-io:master May 4, 2021
@chrisbreiding
Copy link
Contributor

🎉 This PR is included in version 2.11.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@emilgoldsmith emilgoldsmith deleted the patch-1 branch May 4, 2021 14:10
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.

2 participants