Georgii Dolzhykov
e1bfd2e2fc
fix playground: wrong parser shown in options on first open ( #6683 )
2019-10-18 14:20:55 +02:00
fisker Cheung
9805496c4d
Add code sample for `babel-flow` parser ( #6631 )
2019-10-09 18:10:24 +02:00
Ivan Pazhitnykh
223443c057
Playground: Fix "Report issue" 414 bug ( #6409 )
2019-08-30 22:30:36 +02:00
kamilic
7d0175ca90
feat: implement --vue-indent-script-and-style mentioned at pr-#… ( #6157 )
...
* feat: implement --vue-indent-script-and-style mentioned at pr-#6077
* docs: --vue-indent-script-and-style
* update new test case
* feat: playground for --vue-indent-script-and-style
* chores: Revert package.json version
* Remove noisy snapshots
2019-08-01 11:06:12 +02:00
JounQin
e5fbef238d
docs: fix possible typo AFAIK ( #6341 )
2019-07-30 11:48:14 +02:00
Simon Lydell
4893a86a6f
Fix markdown syntax highlighting for babel-flow ( #6231 )
...
Previously, the "Copy markdown" button in the playground generated
markdown containing this when having selected "babel-flow" as parser:
```babel-flow
This commit changes it to:
```jsx
So that the code blocks get syntax highlighting on GitHub.
2019-06-17 17:58:38 +02:00
fisker Cheung
24f161db56
Bump `eslint` ( #6201 )
2019-06-12 11:40:05 -03:00
Simon Lydell
9cb23fbf24
Playground: Remove `parser` from Copy config JSON ( #6155 )
2019-05-25 09:31:10 -03:00
Jody LeCompte
2c914c7c1a
Disable Ctrl + L shortcut in CodeMirror ( #6143 )
2019-05-22 13:17:46 -03:00
Lucas Azzola
f526c47b1e
Add an option to modify when Prettier quotes object properties ( #5934 )
...
* Implement quote-props=preserve
* Implement quote-props=consistent
* Add tests
* Enable quoteProps in playground
* Add documentation
* Cache objectHasStringProp calculations
* Fixup changelog
2019-03-06 20:33:08 +11:00
Nathan Totten
a093bb3f7b
Adds LWC Parser to support unquoted interop attributes ( #5800 )
...
This pull requests adds a new parser option `lwc`. This is the same as the HTML parser, but it adds support for unquoted HTML attributes per the needs of LWC. See: #5627
2019-02-01 13:58:50 +08:00
Ika
284764f030
fix(playground): backward compatibility for --parser babylon ( #5690 )
2018-12-28 14:56:58 +08:00
Ika
3a6c126f86
fix(playground): code sample for --parser babylon
2018-12-28 14:27:27 +08:00
Wei-Wei Wu
91c20f7fbe
Rename "babylon" with "babel" ( #5647 )
2018-12-27 21:05:19 +08:00
Lipis
7c1758de86
Update example for *.vue ( #5605 )
2018-12-07 16:34:26 +01:00
Ika
514b6d3741
Bump Prettier dependency to 1.15.0
2018-11-07 09:12:25 +08:00
Ika
40f46740f6
fix(jsx): consistent quotes in JSX expression ( #5349 )
2018-11-06 15:38:50 +08:00
Ika
5e8a4a115a
feat: support HTML/Vue/Angular ( #5259 )
2018-11-04 23:03:07 +08:00
Beau Smith
6e0de08122
User can copy JSON config from Playground. ( #5295 )
2018-10-25 17:41:08 -04:00
Ika
dd4687e7ef
feat(html): whitespace-sensitive formatting ( #5168 )
...
- whitespace-sensitive formatting
- respect css `display: block`/`white-space: pre` (data from [`html-styles`](https://github.com/marionebl/html-styles ))
- support magic comment (`<!-- display: block -->`)
- add an option to specify whitespace sensitivity (`--html-whitespace-sensitivity <css|strict|ignore>`)
- magic comments take precedence
- (default) `css`: respect default css style (safe in the most cases)
- `strict`: every node is considered whitespace sensitive (the safest)
- `ignore`: every node is considered whitespace insensitive (dangerous, the original behavior)
- inline inline-tags
- support ie conditional comment (`<!--[if IE]><![endif]-->`)
- indent the script/style content
- no inconsistent output for 2+ attributes
- force break tag if there're multiline attributes
2018-10-13 13:55:38 +08:00
Ika
13147facc5
feat(html): switch to htmlparser2 ( #5127 )
...
- switch to [`htmlparser2`](https://github.com/fb55/htmlparser2 )
- no need to fork
- won't generate pseudo nodes ([`parse5` will](https://github.com/prettier/prettier/issues/5098#issuecomment-423055181 ))
- should be [faster](https://github.com/fb55/htmlparser2#performance )
- support custom self-closing tags
- support HTML entities
- remove extra trailing newline for `<template>`
- distinguish empty/empty-string attributes (`<tag x>`/`<tag x="">`)
- rename `--parser parse5` with `--parser html`
- enable `html` since 1.15, which means it's enabled by default if you install the dev version from GitHub after this PR merged.
2018-09-22 21:53:38 +08:00
Ika
79f4251e26
chore: enable html on preview playground ( #5105 )
2018-09-19 09:19:18 +08:00
Ika
1790211f76
feat: support MDX ( #4975 )
...
* feat: support MDX
* refactor: flip condition
2018-08-13 22:23:09 +08:00
Ika
1915cc3c46
chore: enable glimmer parser on preview playground ( #4915 )
2018-08-01 15:44:37 +08:00
Ika
02f64af6e3
fix(vue): no error on range format ( #4868 )
2018-07-22 15:58:29 +08:00
Ika
c4be0a57c3
feat(playground): add description for options ( #4785 )
...
* feat(playground): add description for options
* fix: support opposite description
* refactor
2018-07-02 08:23:21 +08:00
Ika
b4a92c6ee5
feat(playground): use real code sample ( #4770 )
...
* feat(playground): double click to insert example
* fix: correct condition
* feat: real code sample
* fix: remove unnecessary updateValue
* feat: auto-select on focus
2018-07-01 16:17:25 +08:00
Ika
dcf44ffbdc
feat: support YAML ( #4563 )
...
* feat: support YAML
* fix: do not indent sequence in mappingValue
* docs: add yaml to index.md
* fix: reduce `SyntaxError: Node#parse consumed no characters`
* chore: remove old-build and new-worker.js
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* fix: no space after `<<`
* fix: add yaml to standalone test
* test: add tests
* fix: next empty line in flow collection
* fix: tabs are not allowed
http://yaml.org/spec/1.2/spec.html#space/indentation/
* fix: update parser
* feat: rewrite the mappingItem logic
* feat: indent sequence in mapping
* feat(doc): add ifBreak#groupId and group#id
* chore: fix node 4
* chore: add tools_yaml.svg
* chore: remove resolved TODO
* refactor: remove unnecessary workaround
* chore(worker): importScriptOnce
* chore(build): rename with babelPlugins
* make it rollup compatible
* feat: support singleQuote
* refactor
2018-06-21 10:29:42 +08:00
Lucas Duailibe
f40b82d183
Fix playground ( #4541 )
2018-05-24 21:11:12 -03:00
Suchipi
ec45dc9a4c
(refactor): Move common options out of JS plugin ( #4445 )
...
* (refactor): Move common options out of JS plugin
* Add Common category to playground
2018-05-15 14:14:50 -06:00
Ika
1062f2a889
feat: support JSON.stringify formatting ( #4450 )
...
* test: move tests
* feat: support legacy JSON formatting
* fix: add missing assertion
* test: fix coverage
* fix: same output as JSON.stringify
* refactor: fix linting
* refactor: rename to json-stringify
* refactor: fix linting
* fix: should fix the production build
* docs: remove outdated name
* fix(playgound): add lib/parser-json-stringify.js
* feat(playgound): add example for json-stringify
* fix: no error on singleQuote string
* fix(playground): correctly load json-stringify
* fix: identifier is only allowed in ObjectProperty.key
* refactor: clearer
2018-05-14 09:12:25 +08:00
Ika
b46a46b112
fix(playground): add missing `input` code sample for `copy markdown` ( #4382 )
2018-04-26 00:37:29 -03:00
Ika
317f3a3c56
feat: split out JSON5 ( #4367 )
...
* feat: split out JSON5
* test: update snapshots
* test: update debug-check tests
* feat(playground): use JSON's code sample for JSON5
* fix: add missing trailing newline
2018-04-25 22:10:22 +08:00
Lucas Duailibe
3bc9b68cf6
Remove old playground files
2018-04-20 12:10:32 -03:00
Lucas Duailibe
b611c62dea
last minute fixes
2018-04-20 11:50:36 -03:00
Lucas Duailibe
1f320a6031
range support
2018-04-20 11:30:47 -03:00
Lucas Duailibe
57cdf314d5
rename
2018-04-20 09:54:15 -03:00
Lucas Duailibe
c794de0e9f
start overlay support
2018-04-19 19:23:38 -03:00
Lucas Duailibe
9ca95011c0
refactor panels.js
2018-04-19 16:30:35 -03:00
Lucas Duailibe
961d25560f
placeholder + refactors
2018-04-19 14:31:35 -03:00
Lucas Duailibe
a7a65aceb2
fix empty hash
2018-04-19 13:56:10 -03:00
Lucas Duailibe
f3cf50515d
fix node 4 problem
2018-04-19 13:55:58 -03:00
Lucas Duailibe
1ed3865cb6
lint fixes
2018-04-17 18:09:36 -03:00
Lucas Duailibe
971da5f8c1
lint fixes
2018-04-17 17:29:44 -03:00
Lucas Duailibe
0ca6ff691e
simplify some stuff
2018-04-17 16:42:03 -03:00
Lucas Duailibe
2172ed95bf
refactor & fixes
2018-04-17 16:09:44 -03:00
Lucas Duailibe
fc52887e94
optimize panel updates
2018-04-17 14:50:53 -03:00
Lucas Duailibe
33c00ca111
handling PR versions
2018-04-17 13:53:20 -03:00
Lucas Duailibe
1f7e48aa46
remove dead code
2018-04-17 13:42:05 -03:00
Lucas Duailibe
f90560e6e9
second format
2018-04-17 13:40:55 -03:00