eslint not working as expected on Webpack + TypeScript template project
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.2.1
Electron version
25.3.1
Operating system
macOS Ventura 13.4
Last known working Electron Forge version
No response
Expected behavior
Running npm run lint should output errors such as referring to an undefined variable.
Actual behavior
Nothing gets outputted
Steps to reproduce
Create new electron app using the Webpack + TypeScript template:
npm init electron-app@latest my-new-app -- --template=webpack-typescript
Modify l. 31 in renderer.js to artificially include a reference to an undefined variable:
console.log(`👋 This message is being logged by "renderer.js", included via webpack ${a}`); // a is not defined
Run eslint:
npm run eslint
Additional information
No response
Hi @guidupuy, do you have a more specific repro case? I don't think ESLint comes included when you initialize a new Forge app.
It does if you initialize it with:
npm init electron-app@latest my-new-app -- --template=webpack-typescript
Just tried again a minute ago.
See https://github.com/electron/forge/blob/e7eccc184bd542ced9256af875f51ccc3654196f/packages/template/webpack-typescript/src/WebpackTypeScriptTemplate.ts#L58