Switched repo to latest ecmaVersion, except for apps still on requirejs #35651
+22
−1
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.
Technical Summary
This updates ESLint to use more modern syntax, while retaining the old ecmaVersion for areas that depend on requirejs. The requirejs parser specifically can't handle trailing commas in functions, which are flagged as an error by version 6, so it's useful to have requirejs-dependent code still on that version.
This will result in some new lint errors. I'm not going to proactively address those right now. When I made this change in the web apps webpack PR (#35594), the main change was that ESLint will now flag multi-line function calls that don't use a trailing comma after the last argument (which can be handled automatically by running ESLint with
--fix
).This should resolve the kind of lint errors that come up here.
Safety Assurance
Safety story
Only affects linting.
Automated test coverage
No
QA Plan
No
Rollback instructions
Labels & Review