You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other import-resolver plugins (e.g. webpack) allow you to use the default configuration by writing
settings: {
'import/resolver': 'webpack'
}
in .eslintrc.
If you try this syntax with eslint-import-resolver-typescript, you get
1:1 error Resolve error: TypeError: Cannot read property 'directory' of null
at initMappers (C:\Projects\CareServices\CDS2\Source\node_modules\eslint-import-resolver-typescript\lib\cjs.js:102:38)
at Object.resolve (C:\Projects\CareServices\CDS2\Source\node_modules\eslint-import-resolver-typescript\lib\cjs.js:34:5)
at v2 (C:\Projects\CareServices\CDS2\Source\node_modules\eslint-module-utils\resolve.js:117:23)
at withResolver (C:\Projects\CareServices\CDS2\Source\node_modules\eslint-module-utils\resolve.js:122:16)
at fullResolve (C:\Projects\CareServices\CDS2\Source\node_modules\eslint-module-utils\resolve.js:139:22)
at relative (C:\Projects\CareServices\CDS2\Source\node_modules\eslint-module-utils\resolve.js:84:10)
at resolve (C:\Projects\CareServices\CDS2\Source\node_modules\eslint-module-utils\resolve.js:220:12)
at isExternalRootModule (C:\Projects\CareServices\CDS2\Source\node_modules\eslint-plugin-import\lib\rules\extensions.js:133:82)
at checkFileExtension (C:\Projects\CareServices\CDS2\Source\node_modules\eslint-plugin-import\lib\rules\extensions.js:153:11)
at listeners.(anonymous function).forEach.listener (C:\Projects\CareServices\CDS2\Source\node_modules\eslint\lib\linter\safe-emitter.js:45:58)
The error is being thrown on line 142 of index.ts where we try to access options.directory without checking options for null.
Ideally, we would use the default config if options == null.
I will plan to submit a PR for this sometime in the next month. If someone else can get to it faster than that, go for it.
The text was updated successfully, but these errors were encountered:
Other import-resolver plugins (e.g. webpack) allow you to use the default configuration by writing
in
.eslintrc
.If you try this syntax with
eslint-import-resolver-typescript
, you getThe error is being thrown on line 142 of index.ts where we try to access
options.directory
without checkingoptions
fornull
.Ideally, we would use the default config if
options == null
.I will plan to submit a PR for this sometime in the next month. If someone else can get to it faster than that, go for it.
The text was updated successfully, but these errors were encountered: