Skip to content

refactor(linter/plugins): simplify token types#20476

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/03-17-refactor_linter_plugins_simplify_token_types
Mar 21, 2026
Merged

refactor(linter/plugins): simplify token types#20476
graphite-app[bot] merged 1 commit intomainfrom
om/03-17-refactor_linter_plugins_simplify_token_types

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Mar 17, 2026

Small refactor. Introduce a Regex type for the regex field of RegularExpressionToken, to shorten code.

Copy link
Member Author

overlookmotel commented Mar 17, 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 changes, fast-track this PR to the front of the merge queue

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.

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

Refactors the JS-side token type definitions in apps/oxlint/src-js/plugins/tokens.ts by introducing a dedicated Regex type for the RegularExpressionToken.regex field to reduce repeated/verbose type expressions in the tokenizer/deserializer code.

Changes:

  • Replaces the inline { pattern; flags } regex descriptor on RegularExpressionToken with a Regex interface.
  • Updates internal caches (regexObjects) and token implementation fields to use the new Regex type.

@graphite-app
Copy link
Contributor

graphite-app bot commented Mar 20, 2026

Merge activity

  • Mar 20, 10:48 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 20, 10:53 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 21, 12:25 PM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Mar 21, 12:29 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #20475.
  • Mar 21, 12:29 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #20475.
  • Mar 21, 12:38 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 21, 12:38 PM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Mar 21, 12:45 PM UTC: Merged by the Graphite merge queue.

@overlookmotel overlookmotel force-pushed the om/03-17-refactor_linter_plugins_simplify_token_types branch from e097ce7 to 4224e9e Compare March 21, 2026 12:20
@overlookmotel overlookmotel force-pushed the om/03-16-perf_linter_plugins_remove_regex_from_getcommentsbefore_getcommentsafter_ branch from 759ddcf to 2f9c95b Compare March 21, 2026 12:20
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 21, 2026
@overlookmotel overlookmotel force-pushed the om/03-17-refactor_linter_plugins_simplify_token_types branch from 4224e9e to 8b4b4c0 Compare March 21, 2026 12:32
@overlookmotel overlookmotel force-pushed the om/03-16-perf_linter_plugins_remove_regex_from_getcommentsbefore_getcommentsafter_ branch from 2f9c95b to 1ff472d Compare March 21, 2026 12:32
@overlookmotel overlookmotel added 0-merge Merge with Graphite Merge Queue labels Mar 21, 2026
@graphite-app graphite-app bot changed the base branch from om/03-16-perf_linter_plugins_remove_regex_from_getcommentsbefore_getcommentsafter_ to graphite-base/20476 March 21, 2026 12:38
@graphite-app graphite-app bot changed the base branch from graphite-base/20476 to main March 21, 2026 12:41
Small refactor. Introduce a `Regex` type for the `regex` field of `RegularExpressionToken`, to shorten code.
@graphite-app graphite-app bot force-pushed the om/03-17-refactor_linter_plugins_simplify_token_types branch from 8b4b4c0 to 21f84ce Compare March 21, 2026 12:42
@graphite-app graphite-app bot merged commit 21f84ce into main Mar 21, 2026
23 checks passed
@graphite-app graphite-app bot deleted the om/03-17-refactor_linter_plugins_simplify_token_types branch March 21, 2026 12:45
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 21, 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-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants