Playground: Remove parser from Copy config JSON (#6155)
This commit is contained in:
1 parent
3654108ebe
commit
9cb23fbf24
1 file changed
+12
-1
@@ -220,7 +220,18 @@ class Playground extends React.Component {
|
||||
{editorState.showSidebar ? "Hide" : "Show"} options
|
||||
</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
|
||||
</ClipboardButton>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user