Commit Graph
622 Commits
Author SHA1 Message Date
fisker Cheung 80a3b919ea Update linguist-languages to v8 (#17569) 2025-06-07 17:35:33 +08:00
fisker Cheung 275fc2eb69 Improve isSupported() (#17490) 2025-05-20 13:19:15 +08:00
Will Nayesandfisker 21c6f43612 Ignore single files with @noformat / @noprettier (#17344)
Co-authored-by: fisker <lionkay@gmail.com>
2025-04-18 21:28:47 +08:00
JounQinandfisker Cheung c93393c0be Add isSupported function support for language (#17331)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: fisker <lionkay@gmail.com>
2025-04-14 09:15:43 +08:00
fisker Cheung b3d1f8cdc2 Add mjml parser (#17339) 2025-04-14 08:12:53 +08:00
fisker Cheungandautofix-ci[bot] db0afb4472 Docs: document how to use autofix.ci (#17215)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-10 12:27:27 +08:00
JounQinandSUZUKI Sosuke 6f482626be docs: add pretty-quick section back (#17214)
* docs: add pretty-quick section back

follow #15337

* 更新 precommit.md

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

---------

Co-authored-by: SUZUKI Sosuke <aosukeke@gmail.com>
2025-03-10 12:42:53 +09:00
Junseong Park 2821d097e6 Docs: update cli commands (#17172) 2025-02-26 11:28:26 +09:00
fisker Cheung e830ad36a7 Support URL in plugins options (#17166) 2025-02-25 08:45:25 +08:00
fisker Cheung 150e92fe45 Docs: Add example for module worker (#17126) 2025-02-16 15:31:57 +08:00
fisker Cheung 64e7dab1fd Fix links to Prettier/Babel/Jest website (#17079) 2025-02-15 12:18:09 +08:00
fisker Cheung 52aee0254b Remove Atom from website (#17067) 2025-02-08 17:25:42 +08:00
Nicholas C. Zakas 918aeb4ef1 Include note about Markdown ignore comments (#17060)
Include not about Markdown ignore comments
2025-02-02 23:54:30 +09:00
Will Slattum ef7aae3964 docs: fix content change from docusaurus migration (#17059) 2025-01-31 09:32:26 +08:00
Lehoczky Zoltánandfisker Cheung 6a612520bc Migrate from Docusaurus 1 to Docusaurus 3 (#17043)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2025-01-30 10:16:21 +08:00
Paul DraperandSosuke Suzuki bef1d61a7a Implement objectWrap config option (#16163)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2025-01-15 16:44:45 +09:00
eed53fc29a Break lines before binary operators (#7111)
* Add additional binary expression comment tests

Refs #3806

These cover a few edge cases I encountered while maintaining
`@btmills/prettier` over the last few years. I'm adding them up front to
demonstrate that the `experimentalOperatorPosition` changes in a later
commit have no effect on this formatting when the flag is not enabled.

* Define experimentalOperatorPosition flag

Refs #3806

This merely defines the flag. A future commit will use it in updated
logic.

* Add experimentalOperatorPosition default tests

Right now, this flag isn't implemented, so these tests duplicate the
existing behavior. I'm adding them now so that when I implement the
flag's logic in a future commit, the changed formatting will be obvious
in the diff and easier to review.

* Implement experimentalOperatorPosition flag

Fixes #3806 as requested in https://github.com/prettier/prettier/pull/7111#issuecomment-2252623779

The flag's tests were already added in a previous commit, so the test
changes you see in this commit are specifically due to the new flag's
implementation.

* Document experimentalOperatorPosition flag

* Change operator position option start|end

In response to https://github.com/prettier/prettier/pull/7111#discussion_r1729382119

* Add TS intersection line wrapping tests

This clones TypeScript's type union operator tests in `union-parens.ts`
and swaps the operators (& <-> |) to test the the type interesection
operator. It also runs intersection tests with the new
`experimentalOperatorPosition: "start"` flag. This does _not_ yet update
the implementation to consider the flag; to ease review, I'll make that
change in the next commit to isolate the impact of the change.

* Apply experimentalOperatorPosition: start to type intersections

The type union operator was already formatted at the beginning of lines
by default, so that logic didn't need to be updated.

* Update 7111.md

* Update tests after rebasing

I rebased from 1dfe28f85 to c7066780e to fix test failures related to
https://github.com/prettier/prettier/pull/16601. The rebase applied
cleanly, and this was the only change to tests. Since the PR has
already been approved, I'll keep this as a separate commit rather than
squashing into the prior commits.

---------

Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: SUZUKI Sosuke <aosukeke@gmail.com>
2025-01-04 01:30:51 +09:00
Norbert Elterandfisker 84de783ce6 Add support for TS config files (#16828)
* feat: prettier.config.ts

* revert

* feat: add flag

* fix: remove experimental warning

* Revert changes

* Add tests

* Update docs

* Only test on Node.js v22

* Add changelog

* Update docs

* Update examples

* Fix changelog

* Fix command

* Name `loadJs` back

* Fix

---------

Co-authored-by: fisker <lionkay@gmail.com>
2024-12-21 15:39:45 +09:00
seyeong cf00f641b5 docs: Update Husky setup commands for PNPM users (#16943)
- Replace `npx husky init` with `pnpm exec husky init`
- Update installation command to use pnpm
- Add PNPM-specific pre-commit hook setup command
2024-12-21 15:31:49 +09:00
Joel García Nuñoandfisker Cheung 6fe195b1b1 docs: fix angular link (#16822)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2024-11-25 23:40:45 +08:00
Salvatore Testa 18f0056a9d Fix Yarn installation instructions to use yarn (#16799)
The pre-commit hook currently specifies `npx` instead of `yarn` for the Yarn project.
2024-10-30 15:27:37 +09:00
Maria José Solano 2f409df61d fix(docs): complete sentence for astFormat (#16774) 2024-10-24 16:30:44 +09:00
Lehoczky Zoltán e7ca215c3c docs: add detailed guide for shared configs (#16495) 2024-10-18 14:57:01 +08:00
Marcus Pettersen Irgensandfisker Cheung 5bb04801a2 Ignore files in the Jujutsu directory (#16684)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2024-09-27 19:53:37 +08:00
Christian Oliff 90f036500c Docs: HTTPS link to Less site (#16568) 2024-08-26 08:26:16 +08:00
Klaus Hott Vidal 1e15157090 reorganizing getPreferredQuote documentation (#16575) 2024-08-16 07:26:55 +09:00
SUZUKI Sosuke 3cf3f5ac29 Make getPreferredQuote public (#16567) 2024-08-14 09:34:58 +09:00
Alex Piechowski 509a0cc10f Add oxford comma to Single Attribute Per Line doc (#16566) 2024-08-13 07:33:07 +09:00
Yuhei Yasuda 5c60b9ef4a Fix code example for prettier.resolveConfig (#16525) 2024-08-10 09:52:30 +08:00
Kenneth Sills 5923e69901 docs: document the special treatment of machine-generated files (#16541)
Closes #11553
2024-08-10 00:28:09 +01:00
Nasicus fe7b985d67 docs: use oneliner to create .prettierignore file (#16245) 2024-06-18 08:14:55 +09:00
Alex Ford ad223eda4a Remove mention of options.editorconfig which does not exist. (#16335) 2024-06-18 08:13:50 +09:00
Matteo Agnoletto 4bafc9bb6d Add link to reviewdog-action-prettier (#12648) 2024-06-11 17:17:13 +08:00
fisker Cheung 2fbe7059ac Use prettier version placeholder in docs/ (#16360) 2024-06-11 09:18:16 +08:00
fisker 92cbd33475 Release 3.3.1 2024-06-05 17:08:40 +08:00
Sosuke Suzuki c4ab460357 Release 3.3.0 2024-06-02 02:01:15 +09:00
Sunshio 6408ec01dd docs: Fix git-format-staged in precommit documentation (#16152) 2024-05-13 10:01:13 +08:00
Daniel Bayleyandfisker Cheung da772ff1f0 feat: add support for package.yaml config (#16157)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2024-05-10 18:36:44 +08:00
TOMIKAWA Sotaro 923eec3afe docs: getValue() replaced with node (#16224) 2024-04-30 22:07:40 +09:00
Bart Louwers 470d04e119 Remove pre-commit from precommit.md (#16229) 2024-04-29 00:52:42 +01:00
Sunshioandfisker Cheung 09316aa830 docs: Add documentation for Bun.sh (#16153)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2024-04-10 17:40:26 +08:00
Hamir Mahal 6215520007 docs: add @see to improve self-documentation (#16188) 2024-04-06 19:24:18 +09:00
Philipp Lühmann 6c0e24d6f3 docs: Fix broken link to Helix wiki (#16185) 2024-04-04 22:53:50 +08:00
Timon Jurschitsch 572452b89d Update configuration.md (Add spaces for readability) (#14770) 2024-02-18 23:38:18 +08:00
Matt d'Entremont 4aebc0ecc8 Add "--write" to the prettier failure output (#16062) 2024-02-14 09:16:13 +00:00
Sosuke Suzuki 7142cf354c Release 3.2.5 2024-02-04 14:35:44 +09:00
ohaddahanandfisker Cheung 08f19401e4 Update install script for husky v9 (#16000)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2024-02-03 20:44:32 +08:00
fisker Cheung 09024bac75 Add @prettier/sync to docs (#15977) 2024-01-28 16:31:36 +08:00
fisker 03822f5b34 Release 3.2.4 2024-01-17 18:04:57 +08:00
fisker 42ba4373f4 Release 3.2.3 2024-01-17 11:27:30 +08:00