Replies: 1 comment 1 reply
-
I was able to work around this issue by changing --- node_modules/@rollup/plugin-eslint/dist/es/index.js.bak 2023-12-20 19:51:17.176681875 +0100
+++ node_modules/@rollup/plugin-eslint/dist/es/index.js 2023-12-20 19:51:40.537216607 +0100
@@ -1,6 +1,7 @@
import { resolve, relative, sep } from 'path';
import { createFilter } from '@rollup/pluginutils';
-import { ESLint } from 'eslint';
+import eslintPkg from 'eslint/use-at-your-own-risk';
+const { FlatESLint: ESLint } = eslintPkg;
function normalizePath(id) {
return relative(process.cwd(), id).split(sep).join('/');
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
ESLint introduced a new configuration format eslint.config.js (flat config). With the new format, an error is thrown when starting the application:
Running ESLint directly via CLI works with the new config. The checker plugin worked properly before migrating to the new ESLint config.
Expected behavior
ESLint should run without an error and the
eslint.config.js
file should be used.The ESLint class used by this plugin doesn't support the new flat config. For the flat config the FlatESLint class must be used which is only exported via eslint/use-at-your-own-risk entrypoint: https://eslint.org/blog/2022/08/new-config-system-part-3/#using-flat-config-with-the-eslint-class
Beta Was this translation helpful? Give feedback.
All reactions