oxc/crates/oxc_formatter
Sg fae9a7c28b
feat(formatter): add "Quote Props" option (#652)
For #634. 



This PR prepares for the fix of #634, adding an option to formatter to
control whether to quote object properties. After this PR, the rulegen
script can use oxc-formatter to output JSON-like object literal.

The `Quote Props` option is from Prettier. For detail:
https://prettier.io/docs/en/options.html#quote-props

> Change when properties in objects are quoted.
> Valid options:
> "as-needed" - Only add quotes around object properties where required.
> "consistent" - If at least one property in an object requires quotes,
quote all properties.
> "preserve" - Respect the input use of quotes in object properties.

---------

Co-authored-by: Don Isaac <donald.isaac@gmail.com>
2023-08-15 11:40:38 +08:00
..
examples refactor: move SourceType from oxc_ast to oxc_span (#351) 2023-05-12 23:16:14 +08:00
src feat(formatter): add "Quote Props" option (#652) 2023-08-15 11:40:38 +08:00
Cargo.toml chore: release crates as v0.1.0 2023-07-27 13:54:17 +08:00
README.md refactor(formatter): remove whitespace minification from formatter (#337) 2023-05-07 17:58:57 +08:00

Formatter (Prettier)

TBD