import-js/eslint-plugin-import

v2.21 recursion error at `import` statement

Open

#1,816 opened on Jun 10, 2020

View on GitHub
 (7 comments) (0 reactions) (0 assignees)JavaScript (4,946 stars) (1,540 forks)batch import
bughelp wanted

Description

v2.20.2 works as expected v2.21.2 pins the process at 100% CPU, then throws a call stack exceeded error after ~90s:

Oops! Something went wrong! :(

ESLint: 7.2.0

RangeError: Maximum call stack size exceeded
Occurred while linting (redacted)/foo.ts:5
    at Object.join (path.js:1033:7)
    at walkForTsConfig ((redacted)/node_modules/tsconfig-paths/lib/tsconfig-loader.js:56:27)
    at walkForTsConfig ((redacted)/node_modules/tsconfig-paths/lib/tsconfig-loader.js:65:12)
    at walkForTsConfig ((redacted)/node_modules/tsconfig-paths/lib/tsconfig-loader.js:65:12)
    at walkForTsConfig ((redacted)/node_modules/tsconfig-paths/lib/tsconfig-loader.js:65:12)
    at walkForTsConfig ((redacted)/node_modules/tsconfig-paths/lib/tsconfig-loader.js:65:12)
    at walkForTsConfig ((redacted)/node_modules/tsconfig-paths/lib/tsconfig-loader.js:65:12)
    at walkForTsConfig ((redacted)/node_modules/tsconfig-paths/lib/tsconfig-loader.js:65:12)
    at walkForTsConfig ((redacted)/node_modules/tsconfig-paths/lib/tsconfig-loader.js:65:12)
    at walkForTsConfig ((redacted)/node_modules/tsconfig-paths/lib/tsconfig-loader.js:65:12)

In case it helps, the reported line that it fails at (foo.ts:5) imports a default class export:

import Bar from '../lib/Bar';

which is exported as:

export default class Bar { ... }

Let me know what additional info I can provide. Thanks!

Edit: v2.21.1 has the same issue

Contributor guide