fisker Cheung
6ba133e80c
Improve super class (or single heritage) breaking ( #18325 )
2025-11-26 19:43:08 +08:00
fisker Cheung
1d0c666f0d
Remove empty line in for statement without "update" ( #18300 )
2025-11-23 16:23:23 +08:00
fisker Cheung
35718f2993
Fix inconsistent call print between CallExpression and NewExpression ( #18206 )
2025-11-17 22:43:24 +08:00
fisker Cheung
4c4792fe64
Fix format of logical expression as new expression callee ( #18245 )
2025-11-16 21:50:52 +08:00
fisker Cheung
40d4bb1815
Remove redundant parentheses around JSX element ( #18243 )
2025-11-16 20:37:39 +08:00
fisker Cheung
6c92f7ea54
Fix inconsistent logical expression print between CallExpression and NewExpression ( #18205 )
2025-11-04 17:15:27 +08:00
fisker Cheung and autofix-ci[bot]
fb66c7dfcf
Fix inconsistent break for array literals ( #18172 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-04 05:08:53 +08:00
3bc46da961
Add missing parentheses in bitwise operators ( #18163 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2025-10-31 20:45:37 +08:00
fisker Cheung
4d2205926d
Fix inconsistent printing of class method comment ( #18147 )
2025-10-30 22:00:28 +08:00
Konv Suu and fisker
c93e014c28
Remove indention in logical expression in Boolean() type coercion ( #18087 )
...
Co-authored-by: fisker <lionkay@gmail.com >
2025-10-24 21:42:46 +08:00
fisker Cheung
7a20fe5c5f
Improve comment printing around empty statement ( #18108 )
2025-10-20 17:43:24 +08:00
fisker Cheung
561d62a212
Fix comment attach in ForXStatement ( #18099 )
2025-10-19 18:49:23 +08:00
fisker Cheung
66eaaaa69a
Use printObject to print import attributes ( #17329 )
2025-10-19 18:37:06 +08:00
fisker Cheung
3a3db39b32
Improve comment handling between if statement condition and the "body" ( #17998 )
2025-10-11 16:13:44 +08:00
fisker Cheung
05b1a783d1
Use printCallExpression to print TSExternalModuleReference ( #18035 )
2025-10-11 01:08:24 +08:00
fisker Cheung
fc7da89a54
Improve require() call with comments ( #18037 )
2025-10-10 23:43:08 +08:00
a5296b3d7b
Prevent break long module name in more places ( #17908 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2025-09-23 04:14:17 +08:00
fisker Cheung
1520a58879
Fix format of comments around ChainExpression ( #17723 )
2025-09-12 05:01:51 +08:00
Konv Suu and fisker
4df75d090d
Avoid break ImportExpression with long module name ( #17882 )
...
Co-authored-by: fisker <lionkay@gmail.com >
2025-09-11 16:18:03 +08:00
Ben Scott
7e3288f4cf
Add extra playwright test functions ( #17876 )
2025-09-10 11:22:31 +08:00
fisker Cheung and autofix-ci[bot]
95ef24d1f0
Support "Discard Bindings" proposal ( #17708 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-08-04 15:41:42 +08:00
fisker
f67b32ba66
Clean changelog_unreleased
2025-06-23 10:10:54 +08:00
a24878a1e2
3.6 blog post ( #17636 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2025-06-23 10:04:03 +08:00
SUZUKI Sosuke
0ef2086cc9
Fix English grammer in changelog_unreleased ( #17635 )
2025-06-22 14:58:35 +09:00
Seiya and autofix-ci[bot]
84ee9016ba
Get JSX in arrow in method call to be consistent ( #17616 )
...
* add failing test
* fix #17489
* add more tests
* refactor ...but perhaps get ugly? I'm not sure
* Apply automated changes
* utilize path.match
* add changelog
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-22 00:51:13 +09:00
fisker Cheung and autofix-ci[bot]
f41214b2f1
Add changelog for hermes and oxc plugin ( #17629 )
...
* Add changelog for `hermes` and `oxc` plugin
* Apply automated changes
* Move to `flow/`
* Spellcheck
* Reword
* Reword
* Apply automated changes
* Fix
* Reword
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-06-22 00:49:06 +09:00
fisker Cheung
7a91dc4a59
Revert "Support type cast comments for espree parser ( #17587 )" ( #17614 )
2025-06-19 15:49:38 +08:00
fisker Cheung
17cdff607a
Support type cast comments for meriyah parser ( #17600 )
2025-06-13 17:27:07 +08:00
fisker Cheung
3b0f33539f
Support type cast comments for espree parser ( #17587 )
2025-06-13 16:56:42 +08:00
fisker Cheung
242b524eb1
Fix optional chaining as computed key ( #17486 )
2025-05-28 03:26:56 +08:00
fisker Cheung
441cb1e132
Fix comments in tagged template literal ( #17510 )
2025-05-27 09:08:27 +08:00
2e78cb5834
Support type cast comments for acorn parser ( #17491 )
...
Co-authored-by: fisker <lionkay@gmail.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-05-20 14:38:34 +08:00
fisker Cheung
2349a6ee6f
Fix inconsistent assignment format ( #17469 )
2025-05-15 11:27:32 +08:00
fisker Cheung and autofix-ci[bot]
b5378edeeb
Fix inconsistent member chain format ( #17470 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-05-15 11:27:22 +08:00
SUZUKI Sosuke and autofix-ci[bot]
d3332e06d3
Preserve spaces between CSS words and embedded expression ( #17398 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-04-25 10:11:50 +08:00
fisker Cheung
b289ecbb19
Remove support for tupleAndRecord ( #17363 )
2025-04-17 04:53:05 +08:00
fisker Cheung
6a3c132be4
Add parentheses to numbers in optional member expression ( #17190 )
2025-03-05 02:47:46 +08:00
fisker Cheung
73d26d777d
Add parentheses to AssignmentExpression in class property keys ( #17145 )
2025-02-26 14:07:05 +08:00
ff3bb50881
Add parentheses to SequenceExpression in ReturnStatement and ExpressionStatement ( #17085 )
...
Co-authored-by: tongyu <tongyu10287@xwtec.cn >
Co-authored-by: fisker <lionkay@gmail.com >
2025-02-26 11:44:37 +09:00
Sosuke Suzuki
3fe8152c5c
Clean changelog_unreleased
2025-02-09 20:45:20 +09:00
SUZUKI Sosuke
5ed5dc0b8a
Fix a link in changelog ( #17088 )
2025-02-09 19:58:53 +09:00
Seiya and fisker Cheung
97d8115d18
Resolve rule of fill violation in JSX and add assertion. ( #16700 )
...
* add stricter assertion into fill()
* resolve rule of fill issue. some comments and naming can be problematic.
* cleanup
* update comments
* rename printWhitespace -> printStringOrLine
* refine isValidSeparator() a bit
* remove FIXME comment for fixed issue
* fix idempotency problem in MDX
* add changelog
* rename assertDocFill() -> assertDocFillParts()
* add test for assertDocFillParts()
* replace cleanDoc(doc) === "" by isEmptyDoc(doc)
* Update src/document/utils/assert-doc.js
Co-authored-by: fisker Cheung <lionkay@gmail.com >
---------
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2025-01-21 13:09:32 +09:00
SUZUKI Sosuke
4caa6302c0
Update changelog_unreleased for 3.5 ( #17019 )
2025-01-16 13:45:32 +09:00
Paul Draper and Sosuke 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
fisker
6c7460a5d7
Clean changelog_unreleased
2024-12-04 15:06:20 +08:00
Seiya
e13614ffd8
Correct fit() for fill() ( #16899 )
...
* add test for #16897
this test fails at this commit.
snapshots are taken at e3b8a16c7f
* Fix #16897
* add changelog
* omit redundant test case
2024-12-01 19:00:35 +09:00
Sosuke Suzuki
f53791a2c8
Clean changelog_unreleased
2024-11-26 13:53:25 +09:00
fisker Cheung
6b582a0619
Improve string print perfomance ( #16763 )
2024-11-04 15:24:02 +08:00
fisker Cheung
ab00c1c919
Remove support for "importReflection" ( #16705 )
2024-10-08 22:03:37 +08:00