Update to eslint and update WPILibUtility to Electron 28 #680
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supersedes #644 to fix merge conflicts
Fixes #666
Original PR description:
This PR updates wpilib-utility-standalone's Electron dependency to version 28 from version 11. I had to update @types/node and typescript to fix compilation errors. Electron's remote module was moved to the @electron/remote package in Electron 14, so I had to make some minor changes to use that. I also had to set contextIsolation to false because the default for contextIsolation changed from false to true in Electron 12. (Disabling contextIsolation and enabling nodeIntegration creates possible security risks, so I suggest removing usage of require in rendered pages. It is recommended to expose functions in preload.js instead of using require: https://www.electronjs.org/docs/latest/tutorial/context-isolation. @electron/remote also has some pitfalls: https://nornagon.medium.com/electrons-remote-module-considered-harmful-70d69500f31)
Updating Electron to version 28 fixes an issue on Linux where wpilib-utility-standalone would crash upon starting. This issue was caused by a glibc change (the issue was fixed in electron/electron#31091). This fix was not backported to Electron version 11. Updating Electron also fixes multiple security vulnerabilities, which you can get info on by running npm audit in wpilib-utility-standalone.
It is worth nothing that Windows 7, 8, and 8.1 support was removed in Electron 23, but seeing as though WPILib does not support these either I thought it was fine to update past 23.
All the projects have been migrated to eslint now. I didn't upgrade any dependencies due to the likelihood of breaking changes and having to refactor things.
Lints should succeed and typescript compilation works; however, I haven't done any testing. I doubt this would cause any bugs though.