eslint-plugin-jsonc
eslint-plugin-jsonc copied to clipboard
Error importing this plugin in Vite application
Hi and many thanks for creating this plugin, it's very useful to me!
I am trying to run this plugin in the browser using Vite and eslint4b, but I am getting an error when I import it:
[ERROR] Could not read from file: /Users/grebonato/Code/mino-lint/virtual:eslint4b_eslint
node_modules/eslint-plugin-jsonc/dist/utils/index.js:117:37:
117 │ ruleMap = map = new (require("eslint").Linter)().getRules();
Here is the repository with the error.
It's a Vite project and I am using vite-plugin-eslint4b
to load eslint.
Do you know what's going on? I tried to figure out by looking at how you created the playground, but I am missing something.
I think this plugin is still not bundled well by Vite. The playground for this plugin still uses vuepress v1 and is internally bundled by webpack.
Thanks for quick feedback. I'll see if I can bring any help on this side.