Skip to content

fix: reverse order of regex fields in tokens#182

Merged
overlookmotel merged 1 commit intomainfrom
om/02-24-fix_reverse_order_of_regex_fields_in_tokens
Feb 24, 2026
Merged

fix: reverse order of regex fields in tokens#182
overlookmotel merged 1 commit intomainfrom
om/02-24-fix_reverse_order_of_regex_fields_in_tokens

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Feb 24, 2026

Re-order fields of regex object in tokens in snapshots so pattern is before flags. Our convention in Oxc is that object fields are in source order, so we'd like to reverse the fields from the order Espree and TS-ESLint have them in.

We need the snapshots in this repo to have that same order, so conformance tests pass.

(2nd attempt after #179)

Copy link
Copy Markdown
Member Author

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

@overlookmotel overlookmotel marked this pull request as ready for review February 24, 2026 14:16
Copilot AI review requested due to automatic review settings February 24, 2026 14:16
Copy link
Copy Markdown

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.

Copilot wasn't able to review this pull request. There are 300 or more changed files, try reducing the number of files in this pull request and requesting a review from Copilot again.

@overlookmotel overlookmotel self-assigned this Feb 24, 2026
@overlookmotel overlookmotel merged commit 57b0d68 into main Feb 24, 2026
1 check passed
@overlookmotel overlookmotel deleted the om/02-24-fix_reverse_order_of_regex_fields_in_tokens branch February 24, 2026 14:18
graphite-app bot pushed a commit to oxc-project/oxc that referenced this pull request Feb 24, 2026
…19679)

Our convention is that object properties are in source code order. Reverse `pattern` and `flags` properties of `regex` objects in ESTree tokens to align with this pattern.

Bump `estree-conformance` submodule to include oxc-project/estree-conformance#182 which makes the same change in snapshots for conformance tests.
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.

2 participants