Commit Graph
1662 Commits
Author SHA1 Message Date
fisker Cheung eca28c70c6 Fix graphql comments between interfaces (#8006) 2020-04-10 21:09:54 +08:00
fisker Cheung cf6f251b3c graphql: Allow interfaces to implement other interfaces (#8007)
* `graphql`: Allow interfaces to implement other interfaces

* Add changelog
2020-04-10 20:27:25 +08:00
fisker CheungandGeorgii Dolzhykov aa3141c24e Wrap tests in describe (#7934)
* Run `format()` in test function

* Wrap `test`s in `describe`

* Update tests_config/run_spec.js

Co-Authored-By: Georgii Dolzhykov <thorn.mailbox@gmail.com>

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-10 19:12:01 +08:00
fisker Cheung 76cb1efcb6 Fix less :extend format (#7984)
* Fix less `:extend` format

* Add changelog

* Add longer test

* Add issue link

* Style

* Fix changelog
2020-04-08 18:02:13 +03:00
Sosuke SuzukiandGeorgii Dolzhykov 17d6e38d34 JavaScript: Fix pipeline bugs (#7979)
* Fix arrow regression

* Fix resolvePluginConflict

* Update changelog

* Fix condition

* Edit changelog: add link to Babel blog, change order (to be as in the blog)

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-08 23:49:46 +09:00
Sosuke SuzukiandGeorgii Dolzhykov ccaaad007d JavaScript: Support Smart and F#-style Pipeline (#6319)
* Modify to support smart-pipeline in printer

* Add tests

* add a changelog entry

* change minimal to smart

* fix parens issues

* Support fsharp-pipeline

* Fix needs-parens

* Try to fix ci problem

* Update changelog

* Add more tests

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-07 19:42:45 +09:00
Georgii Dolzhykov 50335bf5b9 Revert "[TypeScript] format TSAsExpression with same logic as BinaryExpression" (#7958)
* Revert "[TypeScript] format TSAsExpression with same logic as BinaryExpression (#7869)"

This reverts commit 8a48ca2e3d.

* add tests from #7956 and #7957

* more tests
2020-04-06 13:52:42 +03:00
Sidharth Vinod 04e4ef3758 Uniform line endings for multi line strings/comments (#7891) 2020-04-05 13:51:29 +03:00
dependabot-preview[bot]andSosuke Suzuki 46fc3def7b Bump flow-parser from 0.121.0 to 0.122.0 (#7935)
* Bump flow-parser from 0.121.0 to 0.122.0

Bumps [flow-parser](https://github.com/facebook/flow) from 0.121.0 to 0.122.0.
- [Release notes](https://github.com/facebook/flow/releases)
- [Changelog](https://github.com/facebook/flow/blob/master/Changelog.md)
- [Commits](https://github.com/facebook/flow/compare/v0.121.0...v0.122.0)

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

* Remove ForAwaitStatement

* Remove RestProperty

* Add tests for for-await

* Fix snapshots

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2020-04-04 22:14:44 +03:00
fisker Cheung bcf99ade8d Fix angular unstable expression binding (#7924) 2020-04-02 20:20:28 +03:00
fisker Cheung 22e3004719 Fix empty file format (#7921) 2020-04-02 00:43:52 +03:00
fisker Cheung e199e68bff Format script content inside HTML tag with colon (#7916)
* Format script content inside HTML tag with colon

* Fix mistake
2020-04-01 20:35:58 +03:00
Dmitry Gonchar 964230dce2 Fix #7920 - do not add comma for explicit inexact object with indexer property (#7923)
* 7920 run tests for trailingComma:es5 option as well

* 7920 example of wrong behavior - comma is always added at the end of the inexact object type

* 7920 add test cases for trailingComma: 'all'

* 7920 fix - do not force trailing comma on explicit inexact type if it has indexer or no properties

* 7920 add changelog
2020-04-01 15:24:45 +03:00
Georgii Dolzhykov 2d1142fc30 Use scss parser for css-in-js (#7883) 2020-03-31 17:10:38 +03:00
Sosuke Suzuki 0f56b4aa62 Flow: Print dangling comments for empty inexact object type (#7892)
* Remove unnecessary group

* Print dangling comment for inexact type

* Add changelog

* Fix changelog
2020-03-31 20:26:16 +09:00
Sosuke SuzukiandGeorgii Dolzhykov 8a48ca2e3d [TypeScript] format TSAsExpression with same logic as BinaryExpression (#7869)
* Treat TSAsExpression as like BinaryishNode

* Change test file extension, as.js => as.ts

* Add tests

* Remove old case for TSAsExpression

* Remove unnecesary condition

* Fix by lint

* Update snapshots

* Add changelog

* Remove convetToBinaryishNode

* Fix comment

* Use getBinaryishNodeNames

* Modify to wrap TSAsExpression with parens

* Fix by lint

* Do not pass operator when node is TSAsExpression

* Refactor shouldNotIndent

* Update util.js

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-03-31 20:25:47 +09:00
Kevin Gibbons 18bf01e8f8 Fix bug with holes in array literals (#7911) 2020-03-31 12:43:19 +03:00
Georgii Dolzhykov 605e57dd3e fix .prettierignore (jsfmt.spec.js files were ignored) 2020-03-27 23:40:45 +02:00
fisker Cheung b0ffc0f1df Fix prettier-ignore inside JSX (#7877) 2020-03-26 20:10:05 +02:00
fisker Cheung 77e3fc0d41 Fix ignored element print (#7867)
* Fix ignored element print

* Add changelog
2020-03-25 15:54:39 +03:00
Georgii Dolzhykov 58ac3b0c15 Revert "markdown: fix redundant leading spaces in markdown list" (#7847) 2020-03-23 22:47:36 +02:00
Georgii Dolzhykov 8ec7bc229a fix formatting of pseudo-elements and pseudo-classes in styled-components (#7842) 2020-03-23 16:59:49 +02:00
Kevin Gibbons 209b1f7749 TypeScript: avoid trailing commas on index signatures with only one parameter (#7836) 2020-03-23 02:22:20 +02:00
Georgii Dolzhykov 6835aa8dda fix prettier-ignore in union types (#7798) 2020-03-23 00:51:40 +02:00
Sosuke Suzuki 20c7a5ab9a Support type only import/export via babel-ts (#7804) 2020-03-21 17:36:05 +02:00
Evilebot TnawiandGeorgii Dolzhykov 4602bb6b95 refactor css comments (#7021)
* refactor css comments

* workarounds for postcss-less location bugs

* improve replaceQuotesInInlineComments

* update changelog

* fix comments in selectors

* fix comments in values

* use \ufffe instead of \0 because that's what these characters are for

see http://www.unicode.org/faq/private_use.html#nonchar6

* fix quoted urls

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-03-20 18:09:07 +02:00
Georgii Dolzhykov 1ad13d7420 Ultimate fix for Closure-style type casts (#7791) 2020-03-19 18:26:22 +02:00
fisker Cheung c82ce657e3 Run verify test on disabled babel-ts tests (#7786) 2020-03-18 15:35:13 +02:00
fisker Cheung aacb5fa75f Fix vue attributes indention (#7781) 2020-03-17 22:30:24 +02:00
Sosuke Suzuki 9d9e46c8c5 Support TypeScript 3.8 export * as ns syntax (#7764) 2020-03-17 02:43:15 +02:00
Georgii Dolzhykov 318bf2cb33 Partial support for TypeScript 3.8 (private fields, import/export type modifier) (#7631)
* support TypeScript 3.8

* Update standard_private_fields.ts

* improve tests for import/export type modifier

* temporary hacks for private fields

* comment out some tests, update snapshots

* add changelog entry
2020-03-11 17:40:57 +03:00
Sosuke Suzuki f8692f3bde TypeScript: Print dangling comment in empty type parameters (#7729)
* Modify to print dangling comment in type parameters

* Add changelog

* Fix changelog

* Modify to support line comment

* Fix changelog

* Change line to hardline
2020-03-10 17:33:33 +03:00
Sosuke Suzuki 78fe9cab73 JavaScript: Keep comments position for assignment/variable (#7709) 2020-03-10 11:37:42 +02:00
fisker Cheung acff41e7c9 Update postcss-less to v3 (#6981) 2020-03-10 01:14:34 +02:00
dependabot-preview[bot]andGeorgii Dolzhykov 8b0798b3b6 Bump flow-parser from 0.119.1 to 0.120.1 (#7722)
* Bump flow-parser from 0.119.1 to 0.120.1

Bumps [flow-parser](https://github.com/facebook/flow) from 0.119.1 to 0.120.1.
- [Release notes](https://github.com/facebook/flow/releases)
- [Changelog](https://github.com/facebook/flow/blob/master/Changelog.md)
- [Commits](https://github.com/facebook/flow/compare/v0.119.1...v0.120.1)

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

* add tests for declare field modifier, fix tests for #1481

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-03-10 00:46:30 +02:00
Mahir Shah 7cd82068bd Preserve Whitespace Control For Handlebars (#7575)
Previously whitespace strip characters ("~") were omitted after prettier
transformation on handlebars templates becuause the glimmer AST parser
did not expose when whitespace strip characters were used.

Update to the latest glimmer parser which exposes strip flags indicating
when whitespace strip characters are present. Update the glimmer printer
to preserve whitespace strip characters.
2020-02-27 11:50:14 +09:00
Graeme Worthy 7f2b103cf6 Support <!-- prettier ignore --> for text (#7654) 2020-02-25 13:11:08 +02:00
Georgii Dolzhykov 473bf9f50d Merge remote-tracking branch 'remotes/upstream/master' into next 2020-02-18 17:29:57 +02:00
Robert Webb 0b1b50106c Added a test to verify that #4659 is closed (#7591) 2020-02-18 17:01:55 +02:00
Kevin GibbonsandGeorgii Dolzhykov ada3d08df5 Put space after generator star, not before (#7516)
* Put space after generator star, not before

* remove pr-7516.md, edit pr-3903.md instead

Because the release blog post will be generated from these files.

* edit pr-3903.md

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-02-18 16:27:52 +02:00
Georgii Dolzhykov 16c0a7a10f Rudimentary support for the most used directives of AngularJS 1.x (#6869)
* Rudimentary support for the most used directives of AngularJS 1.x

* add ng-class and ng-style

* add changelog entry in the new format

* Update pr-6869.md

* update snapshots
2020-02-18 00:38:23 +02:00
fisker Cheung d2de524571 Don't add parens to undefined in ConditionalExpression with jsx (#7504)
* Add failed test

* Don't add parens to Literal and Identifier

* Update snap shot

* Move test to `jsx`

* Only undefined

* Add changelog
2020-02-17 16:34:50 +02:00
fisker CheungandGeorgii Dolzhykov 40a1418246 Format value of HTML class attribute (#7555)
* Format HTML attribute `class` value

* Add more example

* Typo

* Don't break

* exclude mustache and multiparser

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-02-16 10:59:15 +02:00
Georgii Dolzhykov 5dab172700 Merge remote-tracking branch 'remotes/upstream/master' into next 2020-02-14 14:08:20 +02:00
Cory Forsyth 5bd45d79af fix(glimmer): Do not strip AttrNode value when it is not blank (#7552)
* failing test

* fix(glimmer): Do not strip attr node values when not blank

* Add user-facing changes
2020-02-14 13:39:59 +02:00
fisker Cheung 017d079ca8 Format value of HTML style attribute (#7556) 2020-02-14 14:21:11 +03:00
fisker Cheung 4bac066146 Refactor shouldPrintComma logic for angular (#7507) 2020-02-14 13:21:46 +03:00
Daiki Ihara 3a485c68dd Markdown: fix incorrect prettification of multi-line markdown footnote (#7203)
* fix incorrect prettification of multi-line markdown footnote

* update test of footnoteDefinition

* add changelog_unreleased pr-7203

* fix changelog_unreleased

* fix pointed out

* update snapshot test of markdown for footnote
2020-02-14 11:50:49 +02:00
fisker Cheung 61398f0dc7 Vue: don't print long single expression of TemplateLiteral and StringLiteral on new line (#7479)
* Add failed test

* Fix logic

* Update example

* More tests

* Add changelog_unreleased/vue/pr-7479.md

* Fix logic
2020-02-14 01:47:36 +02:00
fisker CheungandGeorgii Dolzhykov b35074007b HTML: Fix inconsistent formatting of self-closing tags (#7395)
* Fix inconsistent self-closing tag in vue

* Update snap

* Add changelog

* More test

* reword changelog

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-02-10 13:36:25 +03:00