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
Hello, I am opening this issue as an follow-up to #16, which I believe still has issues with the TypeScript typing.
As I mentioned on my comment, it is not possible to correctly import this package with its current type exports if I use the esModuleInterop set as false.
Operating System:
Node Version: v14.15.1
NPM Version: 7.0.14
webpack Version: 5.11.0
eslint-webpack-plugin Version: 2.4.0
eslint version: 7.7.0
Typescript version: 4.0.1
Expected Behavior
Importing "eslint-webpack-plugin" should correctly return the ESLintWebpackPlugin class and I should be able to instantiate it with the following code;
import ESLintWebpackPlugin = require("eslint-webpack-plugin");
import * as ESLintWebpackPlugin from "eslint-webpack-plugin"; // Alternative import.
import ESLintWebpackPlugin from "eslint-webpack-plugin" // when using esModuleInterop: true
...
new ESLintWebpackPlugin({
// Options.
});
Actual Behavior
Importing the default exports causes either a TS or a JS error when esModuleInterop is disabled, as I better explain on my comment here.
Bug Report
Hello, I am opening this issue as an follow-up to #16, which I believe still has issues with the TypeScript typing.
As I mentioned on my comment, it is not possible to correctly import this package with its current type exports if I use the
esModuleInterop
set as false.Expected Behavior
Importing "eslint-webpack-plugin" should correctly return the ESLintWebpackPlugin class and I should be able to instantiate it with the following code;
Actual Behavior
Importing the default exports causes either a TS or a JS error when esModuleInterop is disabled, as I better explain on my comment here.
Code and Reproduction:
https://gist.github.com/fcaminada/7d2cc25c74c3b7bdfe43246190c5d57d
The solution would be to follow the same example as other plugins such as CssMinimizerPlugin, for instance.
The text was updated successfully, but these errors were encountered: