Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the ESLint configuration by migrating from ESLint 8 to ESLint 9 and adopting the new flat config format. The changes move ESLint configuration from inline package.json settings to a dedicated eslint.config.mjs file, update ESLint and related dependencies to their latest versions, and adjust the lint script accordingly.
Key changes:
- Upgraded ESLint from 8.57.1 to 9.39.2 and @playcanvas/eslint-config from 1.7.4 to 2.1.0
- Migrated configuration from legacy format in
package.jsonto ESLint 9's flat config ineslint.config.mjs - Added
globalspackage (16.5.0) for browser globals management
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eslint.config.mjs | New ESLint 9 flat config file with PlayCanvas config, browser globals, JSZip global, and src/unused ignore pattern |
| package.json | Removed inline eslintConfig and eslintIgnore sections; updated ESLint to 9.39.2, @playcanvas/eslint-config to 2.1.0, added globals dependency; simplified lint script |
| package-lock.json | Updated dependency tree for ESLint 9 ecosystem including new packages like @eslint/plugin-kit, @humanfs/node, and updated versions of eslint-plugin-jsdoc, espree, and related packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "src/unused" | ||
| ], | ||
| "devDependencies": { | ||
| "@babel/eslint-parser": "7.28.5", |
There was a problem hiding this comment.
The @babel/eslint-parser dependency is no longer referenced in the new ESLint configuration but remains in the dependencies. Since the new configuration doesn't specify a parser (using ESLint's default parser), and given that the codebase uses standard modern JavaScript without JSX or experimental syntax, this dependency appears to be unused and can be removed to reduce the dependency footprint.
| "@babel/eslint-parser": "7.28.5", |
This pull request updates the project's ESLint configuration to use a modern, modular approach and upgrades related dependencies. The configuration is now managed in a dedicated
eslint.config.mjsfile, removing the previous inline setup frompackage.json. The changes also include upgrading ESLint and its PlayCanvas config, and adjusting the lint script for compatibility.ESLint configuration modernization:
eslint.config.mjsfile that imports the PlayCanvas ESLint config, sets up global variables (includingJSZip), disables theimport/no-unresolvedrule, and ignores thesrc/unuseddirectory.package.json.Dependency and tooling updates:
eslintto version 9.39.2,@playcanvas/eslint-configto 2.1.0, and added theglobalspackage as a dev dependency.lintscript to use the new ESLint configuration format, removing the--ext .jsflag as it's no longer necessary.