Commit Graph
286 Commits
Author SHA1 Message Date
fisker Cheung b164d42ea6 Fix 2022-12-15 19:32:24 +08:00
fisker Cheung daeb90f1ca Merge branch 'main' into next
# Conflicts:
#	package.json
#	src/language-css/printer-postcss.js
#	src/language-handlebars/printer-glimmer.js
#	src/language-markdown/clean.js
#	src/language-markdown/printer-markdown.js
#	yarn.lock
2022-12-15 19:16:59 +08:00
b50dfd1974 fix: preserve empty lines between nested SCSS maps (#13931)
Co-authored-by: Jeremy Neander <jeremy.neander@glassdoor.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-12-15 14:54:47 +08:00
Derek Lewisandfisker Cheung 44db370ca6 Don't lowercase Markdown link definition labels (#13155)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-12-15 14:51:19 +08:00
James C. Davis 40d0f27055 [handlebars] allow custom "else if"-like with block params (#13930) 2022-12-15 14:50:51 +08:00
fisker Cheung fefc9e142d Improve TypeScript error location (#13983) 2022-12-12 17:26:11 +08:00
fisker Cheung f2701a3d6f TypeScript: Throw errors for invalid modifiers (#13929) 2022-12-12 16:38:45 +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
Sosuke Suzukiandfisker Cheung 1cf760a184 Support decorator auto accessors syntax (#13919)
* Install new ts-estree

* Print auto accessor properties

* Support edge cases

* Misc tests

* Add tests for auto accessor with type annotations

* Add changelog

* Update changelog_unreleased/typescript/13919.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>

* Update changelog_unreleased/typescript/13919.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>

* Print semicolon for accessor and add tests

* Add TODO comment

* Add  to properties list

* Address review

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-12-05 20:50:15 +09:00
Sosuke Suzuki 2d655b03ad Merge branch 'main' into next 2022-12-05 17:56:47 +09:00
Łukasz Rabiec aa34209820 test: format instantiation expr in logical expr (#13897) 2022-12-05 17:46:52 +09:00
renovate[bot]andfisker Cheung 0aceb64c6d Update dependency @babel/parser to v7.20.5 (#13939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-12-05 14:09:26 +08:00
fisker Cheung 3e49250841 Update flow-parser to v0.194.0 (#13928) 2022-12-05 10:11:01 +08:00
fisker Cheung 1f9206f219 Merge branch 'main' into next
# Conflicts:
#	src/language-js/print/statement.js
2022-12-01 18:00:40 +08:00
fisker Cheung e4240aeaf0 Add tests for keyword class property (#13927) 2022-12-01 17:03:37 +08:00
fisker Cheung 817460b93a Merge branch 'main' into next
# Conflicts:
#	netlify.toml
2022-12-01 15:22:35 +08:00
fisker Cheung f8f0c41b20 TypeScript: Throw errors for invalid modifiers (#13877)
Fixes https://github.com/prettier/prettier/issues/9760
2022-11-25 17:52:42 +08:00
fisker Cheung 655a161d0f Add tests for multiple comments (#13890)
Close https://github.com/prettier/prettier/issues/3105
2022-11-25 10:52:47 +08:00
4a1e32a9de Fixed scss function arguments on different lines in maps #9128 (#9184)
Co-authored-by: agamkrbit <agamkrbit123@gmail.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-11-24 17:46:29 +08:00
Yiming Panandfisker Cheung bcbc6daeec Fix union type should be printed in the multi-line variant when there are comments (#13860)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-11-23 11:33:45 +08:00
fisker Cheung 55fa0e9e0f Merge branch 'main' into next & update @typescript-eslint/*
# Conflicts:
#	package.json
#	src/language-js/utils/index.js
#	tests/format/typescript/satisfies-operators/jsfmt.spec.js
#	yarn.lock
2022-11-22 15:37:52 +08:00
Sosuke Suzuki fd376000e9 Update @typescript-eslint/typescript-estree to support satisfies (#13872)
* Update to `5.43.1-alpha.22`

* Update snapshots for satisfies

* Update changelog

* Remove `@ts-expect-error` comment

* Yarn dedupe

* Update to stable version

* Fix changelog

* Fix changelog
2022-11-22 15:19:28 +09:00
fisker Cheung f9a71da439 Add CodeQL Analysis workflow (#13851) 2022-11-20 15:35:24 +08:00
fisker Cheung b697a596a6 TypeScript: Throw errors for invalid modifier on type parameter (#13853) 2022-11-18 09:54:23 +08:00
fisker Cheung bac69974fd Revert "Fix tests"
This reverts commit 4f6a846d94.

Accidentally pushed to `next` when working on #13853
2022-11-17 22:45:35 +08:00
fisker Cheung 4f6a846d94 Fix tests 2022-11-17 22:43:17 +08:00
renovate[bot]andfisker Cheung 16b043abb9 Update dependency meriyah to v4.3.3 (#13837)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-11-14 20:31:58 +08:00
fisker Cheung 39e5466007 Support "Explicit Resource Management" proposal (#13752) 2022-11-14 19:45:27 +08:00
fisker Cheung 0d808c5ad8 Remove outdated range fix (#13736) 2022-11-14 19:45:08 +08:00
fisker Cheung a66236a3e1 TypeScript: Throw errors for 'declare' in accessors (#13770) 2022-11-14 19:44:14 +08:00
fisker Cheung 1de926ac79 Support "Import Reflection" proposal (#13771) 2022-11-07 09:49:35 +08:00
Sosuke Suzuki ff0529ac2e Backport "Support TS4.9 satisfies operator (#13764)" (#13783) 2022-11-04 10:35:50 +08:00
fisker Cheung 6c688b7e28 Infer source type from filepath (#13772) 2022-11-02 19:00:08 +08:00
Sosuke Suzuki 67e121a20b Add more tests for satisfies (#13775) 2022-11-02 09:45:34 +08:00
Sosuke Suzuki 931661a7aa Support TS4.9 satisfies operator (#13764)
* Print `satisfies` operators

* Add tests

* Add changelog

* Add `hug-args` tests

* Add more tests for TSAsExpression

* Add tests for argument expansion

* Add tests for template literal

* Add tests for ternary

* Add tests for export default satisfies

* Add tests for no lookahead tokens

* Add more tests for needs parens 1

* Add more tests for needs-parens 2

* Add more tests for needs parens 3

* Add tests for needs parens 4

* Add comment

* Add more tests for needs parens 5

* Add more tests for needs parens 6

* Fix test cases

* Fix snapshots

* Fix unstable tests

* No parens for mixed

* Merge printing logic

* More reuse `isTSTypeExpression`
2022-11-01 19:08:55 +09:00
fisker Cheung 256578bd3a Update jest-light-runner to v0.4.1 (#13749) 2022-10-30 11:05:09 +08:00
Georgii Dolzhykov 7682464887 Tweak gap regex for Flow (#13703) 2022-10-24 12:20:44 +03:00
Georgii Dolzhykov e67d8d6c1e Remove support for Flow comment types (#13687) 2022-10-23 01:00:01 +03:00
fisker Cheung 9cf73d3610 Use c8 ignore comments (#13683) 2022-10-22 23:33:08 +08:00
Tatsunori Uchino ebb8e13282 Markdown: improve whitespace handling in CJK (#11597) 2022-10-19 11:40:59 +03:00
Alexander Kachkaev 8df3b5ee60 Markdown: Preserve multiple spaces in inline code (#13590) 2022-10-14 10:58:03 +03:00
fisker Cheung 6615d07565 Fix template literal indention (#13621) 2022-10-13 13:31:06 +08:00
fisker Cheung 3ca842d81c Update @angular/compiler to v14 (#13609) 2022-10-11 11:26:30 +08:00
Sosuke Suzuki 28b7f2bffd Consistent dangling comments formatting for tuple and array (#13608)
* Consistent dangling comments formatting for tuple and array

* Add tests

* Add changelog

* Fix changelog

* Rename

* Refactor

* Fix ternary

* Remove needless ternary
2022-10-11 07:22:26 +09:00
Georgii Dolzhykov 2c1532b823 Merge remote-tracking branch 'remotes/upstream/main' into next 2022-10-09 22:10:00 +03:00
Anders Kaseorg f38111fec6 markdown: Preserve inline code line breaks if --prose-wrap=preserve (#11373) 2022-10-09 16:53:12 +03:00
fisker Cheung a545d6f58d Merge branch 'main' into next 2022-10-08 16:23:47 +08:00
Georgii Dolzhykov b893eeefb2 Update angular-html-parser (#13578) 2022-10-03 16:38:22 +03:00
Jed Fox bfb09bf214 Format pseudo-selector args like a function call (#13577) 2022-10-02 11:11:44 -04:00