TypeError: Cannot read property 'split' of undefined
#1613
Closed
Description
eslint-plugin-import@2.20.0
I use VS Code and enable ESLint while typing.
If I type the following, with the cursor after the from
, then I get the error below:
Code:
import test from
main()
Error:
[Error - 12:44:32 PM] ESLint stack trace:
[Error - 12:44:32 PM] TypeError: Cannot read property 'split' of undefined
Occurred while linting /src/test2.ts:1
at baseModule (/node_modules/eslint-plugin-import/lib/core/importType.js:41:27)
at isBuiltIn (/node_modules/eslint-plugin-import/lib/core/importType.js:56:16)
at checkFileExtension (/node_modules/eslint-plugin-import/lib/rules/extensions.js:147:37)
at /node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
at NodeEventGenerator.applySelectors (/node_modules/eslint/lib/linter/node-event-generator.js:283:22)
at NodeEventGenerator.enterNode (/node_modules/eslint/lib/linter/node-event-generator.js:297:14)
at CodePathAnalyzer.enterNode (/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:634:23)