cspell: [Bug]: Error when trying to integrate the plugin to the eslint flat config file
Kind of Issue
Question
Tool or Library
cspell/eslint-plugin
Version
8.15.5
Supporting Library
Not sure / None
OS
Linux
OS Version
22.04
Description
The ESLint cannot import @cspell/eslint-plugin for some reason
Steps to Reproduce
- Migrate ESLint config file (eslintrc.json) to the flat config using ESLint CLI
npx @eslint/migrate-config .eslintrc.json - Install the @cspell/eslint-plugin using your package manager (npm or yarn)
- Integrate it in the newly created ESLint flat config file using the instuction
- Restart VS Code
- Open up the flat config ESLint file and check out ESLint output in VS Code
Expected Behavior
There are no errors
Additional Information
No response
cspell.json
No response
cspell.config.yaml
No response
Example Repository
No response
Code of Conduct
- I agree to follow this project’s Code of Conduct
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 30 (3 by maintainers)
@JounQin,
It was an issue the last time I checked. It felt more like a Yarn problem than anything else.
The issues only happens when:
The workaround is to not bundle ESLint and CSpell in Yarn’s zip file.
I can take another look. I have automated tests to ensure that everything keeps working. But, I do not automatically test the ESLint Extension for VSCode.
@mass2527,
This is an issue between Yarn and VS Code’s ESLint extension. I’m not sure how to fix it. Related to https://github.com/yarnpkg/berry/issues/6590
I’m able to reproduce it, but it is a pain to sort out. The issues seem to be related to how Yarn overrides
require.resolve.