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

Uncaught exception when inspecting a logical asignment #3578

Closed
acarstoiu opened this issue Nov 2, 2021 · 1 comment
Closed

Uncaught exception when inspecting a logical asignment #3578

acarstoiu opened this issue Nov 2, 2021 · 1 comment

Comments

@acarstoiu
Copy link
Contributor

Here is a file submitted to JSHint 2.13.1:

let a;

a ??= 235;

Indeed, JSHint configuration accepts at most "esversion": 11 and such an assignment is specified in ECMAScript 12 (2021), see here. But JSHint crashes with:

XYZ\AppData\Roaming\npm\node_modules\jshint\src\jshint.js:6657
        throw err;
        ^

TypeError: Cannot read properties of undefined (reading 'paren')
    at XYZ\AppData\Roaming\npm\node_modules\←[4mjshint←[24m\src\jshint.js:2453:16
    at Object.x.led (XYZ\AppData\Roaming\npm\node_modules\←[4mjshint←[24m\src\jshint.js:1345:16)
    at expression (XYZ\AppData\Roaming\npm\node_modules\←[4mjshint←[24m\src\jshint.js:1007:36)
    at statement (XYZ\AppData\Roaming\npm\node_modules\←[4mjshint←[24m\src\jshint.js:1960:9)
    at statements (XYZ\AppData\Roaming\npm\node_modules\←[4mjshint←[24m\src\jshint.js:2014:16)
    at itself (XYZ\AppData\Roaming\npm\node_modules\←[4mjshint←[24m\src\jshint.js:6635:9)
    at lint (XYZ\AppData\Roaming\npm\node_modules\←[4mjshint←[24m\src\cli.js:495:8)
    at XYZ\AppData\Roaming\npm\node_modules\←[4mjshint←[24m\src\cli.js:665:7
    at Array.forEach (<anonymous>)
    at Object.run (XYZ\AppData\Roaming\npm\node_modules\←[4mjshint←[24m\src\cli.js:651:11)

Node.js v17.0.1

If this is regarded as a request to support ES 2021, then so be it.

@jugglinmike
Copy link
Member

Hi there! JSHint mostly tracks language support at the granularity of individual features rather than revisions of ECMAScript. Since support for logical assignment has already been requested via gh-3544, I'm going to close this issue to keep things organized.

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

No branches or pull requests

2 participants