Commit Graph
152 Commits
Author SHA1 Message Date
fisker Cheung cb901d0f0d Refactor ignore check (#14324) 2023-02-10 17:51:13 +08:00
fisker Cheung e9ae01a6da Update prettier.util.{isPreviousLineEmpty,isNextLineEmpty} (#14320) 2023-02-10 14:23:42 +08:00
fisker Cheung caf6f6c64c Add getNextNonSpaceNonCommentCharacter to prettier.util (#14317) 2023-02-09 17:21:36 +08:00
fisker Cheung a26e8ace46 Resolves config by default in getFileInfo() (#14108) 2023-01-30 09:59:19 +08:00
Sosuke Suzuki 2ed898dfb7 Import fs/promises directly in test files (#14235)
Import `fs/promises` directly
2023-01-26 12:15:53 +09:00
fisker Cheung a0c20d810c Refactors createParsers (#14154) 2023-01-18 10:58:25 +08:00
fisker Cheung a3dfbf70f7 Build: more powerful esbuild evaluate plugin (#13724) 2022-10-30 11:14:51 +08:00
fisker Cheung 106c009245 Add __debug apis to cjs version (#13731) 2022-10-26 10:55:37 +08:00
fisker Cheung b7223354a1 Make resolveParser work like v2 (#13732) 2022-10-26 10:55:22 +08:00
Mark Avery 284cdf4c3d Style: updated failure message to be more formal (#11369) 2022-10-25 12:26:41 +03:00
Sosuke Suzuki bb04cf072e Merge branch 'main' into next 2022-10-25 01:42:41 +09:00
MillyandSosuke Suzuki ca246aface Fix --cache set only if with --write or no-different (#13016)
* Fixed typo

* Return early if file does not exist

* Added tests for cache

* Added `mockWriteFileErrors` option to run helper

* Added tests for write error

* Remove files with differences from cache

* Add `getCliArguments` utility function

Refactor

* Fix lint

* Revert "Fix lint"

This reverts commit 18be64b7c42cd669496d59ff64bd534b8e03c3df.

* Revert "Add `getCliArguments` utility function"

This reverts commit d653fe10a92390102ae97cb43b2efcbb5c3c9140.

* Refactor with `cliArguments` variable

Co-authored-by: Sosuke Suzuki <sosuke.suzuki@dr-ubie.com>
2022-10-24 23:55:36 +09:00
Sosuke Suzuki d09bc86c9f Enable prettier-internal-rules/prefer-fs-promises-submodule for all files (#13722)
* Enable `prefer-fs-promises-submodule` for all files

* Fix problems
2022-10-23 22:23:44 +09:00
Sosuke Suzuki f8773fcd6a Remove rimraf package (#13721)
* Remove `rimraf` from `draft-blog-post`

* Remove `rimraf` from `sync-flow-tests`

* Remove `rimraf` from cache tests

* Uninstall `rimraf`
2022-10-23 22:23:30 +09:00
fisker Cheung 2d23d33a40 Remove since from options and languages (#13699) 2022-10-23 11:18:36 +08:00
fisker Cheung 9413e05a8b Run tests on Node.js 19 (#13682) 2022-10-20 09:12:39 +08: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
fisker Cheung 72c811bfa7 Enable some ESLint rules (#13548) 2022-10-04 00:14:19 +08:00
fisker Cheung f3d1790533 Enable logical-assignment-operators rule (#13529) 2022-09-29 10:40:13 +08:00
fisker Cheung 5465517f4b Bundle third-party.js in ESM (#13509) 2022-09-23 19:24:54 +08:00
fisker Cheung 824690fcc7 Allow parsers initialize asynchronously (#13449) 2022-09-22 15:13:37 +08:00
fisker Cheung 1a602b590e Fix schema 2022-08-17 17:10:34 +08:00
fisker Cheung 4b4f6cfa4e Update support info 2022-08-17 17:03:46 +08:00
fisker Cheung 86424ccc22 Remove the parsers argument for plugin.parsers.parse (#13268) 2022-08-16 09:52:27 +08:00
fisker CheungandGeorgii Dolzhykov 0b9cb96f58 Remove support for custom parser api (#13250)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2022-08-08 01:09:10 +08:00
fisker Cheung 3e9e9ddec7 Imporve error message for InvalidDocError (#13248) 2022-08-07 14:13:03 +03:00
fisker Cheung 7abc9bcb07 Remove stripTrailingHardline option in textToDoc (#13220) 2022-08-07 18:15:24 +08:00
fisker Cheung dd034ec127 Fix test on local (#13234) 2022-08-07 00:15:54 +03:00
Georgii Dolzhykovandfisker Cheung 4d5b645e0e Support async parser for embedded languages (#13211)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-08-07 00:45:06 +08:00
fisker Cheung 31cdcd0487 Sort plugin default values when create usage (#13230) 2022-08-06 22:03:37 +08:00
fisker Cheung 33e621133c Remove prettier.doc.builders.concat (#13203) 2022-08-06 11:03:47 +08:00
fisker Cheung 5aadab6f28 Support ESM plugins (#13201) 2022-08-06 10:42:27 +08:00
fisker Cheung d4a49e2441 Minor refactor to cosmiconfig search (#13205) 2022-08-03 14:20:02 +08:00
fisker Cheung 55779bb96c Refactor CLI tests (#13208) 2022-08-03 14:19:00 +08:00
fisker Cheung cdb1494170 Revert "Switch print/embed to async (#13104)" (#13210) 2022-08-02 18:11:34 +08:00
Sosuke Suzuki b12396d69a Change --loglevel to --log-level (#13204)
* Change `--loglevel` to `--log-level`

* Update tests

* Update docs

* Add changelog
2022-08-02 09:39:41 +09: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
fisker Cheung 83400d19b4 Change default value of trailingComma to "all" (#11479) 2022-08-01 11:05:17 +08:00
fisker Cheung 44d246a2a2 Support config file in ESM (#13130) 2022-08-01 10:51:31 +08:00
fisker Cheung bb203e3fa5 Simplify plugin loading (#13138) 2022-08-01 10:48:37 +08:00
Sosuke SuzukiandHolger Jeromin 955553bb39 Add --cache-location option (#13019)
* Implement searching cache file from `--cache-location` option

* Add tests

* Add docs

* Fix

* Fix doc

* Add changelog

* Update snapshots

* Update docs

* Update docs/cli.md

Co-authored-by: Holger Jeromin <mailgithub@katur.de>

* Fix changelog

* Remove directory support

* Update docs

* Update tests

* Update docs

* Add validation for dir

* Fix comment

* Update option description

* Validate JSON

* Use `path.resolve`

Co-authored-by: Holger Jeromin <mailgithub@katur.de>
2022-07-31 22:58:05 +09:00
fisker Cheung 03416a153a Throw errors for invalid doc (#13149) 2022-07-23 20:10:37 +08:00
fisker Cheung 73b8c86cc4 Merge branch 'main' into next
# Conflicts:
#	scripts/tools/bundle-test/yarn.lock
2022-07-23 18:19:22 +08:00
fisker Cheung 8ee0c6354d Fix ifBreak check in fits (#12362) 2022-07-23 18:02:05 +08:00
fisker Cheung 6a1d1d093b Rewrite config resolution tests (#13146) 2022-07-21 15:21:59 +08:00
fisker Cheung 592f27ce0b Fix integration test (#12859) 2022-07-20 23:18:24 +08:00
fisker Cheung 8397527c05 Build(deps-dev): Bump tempy from 2.0.0 to 3.0.0 (#12735) 2022-07-20 09:50:25 +08:00
fisker Cheung 79b44ff7b0 Minor refactor (#13095) 2022-07-13 14:10:22 +08:00
fisker Cheung 29f6bc2c6d Migrate third-party.js to ES Module (#13092) 2022-07-12 10:20:11 +08:00
fisker Cheung 59552bafdf Fix tests 2022-07-11 17:33:18 +08:00