Skip to content

Comments

test(linter/plugins): shorten code in SourceCode test fixture#16498

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-04-test_linter_plugins_shorten_code_in_sourcecode_test_fixture
Dec 4, 2025
Merged

test(linter/plugins): shorten code in SourceCode test fixture#16498
graphite-app[bot] merged 1 commit intomainfrom
12-04-test_linter_plugins_shorten_code_in_sourcecode_test_fixture

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 4, 2025

Pure refactor of tests. Shorten code by putting sourceCode in a local var, rather than repeating context.sourceCode over and over.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI labels Dec 4, 2025
Copy link
Member Author

overlookmotel commented Dec 4, 2025


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.

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 refactors test fixture code to improve readability by extracting context.sourceCode into a local variable, reducing repetition throughout the file. The refactoring is purely cosmetic and doesn't change test behavior.

Key changes:

  • Extracted sourceCode from context into local variables to reduce repetitive context.sourceCode references
  • Applied the refactoring consistently across both createRule and createOnceRule test fixtures

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

@overlookmotel overlookmotel self-assigned this Dec 4, 2025
@overlookmotel overlookmotel added the A-linter-plugins Area - Linter JS plugins label Dec 4, 2025
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Dec 4, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 4, 2025

Merge activity

Pure refactor of tests. Shorten code by putting `sourceCode` in a local var, rather than repeating `context.sourceCode` over and over.
@graphite-app graphite-app bot force-pushed the 12-04-docs_linter_plugins_add_jsdoc_comments_to_sourcecode_properties branch from a015894 to a9b9298 Compare December 4, 2025 16:40
@graphite-app graphite-app bot force-pushed the 12-04-test_linter_plugins_shorten_code_in_sourcecode_test_fixture branch from 207ae5b to 2a9d7e9 Compare December 4, 2025 16:40
Base automatically changed from 12-04-docs_linter_plugins_add_jsdoc_comments_to_sourcecode_properties to main December 4, 2025 16:45
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 4, 2025
@graphite-app graphite-app bot merged commit 2a9d7e9 into main Dec 4, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 12-04-test_linter_plugins_shorten_code_in_sourcecode_test_fixture branch December 4, 2025 16:46
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…project#16498)

Pure refactor of tests. Shorten code by putting `sourceCode` in a local var, rather than repeating `context.sourceCode` over and over.
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.

1 participant