Commit Graph
2533 Commits
Author SHA1 Message Date
renovate[bot]andfisker f85e7b07bf Update dependency @babel/parser to v7.21.3 (#14522)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2023-03-20 10:29:46 +08:00
fisker 883324dbb6 Merge branch 'main' into next
# Conflicts:
#	scripts/tools/bundle-test/package.json
#	scripts/tools/bundle-test/yarn.lock
#	src/language-js/needs-parens.js
#	tests/format/typescript/typeof/jsfmt.spec.js
#	website/package.json
#	website/yarn.lock
2023-03-18 08:57:03 +08:00
fisker CheungandSosuke Suzuki d797f0cff2 Support TypeScript 5 (#13819)
Co-authored-by: Sosuke Suzuki <sosuke.suzuki@dr-ubie.com>
2023-03-15 11:06:31 +08:00
fisker Cheung 3fc6298c0e Stop evaluate graphql visitor keys (#14504) 2023-03-13 18:23:56 +08:00
fisker Cheung e2c5da38f4 Fix builtin plugins (#14502) 2023-03-13 12:34:56 +08:00
fisker Cheung 6c9ba400fa Bundle printers in plugins (#14354) 2023-03-13 09:20:12 +08:00
fisker Cheung 18baca62c9 Build: Auto generate types files for plugins (#14462) 2023-03-13 09:17:24 +08:00
fisker Cheung 4585fb0512 Add utilities to get descendants (#14470) 2023-03-13 09:12:48 +08:00
fisker Cheung 06aa1a3501 Ignore htmlWhitespaceSensitivity when formatting Vue SFC root blocks (#14401) 2023-03-13 09:12:11 +08:00
921eaf4690 Break on TypeScript parameter properties (#14402)
* add test for parameter properties

* break parameters for TypeScript parameter properties

ISSUE: #5666

* add a test pattern

* add changelog

* use getFunctionParameters

* Fix bad rebase

* Rename variables

* More tests

* Rename variable

* Fix snapshots

* Fix changelog

---------

Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Sosuke Suzuki <sosuke.suzuki@dr-ubie.com>
2023-03-12 00:06:39 +09:00
fisker Cheung 80419fa69e Remove unnecessary parentheses around class expression (#14409) 2023-03-09 15:22:27 +08:00
fisker Cheung dbd5e3fe26 Add test for #14454 (#14471) 2023-03-09 09:51:29 +08:00
fisker Cheung 9bfebb4062 Fix perf test scripts (#14460) 2023-03-08 09:18:45 +08:00
fisker Cheung f1b18f2319 Add parentheses to TypeofTypeAnnotation (#14458) 2023-03-08 09:16:03 +08:00
fisker Cheung 134f6078e1 Add document/public.js to export public apis, remove internal utils (#14456) 2023-03-07 08:54:11 +08:00
fisker Cheung 8036248b0a Move prettier-ignored node print into estree printer (#14406) 2023-03-06 15:40:18 +08:00
fisker Cheung cb25bd31f5 Don't trim in html insertPragma (#14441) 2023-03-06 10:47:17 +08:00
fisker CheungandSUZUKI Sosuke aee8e3b0c2 Simplify HTML embed language parser inference (#14440)
Co-authored-by: SUZUKI Sosuke <aosukeke@gmail.com>
2023-03-06 09:24:08 +08:00
renovate[bot]andfisker 444876025f Update dependency @babel/parser to v7.21.2 (#14413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2023-02-26 18:10:17 +08:00
fisker Cheung 595a2beebc Add WhitespaceUtils (#13923) 2023-02-24 15:41:20 +08:00
fisker Cheung 3662619f6f Linting 2023-02-24 09:47:44 +08:00
fisker Cheung 4a26d88f9a Merge branch 'main' into next
# Conflicts:
#	src/language-js/needs-parens.js
#	tests/config/format-test.js
2023-02-24 09:40:12 +08:00
fisker Cheung bc098779c4 Add missing parentheses for decorator (#14393) 2023-02-24 09:20:34 +08:00
fisker Cheung 5f68f86621 Improve JSON parse error (#14398) 2023-02-24 09:20:03 +08:00
fisker Cheung 24652d9186 Support babel v7.21 (#14391) 2023-02-24 08:59:53 +08:00
SUZUKI Sosukeandfisker Cheung 813df18df6 Moves @types/prettier to this repository (#14212)
* Rename `types` to `thirs-party-types`

* Copy `index.d.ts` from `@types/prettier`

* Make public APIs async

* Add missing `formatAST`

* Fix `CustomParser`

* Fix `Parser.parse` signature

* Add comment

* Add `standalonw.d.ts`

* first implement

* Fix path

* Add missing parser `.d.ts`

* Fix

* Fix path

* Introduce valid tests

* Add unit tests for dts files

* Add unit tests

* Simplify unit testing

* Tweaks structures

* Revert needless change

* Fix types path

* Introduce `ts-expect`

* Fix doc utils api

* Add AstPath API

* Fix API

* Fix tests

* Fix changelog

* Move dts

* Update module specifiers

* Remove generate dts config file

* Update build scripts

* Fix type errors

* Refactor with namespace imports

* Update comments

* Fix build script

* Improve build script

* `typing` -> `types`

* Clean up

* Minor tweak

* Minor tweak

* Modify `exports` field

* Fix paths in builder

* Refactor

* Refactor

* Address review

* Update changelog

* Address reviews

* Remove `since` from tests

* Improve utils type def

* Mark deprecated methods

* Address review

* Move docs types

* Address review

* Update c8 config

* Minor tweak

---------

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-02-23 22:15:18 +09:00
fisker Cheung 2833698c63 Less: Add test for interpolation in selector (#14330) 2023-02-21 16:36:32 +08:00
fisker Cheung 47830dbedb Cleanup visitor keys for DeclareInterface and InterfaceDeclaration (#14272) 2023-02-21 16:36:05 +08:00
renovate[bot]andfisker 639dd4e1df Update dependency meriyah to v4.3.4 (#14381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2023-02-19 20:23:17 +08:00
renovate[bot]andfisker 40138541e7 Update dependency flow-parser to v0.200.0 (#14384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2023-02-19 20:16:48 +08:00
fisker Cheung 0d6c8f681d Update typescript-eslint to v5.52 (#14358) 2023-02-19 11:15:06 +08:00
fisker Cheung 5cdc3ab2dd Support print ChainExpression (#13735) 2023-02-13 10:11:40 +08:00
fisker Cheung cb901d0f0d Refactor ignore check (#14324) 2023-02-10 17:51:13 +08:00
fisker Cheung d6d77b908b Throw errors for index signature with declare (#14316) 2023-02-10 17:39:56 +08:00
fisker CheungandGeorgii 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 e9ae01a6da Update prettier.util.{isPreviousLineEmpty,isNextLineEmpty} (#14320) 2023-02-10 14:23:42 +08:00
fisker Cheung caf6f6c64c Add getNextNonSpaceNonCommentCharacter to prettier.util (#14317) 2023-02-09 17:21:36 +08:00
fisker Cheung 62827ab4d5 Flow: Print trailing comma in type parameters when --trailing-comma=es5 (#14085) 2023-02-09 10:01:42 +08:00
fisker Cheung be84156d43 Treat hashbang as comment in babel parser(like other parsers) (#14302) 2023-02-08 15:58:25 +08:00
fisker Cheung b1ef30dd17 Merge branch 'main' into next
# Conflicts:
#	docs/browser.md
#	package.json
#	src/language-js/comments/handle-comments.js
#	src/language-js/needs-parens.js
#	src/language-js/print/type-parameters.js
#	yarn.lock
2023-02-08 12:37:23 +08:00
fisker Cheung 6bb24b2c5a Fix leading comments in mapped types with readonly (Cherry-pick #13427) (#14310) 2023-02-08 09:40:59 +08:00
fisker Cheung 9842b29ca3 Recognize @satisfies in Closure-style type casts (#14262) 2023-02-07 15:19:09 +08:00
renovate[bot]andfisker Cheung 4d80f5cf17 chore(deps): update dependency flow-parser to v0.199.1 (#14298)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-02-07 09:27:21 +08:00
fisker Cheung bc18fa4397 Fix incorrect removal of parentheses when using an infer with a constraint in a function predicate (#14279) 2023-02-06 11:17:48 +08:00
fisker Cheung 5d4380372e TypeScript: Forbid invalid tuple label (#14256) 2023-02-06 10:44:46 +08:00
renovate[bot]andfisker e03671797e chore(deps): update dependency @babel/parser to v7.20.15 (#14295)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2023-02-05 13:59:21 +08:00
fisker Cheung 39dadc9fad Stop checking invalid properties (#14274) 2023-02-03 11:12:48 +08:00
fisker Cheung 97c8e3c18f Run JSX tests on acorn, espree and meriyah (#10494) 2023-02-01 14:20:36 +08:00
fisker Cheung 3017876833 Forbid test babel parser in typescript/ (#14281) 2023-02-01 09:30:36 +08:00
fisker Cheung 3cb08c875d Test: auto test babel-flow parser (#14245) 2023-01-31 20:30:11 +08:00