-
Notifications
You must be signed in to change notification settings - Fork 91
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
eslint crash when upgrading to 1.4.1 #135
Comments
same problem
|
the new released v1.4.1 breaks eslint. related: * #16896 * estools/esquery#135
We are facing this too |
Got it affecting a number of modules, including the For anyone looking for a quick/temporary fix, run |
same problem with my eslint config |
A mocha test case for the repo which should pass, but fails in the latest version it("child not", function () {
const program = {
type: "Program",
body: [
{
type: "VariableDeclaration",
declarations: [
{
type: "VariableDeclarator",
id: { type: "Identifier", name: "x" },
init: { type: "Literal", value: 1, raw: "1" },
},
],
kind: "var",
},
],
};
const matches = esquery(program, "VariableDeclarator[init] > *");
assert.includeMembers(matches, [
program.body[0].declarations[0].id,
program.body[0].declarations[0].init,
]);
}); Running this test against the |
@michaelficarra Yes, can confirm this issue, and that @binsee's PR #136 is a good fix for it. |
the new released v1.4.1 breaks eslint. related: * #16896 * estools/esquery#135
Same issue here. |
- and regenerate lock file - remove unused file-services/resolve - pinned esquery due to estools/esquery#135
You can also add to your "overrides": {
"esquery": "1.4.0"
}, |
In yarn, you can use resolutions in your package.json file "resolutions": {
"eslint/esquery": "1.4.0"
}, afterwards, run |
esquery package is a transitive dependency for us - and a broken version was released last night. This commit fixes esquery to 1.4.0 See: estools/esquery#135
This should be fixed by |
@michaelficarra Upgrading to |
It works for me |
esquery package is a transitive dependency for us - and a broken version was released last night. This commit fixes esquery to 1.4.2 since 1.4.1 is buggy See: estools/esquery#135 Patched by: estools/esquery#138
When we upgrade esquery to 1.4.1, eslint will crash, below is the log:
Oops! Something went wrong! :(
ESLint: 7.32.0
TypeError: Cannot read properties of undefined (reading 'type')
Occurred while linting /Users/bhtbed/workspace/特价版/merge-radish/src/app.ts:1
at /Users/bhtbed/workspace/特价版/merge-radish/node_modules/_esquery@1.4.1@esquery/dist/esquery.min.js:1:29531
at /Users/bhtbed/workspace/特价版/merge-radish/node_modules/_esquery@1.4.1@esquery/dist/esquery.min.js:1:30574
at Function.b.matches (/Users/bhtbed/workspace/特价版/merge-radish/node_modules/_esquery@1.4.1@esquery/dist/esquery.min.js:1:34910)
at NodeEventGenerator.applySelector (/Users/bhtbed/workspace/特价版/merge-radish/node_modules/_eslint@7.32.0@eslint/lib/linter/node-event-generator.js:292:21)
at NodeEventGenerator.applySelectors (/Users/bhtbed/workspace/特价版/merge-radish/node_modules/_eslint@7.32.0@eslint/lib/linter/node-event-generator.js:320:22)
at NodeEventGenerator.enterNode (/Users/bhtbed/workspace/特价版/merge-radish/node_modules/_eslint@7.32.0@eslint/lib/linter/node-event-generator.js:336:14)
at CodePathAnalyzer.enterNode (/Users/bhtbed/workspace/特价版/merge-radish/node_modules/_eslint@7.32.0@eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23)
at /Users/bhtbed/workspace/特价版/merge-radish/node_modules/_eslint@7.32.0@eslint/lib/linter/linter.js:960:32
at Array.forEach ()
The text was updated successfully, but these errors were encountered: