Commit Graph
460 Commits
Author SHA1 Message Date
0176a33db4 Support angular control flow (#15606)
Co-authored-by: dweizhe <d.weizhe@anyong.com.tw>
Co-authored-by: fisker <lionkay@gmail.com>
2023-11-12 20:01:30 +08:00
fisker Cheung 36d1b8b09d Fix babel error message (#15581) 2023-11-03 19:35:55 +08:00
SUZUKI Sosuke 1d45bce625 Consistently format strings containing escapes (#15525) 2023-10-29 21:52:38 +09:00
SUZUKI Sosuke f852b8010e Improve formatting for assignment its left can break (#15547) 2023-10-28 14:29:17 +09:00
Seiya c609058fd3 Support (type) satisfies never; (#15514) 2023-10-16 16:04:28 +09:00
4aa5fd1c79 New Ternary Formatting: A Curious Case of the Ternaries (#13183)
Co-authored-by: Alex Rattray <rattrayalex@stripe.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2023-10-09 10:44:30 +09:00
SUZUKI Sosuke 4b432496df Support deferred import evaluation and source phase import syntax (#15487) 2023-10-09 08:52:48 +09:00
SUZUKI Sosuke edfe46051f Support optional chaining assignment (#15488) 2023-10-09 08:36:11 +09:00
SUZUKI Sosuke 14ddf452c4 Update @babel/parser to 7.23.0 (#15485) 2023-10-08 22:26:13 +08:00
Vivek Joshiandfisker Cheung d4d4b185e0 Fix: Encoding < and > in markdown urls (#15400)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-10-02 18:00:02 +08:00
Lucas Santos f4491b1274 Fix name case of selectors in styled components interpolation (#15472) 2023-09-30 15:57:53 +09:00
Luca Casonatoandfisker Cheung b78d7c7d2d Disambiguate unary expr in instanceof and in (#15468)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-09-28 14:56:55 +08:00
SUZUKI Sosuke fa8cb85434 Support type arguments after typeof (#15466) 2023-09-28 12:57:38 +09:00
Alex RattrayandAlex 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
Tatsunori Uchino 0661f78a26 Don't split lines between Japanese kana & COMBINING KATAKANA-HIRAGANA (SEMI-)VOICED SOUND MARK (#15411)
* Don't split lines between Japanese kana & COMBINING KATAKANA-HIRAGANA (SEMI-)VOICED SOUND MARK

* Add changelog
2023-09-22 22:30:30 +09:00
Sam Zhou 6bff776efd Support type arguments on jsx opening elements for flow (#15429) 2023-09-20 00:35:18 +09:00
SUZUKI Sosuke 4169dbb871 Fix printing comment for the last operand of union types (#15409) 2023-09-16 21:52:02 +09:00
SUZUKI Sosuke c041f3fb4f Support embedded formatting in template literals annotated with as const (#15408) 2023-09-16 21:42:17 +09:00
George Zahariev 675490ae55 Support as and satisfies expressions for Flow (#15130) 2023-09-16 17:28:18 +09:00
fisker Cheung bf7d90ae84 Switch html-styles to html-ua-styles (#15334) 2023-09-14 09:45:15 +08:00
auvred 7c512651f8 Do not split call of scss function with leading dash (#15370)
* Do not split call of scss function with leading dash

* add changelog

* apply check only for scss parser

* Revert "apply check only for scss parser"

This reverts commit 378bf1ac11830ff22c922efbd10c322ed573a31e.

* add more test cases

* use test case from original issue
2023-09-13 21:46:22 +09:00
renovate[bot]andfisker Cheung 4eaf68cd6c chore(deps): update dependency @babel/parser to v7.22.16 (#15380)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-09-12 19:18:02 +08:00
fisker Cheung 411ef345a2 Fix comment between parentheses and function body (#15326) 2023-09-02 09:18:15 +08:00
fisker Cheung 958b355ccb Fix comment around TSParameterProperty (#15324) 2023-09-02 09:16:36 +08:00
SUZUKI Sosukeandfisker Cheung 1ce97d13a3 Support TypeScript 5.2 using / await using declaration (#15321)
* Update `@typescript-eslint` packages

* Install `typescript`

* Tweaks snapshot tests

* Tweaks error files

* Add tests for `using` with types

* Add changelog

* Update misc tests

* Update snapshots

* Revert misc tests and remove `typescript`

* Update changelog_unreleased/typescript/15321.md

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

* Fix file name typo

* Keep valid file

* Update tests

* Update changelog_unreleased/typescript/15321.md

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

* Remove non-existing filenames.

---------

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-08-29 15:51:50 +09:00
SUZUKI Sosuke 90fab608ae Do not print trailing commas in arrow function type parameter lists in ts code blocks (#15286)
* Remove trailing comma for `ts` code blocks

* Add changelog

* Support `typescript`

* Update link

* Update tests
2023-08-24 17:02:56 +09:00
fisker Cheung f75f717c4e Allow break require() argument (#15256) 2023-08-23 15:58:06 +09:00
fisker Cheung dc3ebe812f Add test to close #14635 (#15254) 2023-08-23 15:57:07 +09:00
SUZUKI Sosuke 1b0c756bd6 Print declare and export keywords for nested namespace (#15249) 2023-08-15 22:38:07 +09:00
auvred 8a3e73c6c0 Do not add trailing comma for grouped scss comments (#15217)
* Do not add trailing comma for grouped scss comments

* add changelog
2023-08-11 18:44:05 +09:00
Seiya bf0b3040be Break after equal on assignment if rhs is await/yield expression (#15204)
* add as-is test

* break after equal on assignment if rhs is wait

Discussion: #15196

* rename test file

* add as-is test

* treat YieldExpression

* add tests

* add changelog

* fix a bug

* add test for delegated yield
2023-08-06 13:02:40 +09:00
fisker Cheung 29854ca8da Fix comments print in IfStatement (#15076) 2023-07-29 10:01:46 +08:00
fisker Cheung 12fd8891af Update typescript-eslint to v6 (#14429) 2023-07-22 02:35:30 +08:00
Pamela Lozano 5b38f6ec4f Add space before unary minus followed by a function call. (#15129) 2023-07-22 01:42:32 +09:00
auvred 7485c45bcc Add support for Vue "Generic Components" (#15066)
* add support for vue generic components

* add changelog and remove duplicated test case

* refactor

* rename file + simplify isVueScriptTag usage

* __isVueScriptGeneric -> __isEmbeddedTypescriptGenericParameters

* add link to blog post to changelog
2023-07-16 14:40:12 +09:00
auvred 8da37cce0b Add parenthesis around leading multiline comment in return statement (#15037) 2023-07-16 14:15:08 +09:00
fisker Cheung e2f4ce38f7 Improve cursor tracking (#14812) 2023-07-06 09:51:29 +08:00
Sosuke Suzuki fa48415617 Bump Prettier dependency to 3.0.0 2023-07-05 21:50:05 +09:00
renovate[bot]andfisker 25fa483e35 chore(deps): update dependency typescript to v5.1.5 (#14896)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2023-07-04 11:26:24 +08:00
renovate[bot]andfisker 61804e2516 chore(deps): update dependency espree to v9.6.0 (#15000)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2023-07-03 10:26:24 +08:00
Pieter VanderwerffandSUZUKI Sosuke ff7b025197 Support trailing comments in function parameters for all parameter node types (#14835)
* Support trailing comments in function parameters for all parameter node types

* Create 14835.md

---------

Co-authored-by: SUZUKI Sosuke <aosukeke@gmail.com>
2023-07-03 02:47:13 +09:00
Alex InkinandSosuke Suzuki fcb66949c9 Remove space after pipe name (#14961)
* Remove space after pipe name

* Add changelog

* Update changelog

* Update changelog

---------

Co-authored-by: Sosuke Suzuki <sosuke.suzuki@dr-ubie.com>
2023-07-03 02:28:17 +09:00
renovate[bot] bf581d35cf chore(deps): update dependency acorn to v8.9.0 (#14951)
Signed-off-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-18 10:43:10 +08:00
db1cdc007f test(vue): add tests for script lang (#14912)
Co-authored-by: fisker <lionkay@gmail.com>
Co-authored-by: SUZUKI Sosuke <aosukeke@gmail.com>
2023-06-13 23:02:21 +08:00
SUZUKI SosukeandNicolò Ribaudo 7ad852636d Support Import Attributes (#14863)
* Print import attributes

* Update visitor keys for import attributes

* Update snapshots for visitor-keys

* Update `babel-plugins` tests

* Update import attributes tests

* Update misc tests

* Add changelog

* Enable `importAttributes` and `importAssertions`

* Print ImportAssertion syntax

* Add `babel-plugins` tests

* Add import assertions tests

* Add misc tests for import assertions

* Update changelog

* Fix words

* Use `deprecatedAssertSyntax`

* Update `@babel/parser`

* Use deprecatedAssertSyntax

* Remove needless tests

* Update `@babel/types`

* Update visitor-keys

* Run `yarn dedupe`

* Update src/language-js/print/module.js

Co-authored-by: Nicolò Ribaudo <hello@nicr.dev>

* Address review

---------

Co-authored-by: Nicolò Ribaudo <hello@nicr.dev>
2023-05-31 00:47:12 +09:00
SUZUKI Sosuke 4d7afff735 Tests for await using syntax (#14862)
* Add tests for `await using`

* Add tests for `await using` from Babel

* Add changelog

* Fix changelog
2023-05-29 20:50:18 +09:00
SUZUKI Sosuke c1296105f3 Update @babel/parser to 7.22.0 (#14861)
* Update `@babel/parser` and `@babel/types`

* Update error message snapshots

* Run `yarn dedupe`

* Update `@babel/generator`

* Install new `@babel/parser`
2023-05-27 22:06:34 +09:00
SUZUKI Sosuke 6cff2148a3 Improve formatting for constraints on type parameters (#14858) 2023-05-26 22:04:43 +08:00
Pieter Vanderwerff 8f0e934367 Consider Flow type cast expressions when expanding call arguments (#14836) 2023-05-24 19:41:02 +08:00
ot07 9b19afda8a TypeScript: Fix issue with double semicolon caused by // prettier-ignore on a call signature line (#14830) 2023-05-19 10:23:13 +08:00