Skip to content

Conversation

@vanshika2720
Copy link
Contributor

@vanshika2720 vanshika2720 commented Jan 27, 2026

Summary

Migrate ESLint from v8.57.1 to v9.19.0 with the new Flat Config format.

Implementation Details

  • Migrated legacy .eslintrc.json to the new eslint.config.mjs flat configuration.
  • Updated @eslint/js to supply recommended rules.
  • Added globals package to explicitly define browser, node, and jest environments.
  • Optimized ignore patterns by integrating them directly into the flat config.

Verification Results

  • Ran npm run lint and confirmed all legacy rules are correctly enforced.
  • Verified that excluded directories (lib, dist, node_modules) are still correctly ignored.
  • Confirmed no new linting regressions introduced.

Closes #5381 #5369 #5364

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@vanshika2720 vanshika2720 force-pushed the chore/eslint-9-migration branch from 61b13ab to e6069f0 Compare January 27, 2026 18:31
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@vanshika2720 vanshika2720 force-pushed the chore/eslint-9-migration branch from e6069f0 to 24a50f0 Compare January 27, 2026 18:50
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@vanshika2720
Copy link
Contributor Author

Hi @walterbender , this PR migrates the project to ESLint v9.19.0.

Key Changes:

Migrated from .eslintrc.json to the new Flat Config format (
eslint.config.mjs
).
Updated @eslint/js and globals for better environment detection (Browser, Node, and Jest).
Standardized rules to maintain existing code quality while removing deprecated configuration patterns.
Verification:

Ran npx eslint js/**/*.js locally; all files are clean.
Verified that the CI Lint check is passing with the new configuration.

"node_modules/**",
"bower_components/**",
"activity/**",
"planet/**",
Copy link
Member

Choose a reason for hiding this comment

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

Are we not linting the planet code?

… scope

- Upgrade ESLint from v7.6.0 to v9.19.0
- Migrate from .eslintrc.json to eslint.config.mjs (flat config)
- Add @eslint/js and globals packages for v9 compatibility
- Update eslint plugins to compatible versions
- Remove deprecated .eslintignore file

Expand linting scope:
- Change file pattern from js/**/*.js to **/*.js
- Remove planet/** and activity/** from ignores
- Add planet/libs/** to exclude only third-party libraries
- Now linting planet/js/, activity/, and root files

Bug fixes:
- Fix invalid typeof comparison in msie_flashFallback/flashFallback.js
- Add ES Module support for Cypress files
- Fix no-loss-of-precision warnings in test constants
- Add missing semicolon in cypress/support/e2e.js

Verification:
- npm run lint: 0 errors, 383 warnings (pre-existing)
- All planet/ and activity/ code now properly linted
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

1 similar comment
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@vanshika2720 vanshika2720 force-pushed the chore/eslint-9-migration branch from 0b7ce0f to 266c939 Compare January 28, 2026 23:37
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@vanshika2720
Copy link
Contributor Author

Hi @walterbender,

Good catch! Updated the config to lint planet/ code. Removed planet/** from ignores (kept planet/libs/** for third-party libs only) and broadened the file pattern to **/*.js.

Verified planet/js/*.js and activity/SugarAnimation.js are now linted with 0 errors. All checks passing!

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

1 similar comment
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@vanshika2720 vanshika2720 force-pushed the chore/eslint-9-migration branch from 178e2c2 to affad55 Compare January 28, 2026 23:59
@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore]Migrate ESLint from v8.57.1 to v9.x with the new Flat Config format.

2 participants