Skip to content

Bug: esquery 1.4.1 release seems to break eslint #16896

@scheibo

Description

@scheibo

Environment

Node version: 19.0.1
npm version: 9.4.2
Local ESLint version: 8.34.0
Global ESLint version: n/a
Operating System: macOS

What parser are you using?

@typescript-eslint/parser

What did you do?

esquery seems to have released a "patch" release 20 minutes ago which causes eslint to now break.

What did you expect to happen?

It to work.

What actually happened?

smogon@2.2.4 lint
eslint --cache *.ts

Oops! Something went wrong! :(

ESLint: 8.34.0

TypeError: Cannot read properties of undefined (reading 'type')
Occurred while linting /home/runner/work/smogon/smogon/smogon/index.test.ts:1
at Array. (/home/runner/work/smogon/smogon/node_modules/esquery/dist/esquery.min.js:1:29469)
at /home/runner/work/smogon/smogon/node_modules/esquery/dist/esquery.min.js:1:29985
at /home/runner/work/smogon/smogon/node_modules/esquery/dist/esquery.min.js:1:30512
at b.matches (/home/runner/work/smogon/smogon/node_modules/esquery/dist/esquery.min.js:1:34848)
at NodeEventGenerator.applySelector (/home/runner/work/smogon/smogon/node_modules/eslint/lib/linter/node-event-generator.js:296:21)
at NodeEventGenerator.applySelectors (/home/runner/work/smogon/smogon/node_modules/eslint/lib/linter/node-event-generator.js:324:22)
at NodeEventGenerator.enterNode (/home/runner/work/smogon/smogon/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
at CodePathAnalyzer.enterNode (/home/runner/work/smogon/smogon/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:795:23)
at /home/runner/work/smogon/smogon/node_modules/eslint/lib/linter/linter.js:1153:32
at Array.forEach ()

Participation

  • I am willing to submit a pull request for this issue.

I mean, I'll open a PR to pin to 1.4.0, but I'm pretty sure anyone can do that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyrepro:yesIssues with a reproducible example

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions