Commit Graph
2570 Commits
Author SHA1 Message Date
Sosuke Suzuki 09d65c35af Revert features for minor (#11016)
This reverts commit f8cb785758.
2021-06-05 18:32:49 +09:00
Cyrille David 3cd28ca80d Preserve attributes order for element node (#10958)
* Preserve attributes order for element node

* Add CHANGELOG

* Add ...arguments in the test

* Apply fisker suggestions

* Simplify further
2021-06-04 13:54:02 +03:00
fisker Cheung c3c300dd8f Remove @types/node package (#10994) 2021-06-04 13:28:36 +03:00
fisker Cheung c8133f8afa Fix StringLiteral print (#10997) 2021-06-01 08:50:35 +08:00
Sosuke Suzuki 3ec9414ae9 Fix order of override modifiers (#10961)
* Fix modifiers order

* Add tests

* Add changelog
2021-05-30 23:50:33 +09:00
Sosuke Suzuki 84f72be9dc Avoid to break after assignment for call expression that has complex type parameters (#10949)
* Avoid break-after-operator when call expr has complex type params

* Add tests

* Add changelog

* Fix issue number

* Update snapshpts

* Address review

* Support Flow

* Rename parameters => arguments

* Remove isCallExpression
2021-05-28 10:40:33 +09:00
fisker Cheung 81a1c46311 Minor tweak to js printer (#10954) 2021-05-27 18:00:31 +08:00
fisker Cheung 40cd8c9d7e Move flow node to flow.js (#10449) 2021-05-27 09:00:23 +08:00
fisker Cheung d3b777dd7d Update build script (#10946) 2021-05-27 08:54:42 +08:00
Georgii Dolzhykov 3616182508 Fix incorrectly wrapped arrow functions with return types (#10940) 2021-05-25 10:39:51 +03:00
Sosuke Suzuki f1e0f639c3 refactor: Add isObjectProperty util function (#10942)
* Add isObjectProperty

* Rename to isProperty

* Address review

* Address review2

* Make isProperty strict

* Rename to isObjectProperty
2021-05-25 11:07:08 +09:00
Sosuke Suzuki c40a0cf2b8 Add heuristics to detect assignments whose id has complex type annotations (#10916) 2021-05-24 01:24:56 +03:00
Domaandfisker Cheung f8cb785758 Support stylelintrc (#10924)
* Infer JSON/YAML parser for .stylelintrc

* Update test snapshots

* Update src/language-yaml/embed.js

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

* Add changelog for stylelintrc support

* Update embed.js

* style: Fix prettier linting problems

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-05-24 01:24:32 +03:00
Jed Fox 261bb0314f Fix repositioning the cursor at the end of a range format (#10938)
* Adjust the upper bound on cursorOffset when range formatting

* fix implementation

* Add changelog entry

* Update changelog entry to use PR number
2021-05-24 02:49:49 +09:00
tkalmarandGeorgii Dolzhykov fbca25cf8b Allow : as class prefix-delimeter (#10906)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-05-21 18:21:28 +08:00
fisker Cheung 8f17187bf7 Reduce parser-graphql size (#10903) 2021-05-19 09:23:31 +08:00
fisker Cheung 4d37ac46a3 Add __babel_estree parser (#10910) 2021-05-19 09:22:52 +08:00
Sosuke Suzuki 4b9e881b33 Add heuristics to detect type aliases that has complex typeparameters (#10901) 2021-05-19 09:22:33 +08:00
fisker Cheung 9b7ba8a42c Style: Use dotAll regexp (#10864) 2021-05-18 02:44:21 +08:00
fisker Cheung 085e38bffb Move replaceEndOfLineWith to docUtils (#10862) 2021-05-17 20:10:44 +03:00
Sosuke Suzuki cedf4800ae Add JSDoc type for isNonEmptyArray (#10902) 2021-05-17 20:51:47 +08:00
fisker CheungandGeorgii Dolzhykov 2e1021ca79 Reduce use of Array#reduce() (#10863)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-05-16 12:43:13 +08:00
fisker Cheung 90ea7e4a4f Use fsPromise in getFileContentOrNull (#10859) 2021-05-16 12:42:15 +08:00
fisker Cheung 213a825131 Use join in replaceNewlinesWithLiterallines (#10860) 2021-05-16 12:40:00 +08:00
fisker Cheung a9c3960f2f Remove dead code (#10869) 2021-05-16 12:35:55 +08:00
fisker Cheung 383f622942 Style: Remove useless flags (#10861) 2021-05-15 14:37:17 +03:00
Philip Davies bcd62546c2 Fix #5599, long yaml keys trigger explicit mapping (#10874)
Fix #5599, long yaml keys trigger explicit mapping
2021-05-15 14:03:06 +03:00
fisker Cheung e161350309 Use fsPromises in CLI (#10852) 2021-05-12 01:05:54 +08:00
fisker Cheung 98abb990cc Use Object.fromEntries(), Array#flat() and Array#flatMap() (#10853) 2021-05-12 01:05:29 +08:00
fisker Cheung b7983971ce Drop Node.js 10 support for development "build" (#10842) 2021-05-11 08:52:38 +08:00
fisker Cheung 6e71422548 Use async APIs in CLI (#10841)
* Use async API in CLI

* Remove `synchronous-promise`
2021-05-11 01:50:50 +03:00
Georgii Dolzhykov 3d8dc612b5 Bump Prettier dependency to 2.3.0 2021-05-10 00:07:47 +03:00
164a6e2351 Switch CLI to async (#10804)
* Switch CLI to async

* Rewrite test

* Fix tests

* Comment out failed test

* Comment out failed test

* Fix test

Co-authored-by: Connor Peet <connor@peet.io>

* Update patterns-dirs.js

* Fix `hasRunningCli` flag

* Fix grammar

* Update tests/integration/runPrettier.js

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>

Co-authored-by: Connor Peet <connor@peet.io>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-05-09 15:43:10 +03:00
fisker Cheung 877e64c046 Fix missing parentheses on async inside for..of (#10781) 2021-05-06 16:53:48 +03:00
Sosuke Suzuki 711c6d0d27 Support typescript 4.3 via babel (#10811)
* Suppor type members get/set

* Add tests for static index signature in class

* Support override modifier in class

* Add changelog
2021-05-05 22:32:51 +03:00
Sosuke Suzuki edc7a30f26 Support async do expressions proposal (#10813)
* Support async-do-expression proposal

* Add more tests

* Add changelog
2021-05-05 22:32:26 +03:00
George Zahariev 1bcaf61557 Support for Flow's Optional Indexed Access type (#10788) 2021-05-03 22:22:27 +09:00
Sosuke Suzuki 63c744823b Update babel parser (#10802)
* Update

* Use error codes instead of error messages

* Update js tests

* Update ts tests

* Add comments

* Remove plugins enabled by default

* update misc error tests

* Remove moduleStringNmaes

* use allowedMessagesCode directly

* Remove some misc tests

* Update snapshots for integration tests

* Add Redeclaration to cspell.json
2021-05-03 12:12:25 +09:00
fisker Cheung 067826bc7a Remove dead code (#10784) 2021-04-29 23:21:04 +08:00
Sosuke Suzuki 6b204193c0 Improve formatting for Module Blocks Proposal (#10758)
* Improve

* Add tests

* Fix tests

* Detect specified option object expression
2021-04-27 12:11:53 +09:00
TJ Mazeikaandfisker Cheung 7e4f4d5fe6 Exclude @keyframes params from being parsed as a Less variable (#10773)
* Exclude @keyframes params from being parsed as a Less variable

* Update changelog_unreleased/css/10773.md

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

* Update changelog_unreleased/css/10773.md

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

* Add "keyframes" to cspell.json

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-04-26 01:13:40 +03:00
Georgii Dolzhykovandfisker Cheung bc90973cad Avoid arg expansion that leads to broken code (#10712)
* Avoid arg expansion that leads to broken code

* Preserve new lines and only take comments into account if they break lines

* Add robustness against path state corruption due to throwing

* Refactor

* Remove redundant logic

It solved the same issue but only partially.

* Simplify further

* Refactor path.try, fix callParent issue

* Minor refactoring

* Add istanbul ignore comment

* Add return to AstPath#try

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

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-04-20 15:02:11 +03:00
Georgii Dolzhykov 1b2c72df10 TS: don't print parens around nested type assertions (#10702) 2021-04-15 00:19:42 +03:00
Georgii Dolzhykov a610179132 Improve lone argument detection (#10672) 2021-04-15 00:19:23 +03:00
Georgii Dolzhykov ae176f2e79 Process conditional groups in mapDoc (#10695) 2021-04-12 18:15:46 +03:00
147c30f7fb Build(deps): Bump @babel/parser from 7.13.13 to 7.13.15 (#10682)
* Build(deps): Bump @babel/parser from 7.13.13 to 7.13.15

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.13.13 to 7.13.15.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.15/packages/babel-parser)

Signed-off-by: dependabot[bot] <support@github.com>

* Add test for https://github.com/babel/babel/pull/13099

* Test https://github.com/babel/babel/pull/13049

* Test https://github.com/babel/babel/pull/13101

* Add long name test

* Style

* Print necessary parens in `{ a: (b as any) = 2000 }`

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-04-12 18:15:18 +03:00
fisker Cheung 62b9c63f21 Minor refactoring of printComments (#10671) 2021-04-12 18:02:06 +08:00
dependabot[bot]andGeorgii Dolzhykov f6b3919a62 Build(deps): Bump angular-html-parser from 1.7.1 to 1.8.0 (#10681)
* Build(deps): Bump angular-html-parser from 1.7.1 to 1.8.0

Bumps [angular-html-parser](https://github.com/ikatyang/angular-html-parser) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/ikatyang/angular-html-parser/releases)
- [Changelog](https://github.com/ikatyang/angular-html-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ikatyang/angular-html-parser/compare/v1.7.1...v1.8.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Typechecking improvements

* Add a TODO comment

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-04-12 11:53:19 +03:00
Patrick Ahmetovic cbdc8aa376 GraphQL: Fix missing space after keyword in anonymous operations (#10689) 2021-04-12 11:50:39 +03:00
Georgii Dolzhykov 97db2e3926 Minor refactoring of printObject (#10696) 2021-04-12 05:20:27 +03:00