-
-
Notifications
You must be signed in to change notification settings - Fork 719
style(linter/plugins): use prettier-ignore in test fixtures
#15602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style(linter/plugins): use prettier-ignore in test fixtures
#15602
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
Merge activity
|
There was a problem hiding this 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 adds // prettier-ignore comments to test fixture files to prevent Prettier from automatically formatting code that needs specific formatting for testing purposes. The changes remove manual assertions that checked for accidental formatting, replacing them with a preventive approach using Prettier's ignore directive.
- Added
// prettier-ignorecomments before lines in test fixtures that require specific formatting - Removed assertion code in plugin.ts that manually verified fixtures weren't formatted
- Updated snapshot files to reflect the new line numbers and content after adding the ignore comments
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| apps/oxlint/test/fixtures/isSpaceBetween/files/index.js | Added // prettier-ignore comments before each test case to preserve intentional spacing |
| apps/oxlint/test/fixtures/isSpaceBetween/output.snap.md | Updated snapshot with new line numbers and prettier-ignore comments |
| apps/oxlint/test/fixtures/estree/files/index.ts | Added // prettier-ignore comments before parenthesized expressions that must be preserved |
| apps/oxlint/test/fixtures/estree/plugin.ts | Removed manual assertion checks for formatting, now relying on prettier-ignore |
| apps/oxlint/test/fixtures/estree/output.snap.md | Updated snapshot with new line numbers and prettier-ignore comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eb1a844 to
74033bd
Compare
Follow-on after #15593 and #15600. Use
// prettier-ignorecomments in test fixture files to prevent them being formatted, where formatting would break the test.