Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Error when linting after upgrade to v6 #107

Closed
neil-sola opened this issue May 20, 2024 · 5 comments
Closed

Error when linting after upgrade to v6 #107

neil-sola opened this issue May 20, 2024 · 5 comments

Comments

@neil-sola
Copy link

pnpm lint results in:

workflow-api:lint: Oops! Something went wrong! :(
workflow-api:lint: 
workflow-api:lint: ESLint: 8.57.0
workflow-api:lint: 
workflow-api:lint: TypeError: Cannot destructure property 'parent' of 'node' as it is undefined.
workflow-api:lint: Occurred while linting /Users/neil/sola/monorepo/serverless/workflow-api/src/v1/delete-workflow.ts:1
workflow-api:lint: Rule: "unused-imports/no-unused-imports"
workflow-api:lint:     at exports.unusedImportsPredicate (/Users/neil/sola/monorepo/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint-plugin-unused-imports/lib/rules/predicates.js:28:13)
workflow-api:lint:     at Object.value [as report] (/Users/neil/sola/monorepo/node_modules/.pnpm/[email protected]/node_modules/eslint-rule-composer/lib/rule-composer.js:144:25)
workflow-api:lint:     at Program:exit (/Users/neil/sola/monorepo/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js:301:33)
workflow-api:lint:     at ruleErrorHandler (/Users/neil/sola/monorepo/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1076:28)
workflow-api:lint:     at /Users/neil/sola/monorepo/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/safe-emitter.js:45:58
workflow-api:lint:     at Array.forEach (<anonymous>)
workflow-api:lint:     at Object.emit (/Users/neil/sola/monorepo/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
workflow-api:lint:     at NodeEventGenerator.applySelector (/Users/neil/sola/monorepo/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
workflow-api:lint:     at NodeEventGenerator.applySelectors (/Users/neil/sola/monorepo/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
workflow-api:lint:     at NodeEventGenerator.leaveNode (/Users/neil/sola/monorepo/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/node-event-generator.js:349:14)
@maufarinelli
Copy link

My two cents here.
I just had the same error and I found that it comes from eslint-plugin-unused-imports
node_modules/eslint-plugin-unused-imports/lib/rules/predicates.js line 27

put a console log just after

	const { node } = problem;
	console.log('problem', problem);

And you will see what is causing the issue for you.

I think unused-imports plugin has changed and is missing something.

@SoumayaBessifi
Copy link

Hi,
unfortunately i'm facing the same issue and didn't find a fix yet

@dmitry-stepanenko
Copy link

dmitry-stepanenko commented Jul 18, 2024

The problem starts to appear on the @typescript-eslint/[email protected]

@dieguezz
Copy link

I had this problem and fixed it by upgrading to [email protected]

@dmitry-stepanenko
Copy link

@dieguezz that did the job!

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

No branches or pull requests

6 participants