We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
throwIfNoEntry
1 parent ede9893 commit afeb928Copy full SHA for afeb928
.changeset/cyan-parrots-act.md
@@ -0,0 +1,5 @@
1
+---
2
+"eslint-import-resolver-typescript": patch
3
4
+
5
+perf: disable `throwIfNoEntry` on Node 14+
src/index.ts
@@ -243,8 +243,9 @@ function removeQuerystring(id: string) {
243
244
const isFile = (path?: string | undefined): path is string => {
245
try {
246
- return !!path && fs.statSync(path).isFile()
+ return !!(path && fs.statSync(path, { throwIfNoEntry: false })?.isFile())
247
} catch {
248
+ // Node 12 does not support throwIfNoEntry.
249
return false
250
}
251
0 commit comments