fisker Cheung
bee1399282
Improve tests for JSX quotes ( #19856 )
2026-08-15 17:30:50 +08:00
fisker Cheung
acb755b040
Add test for namespaced attribute ( #19855 )
2026-08-15 17:16:14 +08:00
fisker Cheung
6ec8503550
Improve JSX tests ( #19854 )
2026-08-15 16:57:54 +08:00
renovate[bot] and fisker
9dba9a3ca6
Update dependency meriyah to v7.3.1 ( #19798 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2026-08-07 07:43:22 +08:00
fisker Cheung
3a106fdff1
Fix embedded template literal idempotency ( #19725 )
2026-07-26 16:35:21 +08:00
fisker Cheung and autofix-ci[bot]
1ccdfcc15c
Add yuku parser ( #19628 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-15 01:53:00 +08:00
fisker Cheung
c546c8eddb
Run JSX tests from jsx-test-suite ( #19484 )
2026-06-29 15:52:24 +08:00
Sam Zhou and fisker
9c0e48cd25
Switch to oxidized flow parser ( #19398 )
...
Co-authored-by: fisker <lionkay@gmail.com >
2026-06-23 08:44:23 +08:00
fisker Cheung
e76e746131
Remove extra parens around jsx ( #19329 )
2026-06-10 06:10:50 +08:00
Igor
0a825b05dc
Preserve blank lines between JSX attributes ( #19161 )
2026-06-03 15:40:52 +08:00
fisker Cheung
69ed5dad2a
Fix code frames for glimmer and hermes parser ( #19163 )
2026-05-19 02:58:09 +08:00
fisker Cheung
5017d66ea7
Test: Update printWidth indicator ( #10293 )
2026-01-31 03:45:41 +08:00
fisker Cheung
7ca5d83e45
Move parser name to end in test title ( #18745 )
2026-01-25 11:53:51 +08:00
fisker Cheung and autofix-ci[bot]
ed5bb0bf62
Refactor tests ( #18743 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-25 10:30:19 +08:00
fisker Cheung
a7b8a4f77d
Avoid linebreaks in embedded template interpolations ( #18380 )
2025-12-06 14:45:25 +08:00
Seiya and fisker Cheung
9266e3e85b
Add resolved test cases ( #18358 )
...
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2025-11-29 15:11:52 +08:00
fisker Cheung
40d4bb1815
Remove redundant parentheses around JSX element ( #18243 )
2025-11-16 20:37:39 +08:00
fisker Cheung
d548a87684
Fix a miss used willPrintOwnComments ( #18166 )
2025-10-31 09:02:39 +08:00
renovate[bot] and fisker
a6bbdad8ca
chore(deps): update dependency jest to v30.1.1 ( #17819 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2025-08-30 15:36:22 +08: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
9e814108ca
Add oxc-ts parser ( #17483 )
2025-05-27 13:32:23 +08:00
fisker Cheung and autofix-ci[bot]
c26d23c955
Add oxc parser ( #17472 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-05-27 09:35:31 +08:00
fisker Cheung
b289ecbb19
Remove support for tupleAndRecord ( #17363 )
2025-04-17 04:53: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
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
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
fisker Cheung
b19139acb7
Support TLA for typescript parser ( #16729 )
2024-10-18 21:11:55 +08:00
Mark Amery and fisker Cheung
d28d40ac0c
Reduce how much text needs to be diffed when computing cursor positions ( #15709 )
...
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2024-09-27 21:35:32 +08:00
fisker Cheung
d2c415deae
Update meriyah to v6 ( #16667 )
2024-09-18 19:48:57 +08:00
Klaus Hott Vidal and fisker
16449ce914
renaming jsfmt.spec.js to format.test.js ( #16244 )
...
Co-authored-by: fisker <lionkay@gmail.com >
2024-05-06 10:25:10 +08:00
fisker Cheung
6eda34db44
Test: Rename run_spec to runFormatTest ( #15943 )
2024-01-19 17:20:24 +08:00
Eelco Lempsink
0bfcb2d5a5
Fix css embed in JSX when using (only) a spread attribute ( #15896 )
2024-01-14 11:42:25 +09:00
Kevin Gibbons
cb6fea81fb
Avoid introducing linebreaks in template interpolations ( #15209 )
2023-12-17 18:10:20 +08:00
fisker Cheung
b15d287f81
Update Jest to v30 ( #15580 )
2023-11-27 23:25:58 +08:00
Alex Rattray and Alex Rattray
f25a592f57
Add indentation back to nested ternaries ( #9559 )
...
* Add indentation back to nested ternaries (except JSX)
* Add a real-world test case
* Add changelog entry
---------
Co-authored-by: Alex Rattray <rattrayalex@stripe.com >
2023-09-24 15:13:00 -04:00
Sosuke Suzuki
fa48415617
Bump Prettier dependency to 3.0.0
2023-07-05 21:50:05 +09:00
Seiya and fisker Cheung
7f64e920de
Make curried arrow function and normal arrow function consistent ( #14633 )
...
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2023-04-27 11:01:35 +08:00
fisker Cheung
bec997e85c
Fix cursor tracking inside JSXText ( #14163 )
2023-04-10 10:44:31 +08:00
fisker Cheung
5cdc3ab2dd
Support print ChainExpression ( #13735 )
2023-02-13 10:11:40 +08:00
fisker Cheung and Georgii Dolzhykov
add84358d8
Remove flow plugin from babel parser ( #14314 )
...
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2023-02-10 17:27:17 +08:00
fisker Cheung
97c8e3c18f
Run JSX tests on acorn, espree and meriyah ( #10494 )
2023-02-01 14:20:36 +08:00
fisker Cheung
468c514ba2
Fix inconsistent between array/tuple and object/record ( #14065 )
2023-01-04 15:07:07 +08:00
fisker Cheung
f65768d00a
Merge branch 'main' into next
...
# Conflicts:
# package.json
# scripts/release/yarn.lock
# src/language-css/parser-postcss.js
# src/language-css/printer-postcss.js
# src/language-js/print/jsx.js
# src/language-json/printer-estree-json.js
# website/yarn.lock
# yarn.lock
2023-01-04 14:25:53 +08:00
fisker Cheung
e301b1f9ce
Fix comments inside JSX attributes ( #14082 )
...
Fixes https://github.com/prettier/prettier/issues/11242
2022-12-30 10:36:58 +08:00
Sosuke Suzuki
a8869bef55
Merge branch 'main' into next
2022-12-08 22:00:17 +09:00
Alex Rattray
28d097bbf5
Add test cases for questioning ternaries ( #13952 )
...
## Description
Extracts test cases that I added for https://github.com/prettier/prettier/pull/13183 to make it easier to visualize the changes that PR makes, as @vjeux [requested](https://github.com/prettier/prettier/pull/13183#discussion_r990820889 ).
## Checklist
<!-- Please ensure you’ve done all of these things (if applicable). -->
<!-- You can replace the `[ ]` with `[x]` to mark each task as done. -->
- [x] I’ve added tests to confirm my change works.
- [x] I’ve read the [contributing guidelines](https://github.com/prettier/prettier/blob/main/CONTRIBUTING.md ).
<!-- Please DO NOT remove the playground link -->
**✨ [Try the playground for this PR](https://prettier.io/playground-redirect )✨ **
2022-12-07 15:46:40 -05:00
fisker Cheung
83400d19b4
Change default value of trailingComma to "all" ( #11479 )
2022-08-01 11:05:17 +08:00
fisker Cheung
6016404f59
Merge branch 'main' into next
...
# Conflicts:
# .eslintrc.cjs
# .github/workflows/prod-test.yml
# .github/workflows/validate-vendors.yml
# scripts/build/bundler.mjs
# scripts/vendors/bundle-vendors.mjs
# scripts/vendors/utils.mjs
# scripts/vendors/vendor-meta.json
# scripts/vendors/vendors.mjs
# src/cli/logger.js
# src/cli/options/get-options-for-file.js
# src/cli/options/parse-cli-arguments.js
# src/common/util.js
# src/language-html/utils/html-tag-names.js
# tests/integration/__tests__/bundle.js
# tests/integration/__tests__/loglevel.js
# tests/integration/run-prettier.js
# vendors/string-width.js
2022-04-06 15:41:50 +08:00
dependabot[bot] and fisker Cheung
b1e96cde95
Build(deps): Bump meriyah from 4.2.0 to 4.2.1 ( #12567 )
...
* Build(deps): Bump meriyah from 4.2.0 to 4.2.1
Bumps [meriyah](https://github.com/meriyah/meriyah ) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/meriyah/meriyah/releases )
- [Changelog](https://github.com/meriyah/meriyah/blob/master/CHANGELOG.md )
- [Commits](https://github.com/meriyah/meriyah/compare/v4.2.0...v4.2.1 )
---
updated-dependencies:
- dependency-name: meriyah
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* Add test for https://github.com/meriyah/meriyah/commit/6de707a0efb3053767deaa36b1ed6979b0d3f873
* Test https://github.com/meriyah/meriyah/commit/37c63613771e5bc6e23b7da2d92e992c60dafc5a
* Test https://github.com/meriyah/meriyah/commit/d757c6b20ae4f6f4e55a77179726db36cf2bd50b
* Add changelog
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-04-02 20:13:21 +09:00
fisker Cheung
f0b63f3dff
Merge branch 'main' into next
...
# Conflicts:
# CONTRIBUTING.md
# cspell.json
# docs/options.md
# package.json
# scripts/build/bundler.mjs
# src/language-css/loc.js
# src/language-css/parser-postcss.js
# src/language-css/utils/index.js
# tests/format/js/arrows-bind/jsfmt.spec.js
# tests/format/js/async-do-expressions/jsfmt.spec.js
# tests/format/js/bind-expressions/jsfmt.spec.js
# tests/format/js/classes/top-level-super/jsfmt.spec.js
# tests/format/js/comments-pipeline-own-line/jsfmt.spec.js
# tests/format/js/decorator-comments/jsfmt.spec.js
# tests/format/js/decorators-export/jsfmt.spec.js
# tests/format/js/decorators/jsfmt.spec.js
# tests/format/js/do/jsfmt.spec.js
# tests/format/js/export-default/escaped/jsfmt.spec.js
# tests/format/js/export-extension/jsfmt.spec.js
# tests/format/js/export-star/jsfmt.spec.js
# tests/format/js/exports/jsfmt.spec.js
# tests/format/js/invalid-code/jsfmt.spec.js
# tests/format/js/logical-assignment/jsfmt.spec.js
# tests/format/js/multiparser-invalid/jsfmt.spec.js
# tests/format/js/no-semi-babylon-extensions/jsfmt.spec.js
# tests/format/js/object-property-comment/jsfmt.spec.js
# tests/format/js/partial-application/jsfmt.spec.js
# tests/format/js/pipeline-operator/jsfmt.spec.js
# tests/format/js/private-in/jsfmt.spec.js
# tests/format/js/record/jsfmt.spec.js
# tests/format/js/reserved-word/jsfmt.spec.js
# tests/format/js/strings/jsfmt.spec.js
# tests/format/js/throw_expressions/jsfmt.spec.js
# tests/format/js/trailing-whitespace/jsfmt.spec.js
# tests/format/js/v8_intrinsic/jsfmt.spec.js
# tests/format/misc/errors/js/literal/jsfmt.spec.js
# tests/format/misc/errors/js/object/jsfmt.spec.js
# tests/format/misc/errors/js/variable-declarator/jsfmt.spec.js
# tests/integration/__tests__/bundle.js
# tsconfig.json
# yarn.lock
2022-02-09 09:22:32 +08:00