Commit Graph
100 Commits
Author SHA1 Message Date
fisker Cheung e1afe1adc2 Remove parser getters from universal bundles (#11137) 2021-07-13 15:16:31 +08:00
fisker Cheung 10053999d7 Update meriyah to v4.2.0 (#11194) 2021-07-12 14:45:33 +08:00
fisker Cheung ff1870ab77 Remove useless package info from standalone build (#11138) 2021-07-12 14:33:52 +08:00
fisker Cheung 5378e99859 Update angular to v12.1.1 (#11173) 2021-07-08 15:28:10 +08:00
fisker Cheung 57f8eec8e6 Website: Add mode to webpack command (#11131) 2021-06-29 09:10:18 +08:00
fisker Cheung 57616ad865 Enable no-return-await and require-await rule, fix clean-cspell script (#11079) 2021-06-16 22:20:47 +08:00
fisker Cheung 1aa188ecd1 Enable no-console rule on CI (#11045) 2021-06-11 14:16:59 +08:00
fisker Cheung ce96e4899f CLI: Fix failure on dir with trailing slash (#11000) 2021-06-11 11:03:42 +08:00
fisker Cheung c3c300dd8f Remove @types/node package (#10994) 2021-06-04 13:28:36 +03:00
fisker Cheung c8133f8afa Fix StringLiteral print (#10997) 2021-06-01 08:50:35 +08:00
fisker Cheung 81a1c46311 Minor tweak to js printer (#10954) 2021-05-27 18:00:31 +08:00
fisker Cheung 40cd8c9d7e Move flow node to flow.js (#10449) 2021-05-27 09:00:23 +08:00
fisker Cheung d3b777dd7d Update build script (#10946) 2021-05-27 08:54:42 +08:00
fisker Cheung 2783bb41b1 Update jest to v27 (#10947) 2021-05-26 09:03:29 +08:00
fisker Cheung c286d847d9 Remove more Array#reduce() (#10907) 2021-05-24 01:26:00 +03:00
fisker Cheung 8f17187bf7 Reduce parser-graphql size (#10903) 2021-05-19 09:23:31 +08:00
fisker Cheung 4d37ac46a3 Add __babel_estree parser (#10910) 2021-05-19 09:22:52 +08:00
fisker Cheung 9b7ba8a42c Style: Use dotAll regexp (#10864) 2021-05-18 02:44:21 +08:00
fisker Cheung 085e38bffb Move replaceEndOfLineWith to docUtils (#10862) 2021-05-17 20:10:44 +03:00
fisker CheungandGeorgii Dolzhykov 2e1021ca79 Reduce use of Array#reduce() (#10863)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-05-16 12:43:13 +08:00
fisker Cheung 90ea7e4a4f Use fsPromise in getFileContentOrNull (#10859) 2021-05-16 12:42:15 +08:00
fisker Cheung 213a825131 Use join in replaceNewlinesWithLiterallines (#10860) 2021-05-16 12:40:00 +08:00
fisker Cheung a9c3960f2f Remove dead code (#10869) 2021-05-16 12:35:55 +08:00
fisker Cheung f4a6232848 Switch some scripts to ESM (#10867) 2021-05-15 20:09:52 +08:00
fisker Cheung 383f622942 Style: Remove useless flags (#10861) 2021-05-15 14:37:17 +03:00
fisker Cheung 572e0ed90d Fix .eslintignore (#10875) 2021-05-13 17:28:39 +08:00
fisker Cheung 2eb2df6ed2 Update babel config (#10855) 2021-05-12 08:11:43 +08:00
fisker Cheung e161350309 Use fsPromises in CLI (#10852) 2021-05-12 01:05:54 +08:00
fisker Cheung 98abb990cc Use Object.fromEntries(), Array#flat() and Array#flatMap() (#10853) 2021-05-12 01:05:29 +08:00
fisker Cheung b7983971ce Drop Node.js 10 support for development "build" (#10842) 2021-05-11 08:52:38 +08:00
fisker Cheung 6e71422548 Use async APIs in CLI (#10841)
* Use async API in CLI

* Remove `synchronous-promise`
2021-05-11 01:50:50 +03:00
fisker Cheung 8c93ef5755 Remove .prettierrc parser override (#10845) 2021-05-10 19:42:47 +03:00
164a6e2351 Switch CLI to async (#10804)
* Switch CLI to async

* Rewrite test

* Fix tests

* Comment out failed test

* Comment out failed test

* Fix test

Co-authored-by: Connor Peet <connor@peet.io>

* Update patterns-dirs.js

* Fix `hasRunningCli` flag

* Fix grammar

* Update tests/integration/runPrettier.js

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>

Co-authored-by: Connor Peet <connor@peet.io>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-05-09 15:43:10 +03:00
fisker Cheung 8beca471dd Skip test on Node.js v15 (#10829) 2021-05-06 16:55:00 +03:00
fisker Cheung 877e64c046 Fix missing parentheses on async inside for..of (#10781) 2021-05-06 16:53:48 +03:00
fisker Cheung 067826bc7a Remove dead code (#10784) 2021-04-29 23:21:04 +08:00
fisker Cheung 28e67a25ac Add no-conflicting-comment-check-flags rule (#10775) 2021-04-27 11:25:31 +08:00
fisker Cheung 5c44f71737 Fix .prettierignore 2021-04-26 14:27:58 +08:00
fisker Cheung 2dfa06bf20 Add #102415 to .git-blame-ignore-revs 2021-04-25 20:12:33 +08:00
fisker Cheung ece93681f1 Restructure test files (#10415) 2021-04-25 20:01:56 +08:00
fisker CheungandSosuke Suzuki 916693c066 Update release script (#9418)
* Update release dependencies

* Remove `version` field

* Run install before any require

* Update scripts/release/utils.js

Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>

* Fix update schedule

* Update deps

* Fix

Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2021-04-21 17:15:12 +03:00
fisker Cheung 7ed1f018f8 Run test on Node.js v16 (#10741) 2021-04-21 16:14:01 +03:00
fisker Cheung 62b9c63f21 Minor refactoring of printComments (#10671) 2021-04-12 18:02:06 +08:00
fisker Cheung 07ae0134e5 JS: Fix duplicated prettier-ignore comments (#10666) 2021-04-12 03:35:13 +03:00
fisker Cheung 24d39a9068 Throw errors for invalid left-hand side assignment (#10416)
* Throw errors for invalid left-hand side assignment

* Fix tests

* FIx tests

* Add tests from https://github.com/babel/babel/pull/12933
2021-03-30 01:40:42 +03:00
fisker Cheung a49df3fc0b Increase dependabot open-pull-requests-limit (#10626) 2021-03-29 10:45:03 +08:00
fisker Cheung cc5981227a Add parens for yield in pipeline (#10446) 2021-03-26 10:19:00 +02:00
fisker Cheung a17d3fb21f Disallow import without argument and new import(…) (#10584) 2021-03-23 09:48:29 +08:00
fisker CheungandGeorgii Dolzhykov 7cc52da144 Simplified printGenerically (#10557)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-03-22 16:57:03 +02:00
fisker Cheung 199be1ac2f Simplify JS parser handling Hashbang (#10407) 2021-03-22 10:22:18 +08:00
fisker Cheung 230428f34b Add consistent-negative-index-access rule (#10569) 2021-03-20 14:06:12 +02:00
fisker Cheung 863eb079dc Forbid AstPath.call without name (#10541) 2021-03-15 17:20:27 +08:00
fisker Cheung 521b63bb27 Update no-identifier-n rule (#10540) 2021-03-15 11:04:12 +08:00
fisker Cheung 21c81e007d Test json superset (#10493) 2021-03-14 15:04:35 +02:00
fisker Cheung 3995c2a1a1 Whitelist recovered babel parse errors (#10495) 2021-03-13 22:07:22 +02:00
fisker Cheung 1ce6b8dc3d Fix syntax error on JSON range formatting (#10497) 2021-03-12 00:24:45 +02:00
fisker Cheung ff32d6b823 Playground: Order options (#10501)
* Playground: Order options

* Remove `rangeStart/End` from `ENABLED_OPTIONS`
2021-03-10 22:20:47 +02:00
fisker Cheung d3a0699148 Rename n to node (#10504) 2021-03-10 22:14:08 +02:00
fisker Cheung 02f803ac8d JSON: Only allow +/- number in UnaryExpression (#10434) 2021-03-09 10:58:31 +08:00
fisker Cheung 94775e88ef Build: Fix rollup warning (#10487) 2021-03-08 17:08:47 +02:00
fisker Cheung c7f9b9d1e8 Fix a wrong condition (#10478)
* Add rule

* Fix
2021-03-07 12:19:38 +02:00
fisker Cheung 2f6580bebc Simplify babel parser (#10437) 2021-03-05 19:27:08 +08:00
fisker CheungandGeorgii Dolzhykov 8a1ee9ad1b Support JSON6 (#10456)
* Add test

* Support JSON6

* Test

* Print `null` instead of holes

* More tests

* Update changelog

* Style

* Minor refactor

* Fix AST clean

* Fix `Identifier` clean

* Fix AST compare

* Style

* Reword changelog

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-03-04 19:37:42 +02:00
fisker Cheung 2f384ab24a JSON: More JSON5 data tests (#10453) 2021-03-02 13:43:48 +08:00
fisker Cheung 2edfec5eda JSON: Better error message (#10452) 2021-03-02 13:42:49 +08:00
fisker Cheung ed9e9ab649 Improve json error code frame (#10433) 2021-03-01 10:04:09 +08:00
fisker Cheung 7aff95cac1 Refactor semicolon check (#10355) 2021-03-01 10:03:28 +08:00
fisker Cheung 9324380c53 JSON: Disallow sparse array (#10443) 2021-03-01 09:53:32 +08:00
fisker Cheung ed64ce0f0e JSON: Allow Infinity and NaN (#10451) 2021-03-01 09:14:20 +08:00
fisker CheungandGeorgii Dolzhykov 383e17665e Refactor decorators print (#10296)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-03-01 02:58:43 +08:00
fisker Cheung c163d346d4 Extract json parser (#10405) 2021-02-28 11:38:21 +08:00
fisker Cheung 95c8086c2c Add flat-ast-path-call rule (#10354) 2021-02-26 09:26:50 +08:00
fisker Cheung 64a3906571 Enable unicorn/prefer-optional-catch-binding (#9464) 2021-02-25 18:28:55 +08:00
fisker Cheung 5682d2f440 Add printDirective (#10396) 2021-02-24 02:29:50 +08:00
fisker Cheung d544585d87 Make JSON parser stricter (#10346) 2021-02-23 13:33:10 +02:00
fisker Cheung f392c7c526 Simplify JS locEnd (#10389) 2021-02-23 12:43:38 +08:00
fisker Cheung 3fc92980f2 Refactor: Switch second parameter of printComments from function to Doc (#10376) 2021-02-23 12:42:13 +08:00
fisker Cheung a9088a0b74 Refactor(JS): Extract printLiteral (#10392) 2021-02-23 12:41:54 +08:00
fisker Cheung a07de7220c Consistent document import style (#10378) 2021-02-21 22:41:36 +02:00
fisker Cheung 88919167e1 Switch ci-info to npm version (#10356) 2021-02-21 22:13:32 +08:00
fisker Cheung 9c6de24405 Style: Disallow == (#10338) 2021-02-21 02:44:16 +02:00
fisker Cheung 04988c3aa0 Remove OptionalMemberExpression clean (#10347) 2021-02-20 09:07:27 +08:00
fisker Cheung c3d08c943e Style: Disallow else if in no-else-return (#10310) 2021-02-15 05:29:58 +02:00
fisker Cheung dca2c55ef6 Move embeddedInHtml to language-html/ (#9739)
* Move `embeddedInHtml` to `language-html/`

* Fix

* Rename to `__embeddedInHtml`
2021-02-13 13:34:31 +08:00
fisker Cheung ea63f245d0 Refactor conditionalExpressionChainContainsJsx (#10282) 2021-02-13 05:24:06 +08:00
fisker Cheung bc30016500 Remove isLineNext (#10304)
* Replace `isLineNext` with `isLineOrHardlineOrSoftline`

* Remove `isLineNext`

* Use `isEmptyStringOrAnyLine`

* Update condition
2021-02-11 23:06:47 +02:00
fisker Cheung 37b5b58ea1 Update parse-json 2021-02-11 16:20:41 +08:00
fisker Cheung cb27432b77 Fix changelog 2021-02-11 16:15:37 +08:00
fisker Cheung 659d9a1f1f Add a link to prettier-doc/no-concat ESLint rule (#10188) 2021-02-11 04:39:19 +02:00
fisker Cheung 36d3a0c784 Remove isEmpty (#10295) 2021-02-11 04:36:10 +02:00
fisker Cheung 2f4140ff18 Test: Skip install for standalone test (#10273) 2021-02-11 00:50:59 +08:00
fisker Cheung a1ba8fb812 Build: Add rollup-plugin-polyfill-node (#10249) 2021-02-08 09:50:43 +08:00
fisker Cheung ba3930d63e Replace concat in src/document/ with array (#10185) 2021-02-08 09:48:25 +08:00
fisker Cheung bf3cabd2bb Refactor: Use fromPairs instead of Array#reduce (#10262)
* Refactor: Use `fromPairs` instead of `Array#reduce`

* Restore unrelated change
2021-02-08 00:55:46 +02:00
fisker Cheung 22a10c5589 CLI: Handle logLevel parse error (#10207) 2021-02-07 09:01:28 +08:00
fisker Cheung 75c6dcd6a1 Test: extract some code to createSnapshot (#10255) 2021-02-07 08:59:30 +08:00
fisker Cheung 2a157bf7cb CLI: Print error message when --find-config-path can't find config file (#10208) 2021-02-07 08:52:32 +08:00
fisker Cheung 93409294e6 CLI: clear printed long filenames (#10217) 2021-02-07 08:51:19 +08:00
fisker Cheung 819cc01bfb Safer check before passing to fill (#10235) 2021-02-05 09:24:44 +08:00
fisker Cheung 6ecb30a5ae Refactor ChainElement related parts (#10245)
* Rename `isCallOrOptionalCallExpression` -> `isCallExpression`

* Replace use of `OptionalCallExpression`

* Fix

* Add `isMemberExpression`

* Check truly in `isCallExpression` and `isMemberExpression`

* Replace `OptionalMemberExpression`

* Remove unneeded check

* Fix type check
2021-02-05 01:04:54 +02:00