Commit Graph
2878 Commits
Author SHA1 Message Date
Jed Fox 633a12a29a Update copyright line (#5455)
* Update copyright line

* Update LICENSE
2019-01-03 07:21:32 -05:00
Ika 63999c74eb fix(mdx): handle inline html correctly (#5704) 2019-01-03 10:46:11 +08:00
Dmitry Sharshakov aka. sh7dm 1ca473186a docs: Happy New Year! 🎁 (#5699) 2019-01-01 12:25:06 +08:00
Ika 3de36e3a2b fix(ng,vue): add parens to avoid unexpected }} in interpolations (#5657) 2018-12-30 23:03:42 +08:00
Ika 7c4cebeaa5 feat: add babel-flow (#5685) 2018-12-29 21:35:47 +08:00
Ika 284764f030 fix(playground): backward compatibility for --parser babylon (#5690) 2018-12-28 14:56:58 +08:00
Ika 3a6c126f86 fix(playground): code sample for --parser babylon 2018-12-28 14:27:27 +08:00
Ika 86a5c40bc3 fix(playground): backward compatibility for --parser babylon (#5688) 2018-12-28 14:15:22 +08:00
Wei-Wei Wu 91c20f7fbe Rename "babylon" with "babel" (#5647) 2018-12-27 21:05:19 +08:00
Alexander Kachkaev a18d80253a Restore --check option docs (#5674) 2018-12-25 16:01:02 +08:00
Ika f744a84858 feat(website): enable docs versioning (#5676) 2018-12-25 08:20:35 +08:00
Alexander Kachkaev 439b1649ff Temporary remove --check docs until 1.16 is released to avoid confusion (#5671)
Context: https://github.com/prettier/prettier/pull/5629#issuecomment-448933238
2018-12-21 06:27:17 -05:00
Ika 65a9d3b8cc fix(flow,ts): format /* HTML */ templates (#5658) 2018-12-19 23:00:18 +08:00
Alexander Kachkaev 711c6d78a8 Add --check option (#5629) 2018-12-19 22:03:30 +08:00
Ika f94f63b040 chore: update azure pipelines (#5611)
- upload coverage report (codecov) from azure pipelines
- only build `dist` once (`dist` is now shared between production jobs)
- run production tests on macOS (not sure why but it's faster than others)
- extract shareable steps
- remove travis/circle
2018-12-18 08:16:32 +08:00
mattia richetto 031f6e860f Update string-width to support emoji natively (#5646)
the `string-width` package v3 now supports emoji width https://github.com/sindresorhus/string-width/pull/17
2018-12-18 08:13:12 +08:00
lhchavez 911d6c88e5 Fix formatting with --range-start / --range-end (#5632)
This change avoids collapsing an already-formatted range into a single
overlong line when --range-start / --range-end are provided.

Fixes: #4923
2018-12-17 10:59:20 -02:00
Dmitriy Sharshakov aka. sh7dm 6a45924379 fix(printer-postcss): ignore escape \ and escaped / in Less (#5597)
Avoid messing up Less files containing \\/ (escaped /).
Ignore escape \ and escaped / in Less.
2018-12-17 08:28:48 +08:00
Ika cbf06bf388 feat(html): format script with "application/ld+json" (#5642) 2018-12-16 16:21:10 +08:00
Brian Ng 8e612f05a0 Add support for class private methods (#5637) 2018-12-14 09:45:26 -06:00
Ika ffc8482458 fix(vue): tag names are case-sensitive (#5606) 2018-12-13 10:31:48 +08:00
Ika 419559e964 fix(javascript): correct indentation for expression in root template (#5607) 2018-12-12 09:52:23 +08:00
Ernesto García cd141c5347 Fix incorrect grammar (#5626)
* Fix incorrect grammar

* Update docs/rationale.md

Co-Authored-By: gnapse <gnapse@gmail.com>
2018-12-11 14:10:11 -05:00
Jed Fox b74f94d6dd Remove the dynamic require() call in the standalone bundle (#5612)
* Remove the dynamic `require()` call in the standalone bundle

* Liiiint

* Just use `replaceStrings`

* Reword error message
2018-12-11 05:59:59 -05:00
Ika 5e89969a9e test: update snapshots 2018-12-11 16:18:29 +08:00
Ika d97fe0a1e0 feat(html): preserve surrounding linebreaks (#5596) 2018-12-11 12:43:53 +08:00
Jed Fox fa7eafaa6d Add support for the React useEffect hook (#5608)
* Add support for the React `useEffect` hook

* Format

* Format

* [Refactor] remove unnecessary condition

`canHaveTrailingComma` is defined as `I(lastElem && ...)`, which will always be true when `lastElem === null`.

* Use a hacky method to allow the array to break

* Revert "[Refactor] remove unnecessary condition"

This reverts commit 91906ba22438afa0fe5e10c64a1fcf3cfa484ff3.

* Add tests for `React.useEffect` form
2018-12-10 06:09:20 -05:00
Jed Fox 98680a48e2 Don’t run tests on Node 6 (#5613)
* Don’t run tests on Node 6

* Re-enable fast finish
2018-12-09 12:18:09 -05:00
Ika 952bc0cc03 fix: get rid of CRLF (#5494) 2018-12-08 18:28:29 +08:00
Jed Fox b878a54e6a Reformat the first version info in the option docs (#5604)
* Reformat the first version info in the option docs

* Make the italic text actually italic

* Update new options; reword the filepath docs
2018-12-07 13:16:31 -05:00
Lipis 7c1758de86 Update example for *.vue (#5605) 2018-12-07 16:34:26 +01:00
Laurin Quast 9d1fb93e86 feat: add mjml extension to html language (#5505) 2018-12-07 21:01:40 +08:00
Ika cd28c22dbe feat(html): smart quote for attributes (#5590) 2018-12-05 11:15:09 +08:00
Ika 525c076be8 Bump Prettier dependency to 1.15.3 2018-11-30 10:30:52 +08:00
Ika a5ccfa1ecb Release 1.15.3 2018-11-30 10:29:15 +08:00
Ika 3cd1d003c0 fix(typescript): do not throw errors on bigint keyword (#5577)
- fix `Error: unknown type: "TSBigIntKeyword"`
- bump typescript to stable version
2018-11-30 10:12:32 +08:00
Ika 2247ce1aab feat(angular): support interpolation in attributes (#5573) 2018-11-30 09:28:54 +08:00
Ika 3fcf69a7d5 fix(api): normalize file path for getFileInfo (#5570) 2018-11-29 11:04:44 +08:00
Ika 28b938da97 feat(html): update angular-html-parser (#5565)
- support [`htm`](https://github.com/developit/htm) (`<${Component}>content<//>`, `<div />`)
- preserve [bogus comments](https://www.w3.org/TR/html5/syntax.html#bogus-comment-state) (`<! ... >`, `<? ... >`)
2018-11-29 11:03:22 +08:00
Ika d124bbaacb test: update snapshots 2018-11-29 10:38:37 +08:00
Ika 1ecd2228b4 fix(vue): group slot-scope correctly (#5563) 2018-11-29 10:09:38 +08:00
Wei-Wei Wu c28dc2f19c Updating cosmiconfig to not cache .js config files when told not to (#5558) 2018-11-29 09:49:33 +08:00
Ika 0534735c2f fix(vue): tweak semicolon for single expression in event bindings (#5519) 2018-11-29 09:28:35 +08:00
Christopher Chedeau 0af81c7695 Improve union types with leading comments (#5575)
We're running into this issue at Facebook because `// flowfixme` ignores the very next line, but in this case an empty line is added in-between which breaks the fixme.

Ideally the solution is to avoid adding a newline and we'd call it a day. Unfortunately it is tricky to implement in this particular case. The comment is already printed, including its \n. Yet, we want to indent the block and the only way to convince the doc printer to do so is to add an indent group --before-- the \n is printed, otherwise it's just going to indent on the next \n.

So this PR changes the output from one bad way to another, but the new way has the benefit of not breaking flow for Facebook, which makes our internal teams happier.

Note that the way we print the same construct with `&` is broken in the same way as with this PR. https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEBbAngNQEMAbAVzkwF5MAKME4+4xhpl5tmgDgHYA2LgE5+g3gP5CRY6cL6iJE2fL4BKJAB0ombTt17tAegOYAwhGzYEMTftu7oFAGSYYAdwjOYACwBOTzABWACYA1gAeXgBmxCFowVEA5jEBaEGJyV6pIdEBCZkhQQGJIcQpXkGRCSFFWaWRXlWlaOWVwZElCUUlAZgqANwgADQgEAAOMACW6MighD4+EK4ACnMIaMgghABuEBNBQyAARj6EYCFwMADKo6cTUAnIMD7kw14w2MQA6l4T8Gg3YDglzWvwmW1+uA2YDQ62GdzQcB8MCWJwS2EIyEiJARwxSYQAQiczhdLoRLAAZO5wTHYuC4tBhS53JJwACKpAg8BpxBxIBuPgRPg2h0Ih1wxGgB1GPjuME+e28yC4AAZhtKIAjPidRhtpXBBVtqcM-ABHUgTPwowhojFILE8ukgBHYCaPZ6OtDM4hsjlcu204YwUXyoKKpAAJkDJwmxGZZgstpAUAcB1ICIAKqL1v6HQBfXNAA

Fixes #5572
2018-11-28 10:30:51 -08:00
Ika bd3834010c chore(build): es5 compatibility for browser (#5560) 2018-11-28 12:52:05 +08:00
Ika 4dd7c79bbf fix(html): correct column for error code frame (#5553)
- before
  ```html
  [error] test.html: SyntaxError: Unexpected character "/" (1:26)
  [error] > 1 | <div>footer content here<//>
  [error]     |                          ^
  ```
- after
  ```html
  [error] test.html: SyntaxError: Unexpected character "/" (1:27)
  [error] > 1 | <div>footer content here<//>
  [error]     |                           ^
  ```
2018-11-27 17:45:17 +08:00
Ika 05ad885c3c feat(typescript): support BigInt (#5546) 2018-11-27 16:53:34 +08:00
Ika 3a5bbf5fd2 fix(typescript): do not change module into namespace and break/hug their body correctly (#5551) 2018-11-26 13:34:35 +08:00
Ika 99a3efaa7a fix: update editorconfig-to-prettier (#5550) 2018-11-26 13:08:52 +08:00
Ika a7528ebea4 fix(ng,vue): do not normalize attribute names (#5549) 2018-11-26 12:09:19 +08:00