-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Cannot read property 'indexOf' of undefined writing import statement #207
Comments
Thank you for your report. Sounds like a bug in |
Well, as suggested I moved it to the parser issues (typescript-eslint/typescript-eslint #1616).
|
As suspected this seems to be an issue with this plugin at:
|
Same here @mysticatea |
EDIT: Nevermind, I see that my issue was fixed here and released in v11. I was still using v10. I'm getting this error, and in my case it's because of something like this: const importPath = path.join(a, b);
await import(importPath); The problematic code is here in [[
"ExportAllDeclaration",
"ExportNamedDeclaration",
"ImportDeclaration",
"ImportExpression",
]](node) {
const sourceNode = node.source
const name = sourceNode && stripImportPathParams(sourceNode.value)
if (name && (includeCore || !resolve.isCore(name))) {
targets.push(new ImportTarget(sourceNode, name, options))
}
},
|
I see the issue still exist in latest version. how to fix it.
on running eslint , i get
|
I was able to silence the exception by adding the following in visit-import.js:
It is similar to the check above it, but in that case it looks for 'ImportExpression'. |
I cannot change the codebase, I need it to be fixed in plugin new release |
@pagarwal-ignitetech My comment was intended to point the maintainers to the problem and supply a possible fix. |
Moved here from microsoft/vscode-eslint #897
MyInterface
.import {MyInterface} from
The output channel shows the following stack trace:
Not critical, but annoying.
Thanks for looking!
mario
Extension version: 2.0.15
VS Code version: Code 1.42.0 (ae08d5460b5a45169385ff3fd44208f431992451, 2020-02-06T10:51:34.058Z)
OS version: Windows_NT x64 10.0.18363
The text was updated successfully, but these errors were encountered: