You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a legacy project, trying to upgrade some libraries; this is my attempt to upgrade eslint and eslint webpack plugin.
By using eslint 9, i am trying to use eslint flat config file. I know it's experimental support, so I decided to open a issue to maybe help stabilize the behaviour.
I am using CJS (require, module exports, etc.). It seems that ESLint uses ESM (import, export) internally.
ERROR in [eslint] A dynamic import callback was not specified.
Which may be caused by the fact that the project is using CJS modules and eslint at some point is importing a dynamic import. Which one? Error is unfortunately silenced. That's why I put it to true.
overrideConfig: As a way to superate this error, I've decided to read the ESLint configuration by myself and pass it here as a JS object. This way I get: "Maximum call stack size exceeded".
formatter: the stylish formatter is imported dynamically by eslint, and this was causing issues, that's why I added the formatter option and read the conf directly.
Actual Behavior
ERROR in [eslint] Maximum call stack size exceeded
webpack 5.76.0 compiled with 1 error in 285 ms
ℹ 「wdm」: Failed to compile.
Expected Behavior
I should get the list of warnings like i would by running npx eslint ..
Bug report
Eslint version: 9.14
[email protected]
[email protected]
I am working on a legacy project, trying to upgrade some libraries; this is my attempt to upgrade eslint and eslint webpack plugin.
By using eslint 9, i am trying to use eslint flat config file. I know it's experimental support, so I decided to open a issue to maybe help stabilize the behaviour.
I am using CJS (require, module exports, etc.). It seems that ESLint uses ESM (import, export) internally.
My configuration is this:
I get:
Which may be caused by the fact that the project is using CJS modules and eslint at some point is importing a dynamic import. Which one? Error is unfortunately silenced. That's why I put it to
true
.overrideConfig
: As a way to superate this error, I've decided to read the ESLint configuration by myself and pass it here as a JS object. This way I get: "Maximum call stack size exceeded".formatter
: thestylish
formatter is imported dynamically by eslint, and this was causing issues, that's why I added the formatter option and read the conf directly.Actual Behavior
Expected Behavior
I should get the list of warnings like i would by running
npx eslint .
.How Do We Reproduce?
Here's a repo with a reproduction of the issue https://github.com/musikele/eslint-webpack-bug
in file
config/webpack.common.js
you can see the ESLintWebpackPlugin configuration.To see the error run:
npm run serve
To see that linting is working you can use
npm run lint
ornpx eslint .
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationIf i remove almost ALL plugins from the ESLint config file, it starts to work.
If I comment out ESLintWebpackPlugin, webpack works.
The text was updated successfully, but these errors were encountered: