Commit Graph
77 Commits
Author SHA1 Message Date
fisker Cheung 413a76d798 Remove plugins from standalone build (#14570) 2023-03-23 15:18:10 +08:00
fisker Cheung 6c9ba400fa Bundle printers in plugins (#14354) 2023-03-13 09:20:12 +08:00
fisker Cheung 2d23d33a40 Remove since from options and languages (#13699) 2022-10-23 11:18:36 +08:00
Georgii Dolzhykov effe30a3b8 Playground: show preprocessed AST (#13606) 2022-10-10 14:26:55 +03:00
fisker CheungandSosuke Suzuki 31a796d32c Restructure package files, add exports (#13530)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2022-10-06 15:20:19 +08:00
Georgii Dolzhykov 05c873f09d Playground: fix 'show doc', add folding for doc-explorer (#13336) 2022-08-22 09:25:18 +03:00
fisker 07ac240dfb Fix 2022-08-06 11:47:29 +08:00
fisker 5daa8eba6c Merge remote-tracking branch 'remotes/upstream/main' into next
# Conflicts:
#	.gitignore
#	website/playground/PrettierFormat.js
#	website/static/worker.js
2022-08-06 11:42:33 +08:00
Georgii Dolzhykov bbbeeb07f6 Playground: "Rethrow embed errors" checkbox (#13227) 2022-08-05 17:05:50 +03:00
fisker Cheung 298347c9fb Merge branch 'main' into next
# Conflicts:
#	netlify.toml
#	src/cli/find-cache-file.js
#	src/cli/utils.js
#	src/main/parser.js
#	website/playground/PrettierFormat.js
#	website/static/worker.js
2022-08-01 11:27:34 +08:00
Georgii Dolzhykov b65cb6c1f6 Playground: doc explorer (#10183) 2022-07-23 22:46:16 +03:00
fisker Cheung 8b00726cd4 Fix v3 website (#12845) 2022-05-08 17:56:50 +08:00
fisker Cheung e14411c278 Support async parser (#12748) 2022-05-04 11:15:48 +08:00
fisker Cheung c6d6b25833 prettier.{format,formatWithCursor,check}() are now async (#12574) 2022-04-29 14:22:24 +08:00
Georgii Dolzhykov 770ed280cf Playground: serialize errors in AST (#10548) 2021-03-16 17:53:05 +02:00
fisker Cheung 64a3906571 Enable unicorn/prefer-optional-catch-binding (#9464) 2021-02-25 18:28:55 +08:00
Georgii Dolzhykov 79d2f4a295 Add CLI flag for debugging comment attachment issues (#10124) 2021-01-27 12:30:10 +02:00
fisker Cheung 31a801134f Playground: serialize ast contains BigInt (#9525) 2020-10-31 22:32:29 +08:00
fisker Cheung 464883602c Update ESLint settings (#8923) 2020-08-07 13:40:17 +08:00
fisker Cheung f5c40bf977 Auto generate parsers for playground (#8771) 2020-07-17 09:07:26 +08:00
Cyrille David e398ccc66d Enable glimmer printer in the playground (#8373) 2020-05-22 19:13:49 +08:00
Georgii Dolzhykov 9dad95b35f Bump Prettier dependency to 2.0.0 2020-03-21 22:09:54 +02:00
fisker Cheung b3f0102a87 Remove babylon parser (#7533)
* Remove `babylon`

* Add changelog

* Fix website files
2020-02-24 18:19:03 +02:00
Georgii Dolzhykov cf3d9f0b80 api: remove the version parameter of getSupportInfo (#7620)
* api: remove the version parameter of getSupportInfo

* add changelog entry

* remove mapDeprecated

* Update pr-7620.md

* remove the first parameter completely

* Update api.md

* add default value for opts just to be on the safe side
2020-02-23 02:47:17 +02:00
JounQinandGeorgii Dolzhykov c1937cb1b8 feat: add new parser babel-ts to parse TypeScript syntaxes via Babel (#6400)
* feat: add new parser `babel-ts` to parse TypeScript syntaxes via Babel

* docs: document parser babel-ts

* chore: enable babel-ts in markdown and worker.js

* verify all TS tests against babel-ts except disabled by disableBabelTS

* support for TSDeclareMethod; fix abstract properties and methods

* fix embedded angular templates and styles

* fix TSImportType

* simplify babel options combinations

* fix method decorators

* fix ranges

* work around loc inconsistencies for SequenceExpression

* don't print trailing comma in type parameters (unsupported in TS < 3.3)

* preserve quotes for class properties

* align printing of single-parameter functions

* fix comments in degenerate single-element unions and intersections

* fix comments for methods

* fix comments for mapped types

* edit docs, change 'since' to 2.0.0

* add changelog

* fix code sample on playground

* update snapshots after rebase

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-29 14:11:16 +02:00
fisker Cheung 85eefb918e Style: enable object-shorthand (#7322) 2020-01-14 14:25:24 +03: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 7c4cebeaa5 feat: add babel-flow (#5685) 2018-12-29 21:35:47 +08:00
Ika 284764f030 fix(playground): backward compatibility for --parser babylon (#5690) 2018-12-28 14:56:58 +08:00
Ika 86a5c40bc3 fix(playground): backward compatibility for --parser babylon (#5688) 2018-12-28 14:15:22 +08:00
Wei-Wei Wu 91c20f7fbe Rename "babylon" with "babel" (#5647) 2018-12-27 21:05:19 +08:00
Ika 0534735c2f fix(vue): tweak semicolon for single expression in event bindings (#5519) 2018-11-29 09:28:35 +08:00
Ika fa40f2ddd3 docs(blog): 1.15 release (#5296) 2018-11-07 09:09:04 +08:00
Ika e022abc9b8 chore(playground): add a temporary workaround for parser-vue (#5347)
Temporary workaround
2018-11-05 22:11:59 +08:00
Ika 5e8a4a115a feat: support HTML/Vue/Angular (#5259) 2018-11-04 23:03:07 +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 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
Ika c5bbee67d3 fix(playground): no unnecessary import (#4653) 2018-06-09 00:01:14 +08:00
Lucas Duailibe 0d57f22098 Use new worker on playground 2018-05-27 15:24:50 -03: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 92485601eb refactor: fix linting 2018-05-10 02:27:56 +08:00
Lucas Duailibe edcebb0d54 Fix playground (#4454) 2018-05-09 14:27:25 -03:00
Lucas Duailibe c77f1e5987 [playground] Fix doc debug 2018-05-03 10:12:06 -03:00
Ika 643e2a83d6 feat(typescript): support TaggedTemplateExpression typeParameters (#4353)
* test: add tests

* feat(typescript): support TaggedTemplateExpression typeParameters

* fix(playground): `buffer is not defined` in `--parser typescript`

* chore(deps): update typescript-eslint-parser
2018-04-24 08:45:06 -05:00
Lucas Duailibe 9ca95011c0 refactor panels.js 2018-04-19 16:30:35 -03:00
Lucas Duailibe 1ed3865cb6 lint fixes 2018-04-17 18:09:36 -03:00
Lucas Duailibe f90560e6e9 second format 2018-04-17 13:40:55 -03:00