[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.5
Electron version
23.1.1
Operating system
Windows 10
Last known working Electron Forge version
6.0.5
Expected behavior
Firstly, I use electron-forge to create a project with typescript, webpack, eslint. I wish if some errors or warnings occur when coding, TypeScript Type Check or ESLint can print the error or warning tips in terminal.
Then I read the electron-forge code and webpack5 configuration, I find electron-forge set " infrastructureLogging.level " and " stats " to be " none " value.
// some code ...
for (const entryConfig of config) {
if (!entryConfig.plugins) entryConfig.plugins = [];
entryConfig.plugins.push(pluginLogs);
entryConfig.infrastructureLogging = {
level: 'none',
};
entryConfig.stats = 'none';
}
// some code ...
const config = await this.configGenerator.getPreloadConfigForEntryPoint(entryPoint);
config.infrastructureLogging = {
level: 'none',
};
config.stats = 'none';
// some code ...
So I delete " infrastructureLogging " and " stats " code, then TypeScript Type Check or ESLint print as I wish in terminal. So can electron-forge use infrastructureLogging and stats in webpack.renderer.config.ts for final config?
WARNING in [eslint]
F:\electron-webpack-eslint-app\src\renderer.ts
31:1 warning Unexpected console statement no-console
32:7 warning 'a' is assigned a value but never used @typescript-eslint/no-unused-vars
✖ 3 problems (1 error, 2 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
ERROR in [eslint]
F:\electron-webpack-eslint-app\src\renderer.ts
32:25 error Newline required at end of file but not found eol-last
✖ 3 problems (1 error, 2 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
webpack 5.75.0 compiled with 1 error and 1 warning in 6552 ms
<e> [ForkTsCheckerWebpackPlugin] ERROR in ./src/renderer.ts:32:7
<e> TS2322: Type 'boolean' is not assignable to type 'number'.
<e> 30 |
<e> 31 | console.log('👋 This message is being logged by "renderer.js", included via webpack');
<e> > 32 | const a: number = false;
<e> | ^
<e>
<i> [ForkTsCheckerWebpackPlugin] Found 1 error in 6419 ms.
Then I press ctrl+s to trigger save in renderer.ts flie, but the eslint print the same error/warning twice, it's unexpected !
<e> [ForkTsCheckerWebpackPlugin] ERROR in ./src/renderer.ts:32:7
<e> TS2322: Type 'boolean' is not assignable to type 'number'.
<e> 30 |
<e> 31 | console.log('👋 This message is being logged by "renderer.js", included via webpack');
<e> > 32 | const a: number = false;
<e> | ^
<e>
<i> [ForkTsCheckerWebpackPlugin] Found 1 error in 157 ms.
assets by path main_window/ 597 KiB
asset main_window/index.js 597 KiB [emitted] (name: main_window)
asset main_window/index.html 262 bytes [emitted]
assets by info 905 bytes [immutable]
asset main_window.677a2accce3370776cc9.hot-update.js 870 bytes [emitted] [immutable] [hmr] (name: main_window)
asset main_window.677a2accce3370776cc9.hot-update.json 35 bytes [emitted] [immutable] [hmr]
Entrypoint main_window 597 KiB = main_window/index.js 597 KiB main_window.677a2accce3370776cc9.hot-update.js 870 bytes
cached modules 172 KiB [cached] 32 modules
runtime modules 26.3 KiB 13 modules
./src/renderer.ts 1.06 KiB [built]
WARNING in [eslint]
F:\electron-webpack-eslint-app\src\renderer.ts
31:1 warning Unexpected console statement no-console
32:7 warning 'a' is assigned a value but never used @typescript-eslint/no-unused-vars
✖ 3 problems (1 error, 2 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
WARNING in [eslint]
F:\electron-webpack-eslint-app\src\renderer.ts
31:1 warning Unexpected console statement no-console
32:7 warning 'a' is assigned a value but never used @typescript-eslint/no-unused-vars
✖ 3 problems (1 error, 2 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
ERROR in [eslint]
F:\electron-webpack-eslint-app\src\renderer.ts
32:25 error Newline required at end of file but not found eol-last
✖ 3 problems (1 error, 2 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
ERROR in [eslint]
F:\electron-webpack-eslint-app\src\renderer.ts
32:25 error Newline required at end of file but not found eol-last
✖ 3 problems (1 error, 2 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
webpack 5.75.0 compiled with 2 errors and 2 warnings in 569 ms
Actual behavior
TypeScript Type Check or ESLint print nothing in terimnal when run electron-forge start and some errors or warnings in code.
Pre-flight checklist
Electron Forge version
6.0.5
Electron version
23.1.1
Operating system
Windows 10
Last known working Electron Forge version
6.0.5
Expected behavior
Firstly, I use electron-forge to create a project with typescript, webpack, eslint. I wish if some errors or warnings occur when coding, TypeScript Type Check or ESLint can print the error or warning tips in terminal.
Then I read the electron-forge code and webpack5 configuration, I find electron-forge set " infrastructureLogging.level " and " stats " to be " none " value.
So I delete " infrastructureLogging " and " stats " code, then TypeScript Type Check or ESLint print as I wish in terminal. So can electron-forge use infrastructureLogging and stats in webpack.renderer.config.ts for final config?
Then I press ctrl+s to trigger save in renderer.ts flie, but the eslint print the same error/warning twice, it's unexpected !
Actual behavior
TypeScript Type Check or ESLint print nothing in terimnal when run electron-forge start and some errors or warnings in code.
Steps to reproduce
step1:
step2:
step3:
step4: add "extends": "airbnb-base" to .eslintrc.json
step5:
step6: add eslint-webpack-plugin to webpack.plugins.ts
step7: add some error or warning code in " src/renderer.ts "
step8: run script
Additional information
No response