From 5c53b1de76a9ad803a63d052c2b581fbb19a6653 Mon Sep 17 00:00:00 2001 From: Chris Brody Date: Tue, 22 Jan 2019 12:21:44 -0500 Subject: [PATCH] [prettierx] cover standard ternary inconsistency (#42) in tests/standard & docs as reported in brodybits/prettierx#40 (this should have been part of the proposal in prettier/prettier#5723) Note that this inconsistency is resolved by brodybits/prettierx#41 which is to be included in an upcoming merge. Co-authored-by: Christopher J. Brody Co-authored-by: Mohit Singh Co-authored-by: Adam Stankiewicz --- README.md | 2 + .../standard/__snapshots__/jsfmt.spec.js.snap | 56 +++++++++++++++++++ tests/standard/incorrect.js | 27 +++++++++ 3 files changed, 85 insertions(+) diff --git a/README.md b/README.md index 1ca44d1271..9416ff5b3b 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ The following options should be used to _format_ the code according to [standard - `--no-semi` (`semi: false`) - `--yield-star-spacing` (`yieldStarSpacing: true`) +Known conflict with `standard` in ternary returning objects ([brodybits/prettierx#40](https://github.com/brodybits/prettierx/issues/40)) + Note that this tool does _not_ follow any of the other [standard js](https://standardjs.com/) rules. It is recommended to use this tool together with eslint, in some form, to achive correct formatting according to [standard js](https://standardjs.com/).