Support css, scss, and less#47
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class support for formatting CSS-family syntaxes through this merge plugin by wiring Prettier’s PostCSS-based parsers and introducing snapshot coverage for css/scss/less scenarios.
Changes:
- Add
css,scss, andlessparser support in the plugin by delegating toprettier/plugins/postcss. - Add Vitest snapshot tests (and snapshots) for css/scss/less across zero/single/multiple plugin scenarios.
- Bump
prettier-plugin-brace-styleto0.10.0(package.json + lockfile), and extend the global supported parser-name union.
Reviewed changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/parsers.ts |
Imports PostCSS parsers and registers css/scss/less with transformParser. |
global.d.ts |
Adds css/scss/less to SupportedParserNames. |
tests/css/*.test.ts |
Adds snapshot-based tests for CSS parser behavior with 0/1/2 plugins. |
tests/css/__snapshots__/* |
New snapshots for the CSS tests. |
tests/scss/*.test.ts |
Adds snapshot-based tests for SCSS parser behavior with 0/1/2 plugins. |
tests/scss/__snapshots__/* |
New snapshots for the SCSS tests. |
tests/less/*.test.ts |
Adds snapshot-based tests for LESS parser behavior with 0/1/2 plugins. |
tests/less/__snapshots__/* |
New snapshots for the LESS tests. |
package.json |
Updates prettier-plugin-brace-style devDependency to 0.10.0. |
pnpm-lock.yaml |
Lockfile updates reflecting the brace-style bump. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.