Commit Graph
26 Commits
Author SHA1 Message Date
Georgii Dolzhykov b65cb6c1f6 Playground: doc explorer (#10183) 2022-07-23 22:46:16 +03:00
fisker Cheung 9691e7bc37 Add acorn parser (#12172) 2022-01-28 15:25:30 +08:00
Sosuke Suzukiandfisker Cheung 2664fcb2ba Enable import/no-anonymous-default-export (#11478)
* Enable import/no-anonymous-default-export

* Add names to default exported

* More

* Ignore shims

* Update scripts/build/config.mjs

Co-authored-by: fisker Cheung <lionkay@gmail.com>

* lint  for shims

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-09-10 11:17:09 +09:00
fisker Cheung 3d7016e2dc Add meriyah parser (#9514) 2020-11-05 14:08:37 +08:00
fisker CheungandChris Brody 73e3976c34 Add espree parser (#9000)
Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>
2020-10-13 09:14:02 +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
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 9805496c4d Add code sample for babel-flow parser (#6631) 2019-10-09 18:10:24 +02:00
JounQin e5fbef238d docs: fix possible typo AFAIK (#6341) 2019-07-30 11:48:14 +02: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 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 02f64af6e3 fix(vue): no error on range format (#4868) 2018-07-22 15:58:29 +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 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 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 961d25560f placeholder + refactors 2018-04-19 14:31:35 -03:00
Lucas Duailibe 47430d0c19 some huge changes 2018-04-11 18:22:03 -03:00