+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_formatter): Fix dropped initializer comments #3397

Merged
merged 2 commits into from
Oct 11, 2022

Conversation

MichaReiser
Copy link
Contributor

This PR fixes an issue where comments associated with initializers in variable declarators or class properties were dropped. I noticed this when formatting the vscode repo.

Tests

I added a bunch of new snapshot tests to verify the placement of comments for properties and variable declarators (fewer for variable declarators, because there are already many in Prettier's test suite).

I also run Rome format on the vscode repo to verify that there are no more diagnostics about dropped comments

This PR fixes an issue where comments associated with initializers in variable declarators or class properties were dropped. I noticed this when formatting the `vscode` repo.

## Tests

I added a bunch of new snapshot tests to verify the placement of comments for properties and variable declarators (fewer for variable declarators, because there are already many in Prettier's test suite).

I also run Rome format on the vscode repo to verify that there are no more diagnostics about dropped comments
@MichaReiser MichaReiser added the A-Formatter Area: formatter label Oct 11, 2022
@MichaReiser MichaReiser added this to the 10.0.0 milestone Oct 11, 2022
@MichaReiser MichaReiser temporarily deployed to netlify-playground October 11, 2022 10:10 Inactive
@netlify
Copy link

netlify bot commented Oct 11, 2022

Deploy Preview for rometools canceled.

Name Link
🔨 Latest commit e19ad29
🔍 Latest deploy log https://app.netlify.com/sites/rometools/deploys/6345413b9b573200097f4c8c

@MichaReiser MichaReiser temporarily deployed to netlify-playground October 11, 2022 10:11 Inactive
@github-actions
Copy link

github-actions bot commented Oct 11, 2022

@MichaReiser MichaReiser merged commit 193c2e0 into main Oct 11, 2022
@MichaReiser MichaReiser deleted the fix/assignment-comments branch October 11, 2022 11:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Formatter Area: formatter
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载