Skip to content

test(linter/plugins): fix ecmaVersion#18634

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/01-27-test_linter_plugins_fix_ecmaversion_
Jan 27, 2026
Merged

test(linter/plugins): fix ecmaVersion#18634
graphite-app[bot] merged 1 commit intomainfrom
om/01-27-test_linter_plugins_fix_ecmaversion_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jan 27, 2026

Fix context.languageOptions.ecmaVersion in conformance tests. Previously it did not match ESLint when test case options specify ES3 or ES5.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins labels Jan 27, 2026
Copy link
Member Author

overlookmotel commented Jan 27, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Jan 27, 2026
@overlookmotel overlookmotel marked this pull request as ready for review January 27, 2026 18:29
Copilot AI review requested due to automatic review settings January 27, 2026 18:29
Copy link
Contributor

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 corrects how context.languageOptions.ecmaVersion is derived for conformance tests so it matches ESLint’s behavior, particularly when tests specify ES3 or ES5.

Changes:

  • Replace the previous blanket conversion of numeric ecmaVersion values < 2015 with logic that only maps 6–17 to 2015–2026, leaving 3 and 5 unchanged as in ESLint.
  • Default ecmaVersion to ECMA_VERSION when it is missing or non-numeric, preserving existing behavior for undefined / "latest" while fixing the ES3/ES5 mismatch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overlookmotel overlookmotel self-assigned this Jan 27, 2026
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 27, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 27, 2026

Merge activity

Fix `context.languageOptions.ecmaVersion` in conformance tests. Previously it did not match ESLint when test case options specify ES3 or ES5.
@graphite-app graphite-app bot force-pushed the om/01-27-test_linter_plugins_fix_ecmaversion_ branch from d37831a to af233a5 Compare January 27, 2026 18:42
@graphite-app graphite-app bot merged commit af233a5 into main Jan 27, 2026
19 checks passed
@graphite-app graphite-app bot deleted the om/01-27-test_linter_plugins_fix_ecmaversion_ branch January 27, 2026 18:48
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants