eslint-config-kentcdodds icon indicating copy to clipboard operation
eslint-config-kentcdodds copied to clipboard

Rushstack patch prevents importing the preset for extended presets

Open swernerx opened this issue 3 years ago • 1 comments

Hi! I am working on a larger eslint preset factory which imports existing presets to merge/harmonize them. The actual logic happens on a factory level (before eslint execution) and imports existing presets to merge them. Unfortunately, with the latest release of this preset our mechanics are not working anymore.

Commenting out this:

require('@rushstack/eslint-patch/modern-module-resolution')

from index.js and everything is fine again. Including this line again results into the following error:

Error during execution: Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:
https://github.com/microsoft/rushstack/issues

I am actually not sure if there is an alternative way for solving this. Maybe splitting the actual configuration from the user entry point. How do you feel about this?

swernerx avatar Jun 28 '22 16:06 swernerx

Maybe you could hack something with require.cache?

kentcdodds avatar Jul 02 '22 10:07 kentcdodds