Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rushstack patch prevents importing the preset for extended presets #133

Open
swernerx opened this issue Jun 28, 2022 · 1 comment
Open

Comments

@swernerx
Copy link

swernerx commented Jun 28, 2022

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?

@kentcdodds
Copy link
Owner

Maybe you could hack something with require.cache?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants