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

TypeError: parentNode.body is not iterable in v11 #156

Closed
jakebailey opened this issue Feb 9, 2024 · 6 comments · Fixed by #158
Closed

TypeError: parentNode.body is not iterable in v11 #156

jakebailey opened this issue Feb 9, 2024 · 6 comments · Fixed by #158

Comments

@jakebailey
Copy link

I tried updating to v11 on the TypeScript repo, and got this:

Oops! Something went wrong! :(

ESLint: 8.56.0

TypeError: parentNode.body is not iterable
Occurred while linting /home/jabaile/work/TypeScript/src/harness/fourslashInterfaceImpl.ts:1
Rule: "simple-import-sort/imports"
    at Object.extractChunks (/home/jabaile/work/TypeScript/node_modules/eslint-plugin-simple-import-sort/shared.js:10:33)
    at Program:exit (/home/jabaile/work/TypeScript/node_modules/eslint-plugin-simple-import-sort/imports.js:67:38)
    at ruleErrorHandler (/home/jabaile/work/TypeScript/node_modules/eslint/lib/linter/linter.js:1076:28)
    at /home/jabaile/work/TypeScript/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/jabaile/work/TypeScript/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/jabaile/work/TypeScript/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/home/jabaile/work/TypeScript/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.leaveNode (/home/jabaile/work/TypeScript/node_modules/eslint/lib/linter/node-event-generator.js:349:14)
    at CodePathAnalyzer.leaveNode (/home/jabaile/work/TypeScript/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:824:23)
@jakebailey
Copy link
Author

This is one of the few files with import declarations, so no doubt this was introduced in #149.

@MillerSvt
Copy link
Contributor

@jakebailey please give some code to reproduce

@jakebailey
Copy link
Author

@jakebailey
Copy link
Author

This snippet does it:

export namespace Completion {
    export import CompletionSource = ts.Completions.CompletionSource;
}

@MillerSvt
Copy link
Contributor

@jakebailey Thank you. Can you give your config for this rule?
Everything seems to be fine with the default configuration.

@MillerSvt
Copy link
Contributor

Finnaly, I got it. I'll fix

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