forge
forge copied to clipboard
eslint-plugin-webpack does not lint the main process on `electron-forge start` but does on `electron-forge make`
Pre-flight checklist
- [X] I have read the contribution documentation for this project.
- [X] I agree to follow the code of conduct that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
6.0.0-beta.58
Electron version
17.2.0
Operating system
macOS 12.5
Last known working Electron Forge version
No response
Expected behavior
Consistent inability to compile the main process between electron-forge start
and electron-forge make
in the presence of linting errors.
Actual behavior
I'm using eslint-webpack-plugin (https://webpack.js.org/plugins/eslint-webpack-plugin/) in an electron project that uses forge and forge's webpack plugin. I have both a webpack.main.config.js and a webpack.renderer.config.js that use the following code:
const ESLintPlugin = require("eslint-webpack-plugin");
const plugins = [
new ESLintPlugin({ extensions: [ "ts", "tsx" ] })
];
module.exports = {
entry: "./src/Electron/index.ts",
devtool: "source-map",
module: {
rules: require("./webpack.rules"),
},
resolve: {
extensions: [ ".js", ".ts", ".jsx", ".tsx", ".css", ".json" ],
plugins: [
new TsconfigPathsPlugin()
]
},
externals: {
},
plugins
};
Now the interesting thing is that the renderer process lints everything perfectly, but the main process is not linted when the app is run, however when i run electron-forge make
all of the main process typescript errors get thrown at me
So basically, forge does not appear to output the linting errors on electron-forge start
but does on electron-forge make
Steps to reproduce
- use eslint-webpack-plugin alongside the forge webpack plugin
- write code with a linting error in the main process
- run
electron-forge start
: makes it past the main process compliation and the project runs just fine - run
electron-forge make
: errors out on the main process compilation
Additional information
No response