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]] Cannot read properties of undefined (reading value) when expr… #3623

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lokya
Copy link

@Lokya Lokya commented Aug 8, 2022

if write code on https://jshint.com like this:
`function main() {
const {...} ; // this

return 'Hello, World!';
}`
chrome:
Uncaught TypeError: Cannot read properties of undefined (reading 'value')

@jugglinmike
Copy link
Member

Thanks for the patch! As per JSHint's contribution guidelines, we'll need to add at least one automated test before we can merge this. Are you able to add a test?

@Lokya Lokya closed this Aug 22, 2022
@Lokya Lokya reopened this Aug 22, 2022
@Lokya
Copy link
Author

Lokya commented Aug 22, 2022

sorry,wrong operation close this comment.
this is my automated test
Coverage Status

Coverage remained the same at 100.0%

@jugglinmike
Copy link
Member

That appears to be the results of the project's automated test suite when run against your original patch. That's not what I had in mind.

In your write-up for this pull request, you shared a example of JavaScript source code which causes JSHint to crash. What we need is a new test which demonstrates what JSHint does when it receives code like that. This will look like a little bit of code added to one of the files in this repository's tests/unit/ directory. That's where all the other unit tests are stored, so you can take a look around for hints about how to write a new test.

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.

None yet

3 participants