Skip to content

Conversation

@KirtiGautam620
Copy link
Contributor

Issues Fixed

1. TypeScript incorrectly marked as JavaScript

File: standalone.test.ts (Line 125)

Problem:
A snippet referencing src/plugin.ts used the js template tag even though the content included TypeScript syntax (export interface PluginOptions {}).
This caused prettier-plugin-embed to attempt parsing TypeScript as JavaScript and fail.

Fix:

  • Replaced jsts template tag
  • Added ts to imports from ../utils

2. Invalid CSS parsed as actual CSS

File: index.test.ts (Lines 2595–2599)

Problem:
The test intentionally contains invalid CSS (*/ without an opening /*).
It was tagged with the css template tag, causing Prettier to try formatting it and crash.

Fix:

  • Replaced csstxt template tag
  • Added txt to imports from ../utils

Result

  • Prettier lint checks now pass
  • TypeScript code is formatted correctly
  • Invalid CSS test no longer breaks formatting
  • Test suite is more stable and consistent

@KirtiGautam620 KirtiGautam620 requested a review from a team as a code owner December 2, 2025 18:21
@coderabbitai
Copy link

coderabbitai bot commented Dec 2, 2025

Walkthrough

This pull request includes formatting and import adjustments across documentation, test files, and type definitions. The README documentation syntax is updated to use standard Markdown heading syntax. Test files expand their utility imports to include txt and ts exports. A test case updates its template tag usage to align with the new imports. Additionally, an empty interface definition formatting is standardized to single-line syntax.

Pre-merge checks

✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly relates to the changeset, detailing the two specific issues fixed (TypeScript marked as JavaScript and invalid CSS) with file locations and solutions.
Title check ✅ Passed The title accurately describes the main fix: correcting invalid template tags in test files to resolve Prettier formatting issues.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KirtiGautam620
Copy link
Contributor Author

Hii @RobinMalfait,
This PR corrects template tags in two test files (ts and txt), resolving Prettier failures without changing test behavior.
Please review when you have time. Thanks!

@thecrypticace thecrypticace changed the title fixed correct template tags for TypeScript and invalid CSS test cases Fix invalid template tags in tests Dec 2, 2025
@thecrypticace thecrypticace enabled auto-merge (squash) December 2, 2025 18:47
@thecrypticace thecrypticace merged commit 0d0d97d into tailwindlabs:main Dec 2, 2025
7 checks passed
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