tools icon indicating copy to clipboard operation
tools copied to clipboard

feat(rome_js_formatter): implement option preserve_quotes

Open bhbs opened this issue 3 years ago • 5 comments

Summary

This PR implements option preserve_quotes following Prettier. (docs) I referred to --quote-style for the implementation of the option.

Close #2482

Test Plan

  • Check new snapshots
    • crates/rome_js_formatter/tests/specs/js/module/string/properties_quotes.js.snap
    • crates/rome_js_formatter/tests/specs/ts/string/parameter_quotes.ts.snap

bhbs avatar Aug 16 '22 10:08 bhbs

After this PR is merged, I’d like to implement this option to VSCode Extension and playground!

bhbs avatar Aug 16 '22 10:08 bhbs

After this PR is merged, I’d like to implement this option to VSCode Extension and playground!

The VSCode extension now always reads the configuration from rome.json. We removed all the beta options. Only the playground needs it

ematipico avatar Aug 16 '22 10:08 ematipico

@MichaReiser @ematipico Thank you for reviewing! I addressed your feedback👍

bhbs avatar Aug 16 '22 14:08 bhbs

@ematipico Did you intend like this? a6a89ab

bhbs avatar Aug 17 '22 16:08 bhbs

@ematipico Did you intend like this? a6a89ab

Yes, that's it :)

It's okay if it's empty, I plan to change it soon. At least it's ready and there

ematipico avatar Aug 17 '22 17:08 ematipico