Playground: Remove `parser` from Copy config JSON (#6155)
parent
3654108ebe
commit
9cb23fbf24
|
@ -220,7 +220,18 @@ class Playground extends React.Component {
|
||||||
{editorState.showSidebar ? "Hide" : "Show"} options
|
{editorState.showSidebar ? "Hide" : "Show"} options
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={this.clearContent}>Clear</Button>
|
<Button onClick={this.clearContent}>Clear</Button>
|
||||||
<ClipboardButton copy={JSON.stringify(options, null, 2)}>
|
<ClipboardButton
|
||||||
|
copy={JSON.stringify(
|
||||||
|
// Remove `parser` since people usually paste this
|
||||||
|
// into their .prettierrc and specifying a toplevel
|
||||||
|
// parser there is an anti-pattern. Note:
|
||||||
|
// `JSON.stringify` omits keys whose values are
|
||||||
|
// `undefined`.
|
||||||
|
Object.assign({}, options, { parser: undefined }),
|
||||||
|
null,
|
||||||
|
2
|
||||||
|
)}
|
||||||
|
>
|
||||||
Copy config JSON
|
Copy config JSON
|
||||||
</ClipboardButton>
|
</ClipboardButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue