Eng sys: Update eslint to 9.x, update the config format, add some security rules #3925
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.
Platforms Impacted
This is an engineering system only change
Description of changes
Move eslint to the 9.x version. As part of this move us onto the new flat config format which is mostly just renaming .eslintrc.js files to eslint.config.js files and using imports/exports to export values. I also added some configs from the microsoft sdl package (which we use internally) to ensure there aren't downstream collisions.
Beyond the better configurability, the old format doesn't correctly work with transitive dependencies, meaning it is a blocker for moving to pnpm layout and stricter package dependency declarations.
Verification
Just build pipelines.