Skip to content

Update to ESLint 9#32

Merged
willeastcott merged 1 commit intomainfrom
eslint9
Jan 4, 2026
Merged

Update to ESLint 9#32
willeastcott merged 1 commit intomainfrom
eslint9

Conversation

@willeastcott
Copy link
Contributor

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.mjs file, removing the previous inline setup from package.json. The changes also include upgrading ESLint and its PlayCanvas config, and adjusting the lint script for compatibility.

ESLint configuration modernization:

  • Added a new eslint.config.mjs file that imports the PlayCanvas ESLint config, sets up global variables (including JSZip), disables the import/no-unresolved rule, and ignores the src/unused directory.
  • Removed the old inline ESLint configuration and ignore settings from package.json.

Dependency and tooling updates:

  • Upgraded eslint to version 9.39.2, @playcanvas/eslint-config to 2.1.0, and added the globals package as a dev dependency.
  • Updated the lint script to use the new ESLint configuration format, removing the --ext .js flag as it's no longer necessary.

@willeastcott willeastcott requested a review from Copilot January 4, 2026 13:49
@willeastcott willeastcott self-assigned this Jan 4, 2026
@willeastcott willeastcott added the enhancement New feature or request label Jan 4, 2026
@willeastcott willeastcott merged commit 7af5f08 into main Jan 4, 2026
6 checks passed
@willeastcott willeastcott deleted the eslint9 branch January 4, 2026 13:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to ESLint 9's flat config in eslint.config.mjs
  • Added globals package (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",
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"@babel/eslint-parser": "7.28.5",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant