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
Jed Fox
f29a7565e9
Collapse JSXExpressionContainer → AwaitExpression → JSXElement ( #12109 )
2022-01-16 14:59:22 -05:00
Jed Fox
920283a1dd
Inline await expressions in JSX ( #12088 )
2022-01-15 16:00:39 -05:00
fisker Cheung and Sosuke Suzuki
6bd81c23b6
Migrate format test to ES Module ( #11902 )
...
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
2022-01-04 17:00:25 +08:00
Jere Kankaanranta
0e42acb49b
feat: added singleAttributePerLine option ( #5501 ) ( #6644 )
2021-12-02 11:46:11 +03:00
4992d97203
Deprecate jsxBracketSameLine option in favour of multi-language bracketSameLine option ( #11006 )
...
* deprecate jsxBracketSameLine in favour of multi-language angleBracketSameLine option
* update docs and snapshots
* update tests to to make them more reviewable
* Rewrite angular tests
* Rewrite html tests
* Rewrite vue tests
* Restore unnecessary changes in jsx
* Fix file location
* Test both `true` and `false`
* Revert changes in markdown
* Run tests on all js parsers
* Improve html test
* fix changelog comment
* move bracketSameLine to common options
* mark jsxBracketSameLine as deprecated
* Update changelog_unreleased/html/11006.md
Co-authored-by: fisker Cheung <lionkay@gmail.com >
* Update 11006.md
* fix tests by removing `jsxBracketSameLine` `default` property
* fix style
* Revert docs under website dir
* Add tests for deprecated options
* Fix lint problems
Co-authored-by: fisker Cheung <lionkay@gmail.com >
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-08-31 11:47:50 +09:00
fisker Cheung
ece93681f1
Restructure test files ( #10415 )
2021-04-25 20:01:56 +08:00