Commit Graph
100 Commits
Author SHA1 Message Date
fisker Cheung 386759c6f7 Test: Allow multiple parsers in error test (#9648) 2020-11-16 15:19:50 +08:00
fisker Cheung ef6a2c5f8a Refactor: Simplify markdown table print (#9660) 2020-11-16 08:56:45 +08:00
fisker Cheung dc541cc9b9 JS: Refactor embed (#9653) 2020-11-16 01:15:01 +08:00
fisker Cheung f9f66711b9 Fix comments in require() with no argument (#9670) 2020-11-16 01:11:53 +08:00
fisker CheungandGeorgii Dolzhykov 35a1497024 Update remark-math to v3 (#7938)
* bump remark-math to 3.0.1

* escape $ only it was escaped in the input

* remove unsupported syntax from tests

remark-math@3 doesn't support text after the closing fence ($$). Such $$ aren't parsed as a closing fence anymore.

* refactor

* add a test

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-11-15 19:03:35 +02:00
fisker Cheung 6745a27975 Refactor: Reduce comment related functions parameters (#9621) 2020-11-14 15:43:11 +08:00
fisker Cheung 7d608bafc7 Rename preprocess and postprocess file (#9651) 2020-11-14 14:55:07 +08:00
fisker Cheung 3e20fc244c Lint: Report duplicated changelog (#9666) 2020-11-14 12:45:30 +08:00
fisker Cheung 4bcf8a3a36 Markdown: Fix extra empty line added after empty table (#9654) 2020-11-13 19:13:03 +08:00
fisker 9b206b5605 Fix renamed function isNodeIgnoreComment -> isPrettierIgnoreComment 2020-11-13 09:15:42 +08:00
fisker Cheung 47fbf284df Fix glimmer locStart and locEnd (#9626) 2020-11-13 09:06:16 +08:00
fisker CheungandGeorgii Dolzhykov 2a9d0f66d5 Typescript: Fix prettier-ignored mapped types (#9551)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-11-13 09:06:02 +08:00
fisker Cheung 28d914b811 Vue: Consistent slot, support Vue3 (#9609) 2020-11-13 09:05:30 +08:00
fisker Cheung 46a3213ec8 Extract printTemplateLiteral (#9646) 2020-11-13 00:07:31 +08:00
fisker Cheung 6b9c223ced DRY FastPath (#9617) 2020-11-11 13:39:39 +08:00
fisker Cheung 13c88511da Refactor: Add getCallArguments and iterateCallArgumentsPath (#9608) 2020-11-11 10:02:47 +08:00
fisker Cheung 60a5729a19 Move prettier-ignore related functions into language-js/ (#9555) 2020-11-10 09:12:46 +08:00
fisker Cheung 9e9cc85072 Enable directly-loc-start-end for all languages (#9610) 2020-11-10 09:06:08 +08:00
fisker Cheung 7836466d67 Test: snapshot parse errors (#9467) 2020-11-06 15:27:04 +08:00
fisker Cheung a82430ec59 Add parser check to flow-comment related checks (#9592) 2020-11-05 23:13:57 +08:00
fisker Cheung 7075c9cff4 Exclude inline comments from flow annotation comments (#9572) 2020-11-05 23:12:23 +08:00
fisker Cheung 9937fd22ba Simplify flow Variance node print (#9571) 2020-11-05 23:10:53 +08:00
fisker Cheung 6194e9825c Refactor: Extract printFunctionParameters (#9604) 2020-11-05 23:09:08 +08:00
fisker Cheung 84b81c8a1a Enable directly-loc-start-end in language-css (#9591) 2020-11-05 19:26:05 +08:00
fisker Cheung 947e97de63 Fix a condition (#9560) 2020-11-05 14:13:56 +08:00
fisker Cheung 309ffdd562 Refactor: Use ignoredProperties for all languages (#9586) 2020-11-05 14:12:14 +08:00
fisker Cheung 3d7016e2dc Add meriyah parser (#9514) 2020-11-05 14:08:37 +08:00
fisker Cheung 1e673a6fed JS: Use isBlockComment/isLineComment (#9575) 2020-11-05 11:09:12 +08:00
fisker Cheung 743101f778 Fix more locStart/locEnd from options (#9590) 2020-11-05 11:07:59 +08:00
fisker Cheung 4295bb2a55 Flow: Improve comment types detection (#9563) 2020-11-04 09:22:30 +08:00
fisker Cheung bbd1f5d1d5 Remove for-each-in syntax (#9585) 2020-11-04 08:52:49 +08:00
fisker Cheung c7390d33b7 Refactor: Use locStart and locEnd directly from language-js/loc.js (#9576) 2020-11-04 08:52:02 +08:00
fisker CheungandGeorgii Dolzhykov db90d67c41 Flow: Fix missing parentheses around prettier-ignored arguments (#9553)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-11-02 10:42:31 +08:00
fisker Cheung 5b6d1dfd91 Refactor: getParserName -> inferParserByLanguage (#9556) 2020-11-02 10:41:03 +08:00
fisker Cheung 2a95cc2244 Remove dead code (#9557) 2020-10-31 23:17:12 +02:00
fisker Cheung 31a801134f Playground: serialize ast contains BigInt (#9525) 2020-10-31 22:32:29 +08:00
fisker Cheung 3f4c8c1df0 Treat more types as simple type (#9543) 2020-10-31 21:15:35 +08:00
fisker Cheung edf668b173 Refactor needs-parens.js (part 2) (#9498) 2020-10-31 21:14:57 +08:00
fisker Cheung d2ce7d44d5 Refactor: Improve readability (#9539) 2020-10-30 16:52:17 +08:00
fisker CheungandGeorgii Dolzhykov fbee029497 Add index to FastPath#each() callback (#9499)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-10-30 12:27:20 +08:00
fisker Cheung b239263e23 Flow: support BigIntLiteralTypeAnnotation and BigIntTypeAnnotation (#9523) 2020-10-30 10:22:17 +08:00
fisker Cheung eabceb2dcb Consistent type print (#9521) 2020-10-30 09:56:47 +08:00
fisker Cheung 51d6badb82 Improve massageAST (#9519) 2020-10-29 17:12:45 +08:00
fisker Cheung 95bf0ab7d3 Run tests on Node.js 15 (#9494)
* Run tests on `Node.js` 15

* Switch `exclude` to `include`
2020-10-28 09:01:49 +08:00
fisker Cheung fb07399ac5 Playground: only build needed files (#9480) 2020-10-26 09:44:09 +08:00
fisker CheungandSosuke Suzuki bb31bf481c Refactor function parameters print (#9489)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2020-10-26 09:22:37 +08:00
fisker Cheung e32cd5d284 Fix missing esm files in dist/package.json (#9491) 2020-10-26 09:07:44 +08:00
fisker Cheung 771a09dfee Refactor needs-parens.js (#9485) 2020-10-26 09:05:21 +08:00
fisker Cheung dba174421a Simplify cursor and range logic (#9389) 2020-10-24 00:11:32 +08:00
fisker Cheung 98e85eec74 Test "import assertions" on other parsers (#9475) 2020-10-23 20:44:29 +08:00
fisker Cheung 6fbf38b55b Add parens to object value that it's an assignment (#9484) 2020-10-23 20:43:42 +08:00
fisker Cheung f5f3cabdfe Refactor JS embed (#9433) 2020-10-22 13:32:10 +08:00
fisker Cheung 140cb14f3a JS: Fix import {a as a} and export {a as a} format (#9435) 2020-10-20 14:38:34 +08:00
fisker Cheung b7be0b5dbb Add .git-blame-ignore-revs (#9415) 2020-10-18 09:05:28 +08:00
fisker Cheung 7d80bae76a Consistent format on invalid template literals (#9431) 2020-10-17 00:51:00 +08:00
fisker Cheung 3fe4666a85 Consistent parser errors (#9406) 2020-10-16 10:39:05 +08:00
fisker Cheung 16ea42e743 Update website deps (#9416) 2020-10-16 10:37:58 +08:00
fisker Cheung ed465ae740 Minor tweak (#9407) 2020-10-15 14:12:31 +08:00
fisker Cheung 1005954c75 Test: use errors options instead of disableBabelTS (#9387) 2020-10-13 17:16:40 +08:00
fisker Cheung e10aeee5c9 HTML: Fix crash on reading Node.sourceSpan (#9372) 2020-10-13 09:17:57 +08:00
fisker CheungandGeorgii Dolzhykov 07f6d49ef3 Stop inferring the parser to be json for .jsonl files (#9371)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-10-13 09:17:33 +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
fisker Cheung ba14e7c3f2 CLI: Fix error on dir or file that name is a number (#9298) 2020-10-08 22:00:01 +08:00
fisker Cheung 28b5330b6b Use Jest@26 (#9337) 2020-10-08 21:51:51 +08:00
fisker CheungandGeorgii Dolzhykov 64cb7abed8 JS: Fix comments inside template (#9278)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-10-05 05:49:52 +08:00
fisker Cheung 7c5a7d3c74 Markdown: Fix missing blank lines in fenced code block (#8786) 2020-09-30 17:03:14 +08:00
fisker Cheung 542f60dbed Update postcss@7 to latest (#9289) 2020-09-28 18:13:37 +08:00
fisker Cheung d3a2a2b12e Remove .flowconfig (#9286) 2020-09-28 12:56:57 +03:00
fisker Cheung 3dbb584772 Disable Jest verbose, remove pattern for size check job (#9284) 2020-09-28 14:05:46 +08:00
fisker Cheung 9efeb8309e Update postcss-scss to v3 (#9210) 2020-09-27 08:49:16 +08:00
fisker Cheung 50eeaadeca MDX: fix JSX format (#9267) 2020-09-27 08:46:19 +08:00
fisker Cheung b77da32a80 Update postcss to v8 (#9209)
* Update `postcss` v8

* Parser custom properties

* Improve logic

* Update lint script

* Fix node location

* Fix comments inside

* Add a test

* Test on `less` and `scss` too

* Fix empty prop print

* Clean

* Update `postcss`

* Exclude `regenerator`

* Test `no-semi`

* Add changelog

* Typo

* Apply review suggestion

* Style

* Simplify logic

* Remove error test, we don't throw on this anymore

* Style

* Update postcss

* Update postcss
2020-09-25 00:51:55 +08:00
fisker Cheung 203be9da5a Change test package name (#8848) 2020-09-18 14:05:29 +08:00
fisker Cheung 47ed40d970 Enable CR test (#9148)
* Enable `CR` test

* Fix tests

* Ignore `standalone.js`
2020-09-17 07:35:33 +08:00
fisker Cheung a5a6ed7872 Switch get-stream to get-stdin (#9149) 2020-09-17 07:32:19 +08:00
fisker Cheung 94ef5f5683 Test: Fix indexes calculation (#9152)
* Test: Fix indexes calculation

* Simplify logic

* Update snapshots
2020-09-17 07:31:29 +08:00
fisker CheungandAlexander Kachkaev 57f74984f8 Website: Remove add users link (#9187)
Co-authored-by: Alexander Kachkaev <alexander@kachkaev.ru>
2020-09-14 13:53:20 +08:00
fisker Cheung 4de63cfc4f Test: add test for issue 5961 (#9153) 2020-09-07 17:59:50 +03:00
fisker Cheung 370844cc4c Run full test on every parser (#9070)
* Refactor test

* Fix

* Improve `hasPragma` & `insertPragma` on files has BOM

* Fix `coreFormat` cursorOffset

* Code style

* Update snapshots

* Refactor

* Restore BOM test

* Add export

* Empty file

* return after SyntaxError

* EOL test

* Fix eol tests

* Named export

* Tweak matrix

* Disable on `requirePragma`

* Disable `cr` test

* Simplify logic

* Update `verbose`

* Remove `test:full-test`

* Typo
2020-09-04 23:43:41 +08:00
fisker Cheung 932400a928 Add Yarn 2 files to .gitignore (#9124) 2020-09-01 22:33:51 +08:00
fisker Cheung 56da3ba31c Update cspell.json (#9105) 2020-09-01 18:40:26 +08:00
fisker Cheung b87a3d7ffe Refactor RecoveredErrors rethrow (#9075) 2020-09-01 17:29:27 +08:00
fisker Cheung 01f986bea9 Make isSCSS* function stricter (#9093) 2020-09-01 16:58:35 +08:00
fisker Cheung c0bca1805d Remove css parser from isLessParser check (#9092) 2020-09-01 15:28:11 +08:00
fisker Cheung 0aba03062d Remove a unnecessary check in css printer (#9094) 2020-09-01 11:24:58 +08:00
fisker Cheung bd46d5f1bc Glimmer: Use common locationToOffset (#9106) 2020-09-01 11:24:33 +08:00
fisker CheungandGeorgii Dolzhykov f5e96f7d83 Redirect babel parser to babel-flow (#9071)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-09-01 11:23:47 +08:00
fisker Cheung 589ebf670b Add pure css parser (#7933) 2020-08-28 13:07:49 +08:00
fisker Cheung c85ff01ede CI: remove fetch-depth (#9086) 2020-08-28 12:52:50 +08:00
fisker Cheung e8b299d164 Rename native shims to .mjs (#9079) 2020-08-28 10:03:36 +08:00
fisker Cheung c8e7e0b003 Update js languages (#9073) 2020-08-28 10:02:45 +08:00
fisker Cheung fadd93571d Turn test setup file to lazy load (#9080) 2020-08-28 10:02:08 +08:00
fisker Cheung f2e3cb7f3b Support .wxs & .wxss (#9081)
* Support `.wxs` &  `.wxss`

* Spell check

* Add comments

* Spellcheck
2020-08-27 20:56:53 +03:00
fisker 4382203c9c Fix yarn.lock 2020-08-26 17:58:28 +08:00
fisker Cheung ebe9e07716 Vue: Fix format on self-closing and empty blocks (#9055) 2020-08-26 11:19:34 +08:00
fisker Cheungandprettifier[bot] ee57066cb4 HTML: Fix format on style[lang="sass"] (#9051)
Co-authored-by: prettifier[bot] <45367598+prettifier[bot]@users.noreply.github.com>
2020-08-26 00:26:03 +08:00
fisker Cheung 073dfd9fa2 Vue: fix format on blocks with src attribute (#9052) 2020-08-25 23:06:25 +08:00
fisker Cheung 2a15e273a0 Add loc back for typescript parser (#9053) 2020-08-25 23:05:41 +08:00
fisker Cheung 720177ac5c HTML: Fix format on files with frontMatter (#9043) 2020-08-25 19:49:38 +08:00
fisker Cheung 9550428987 Chore: Update lint:prettier script (#9045) 2020-08-25 17:39:24 +08:00