Commit Graph

2977 Commits (e3b2f4adb49caa003a15d61d07a08f5618260ab7)

Author SHA1 Message Date
Ika 469a831619
fix(mdx): treat jsx codeblock same as in markdown (#5391) 2018-11-09 09:47:05 +08:00
Ika 7f472d72ae
fix(angular): handle parens in ng expression correctly (#5387) 2018-11-09 00:06:16 +08:00
Ika fd8ec95e0a
fix(javascript): do not apply test call formatting to arrow without body (#5366) 2018-11-08 14:00:42 +08:00
Ika 4b51907b87
fix(javascript): inline property decorator should stay inline (#5364)
Fixes the `@action` part in #5360
2018-11-07 17:21:03 +08:00
Ika 5e8ab7a104 chore: update changelog and lock 2018-11-07 10:23:10 +08:00
Ika 306cce5b10 Bump Prettier dependency to 1.15.1 2018-11-07 10:21:18 +08:00
Ika b11391d238 Release 1.15.1 2018-11-07 10:19:27 +08:00
Ika 8cedb9d25e
fix(markdown): do not keep increasing backslashes for dollar sign (#5358) 2018-11-07 10:06:57 +08:00
Simon Lydell e0362516af Update rationale for the 1.15 changes (#5332) 2018-11-07 09:13:08 +08:00
Ika 514b6d3741 Bump Prettier dependency to 1.15.0 2018-11-07 09:12:25 +08:00
Ika fa40f2ddd3
docs(blog): 1.15 release (#5296) 2018-11-07 09:09:04 +08:00
Ika 4559a774bb Release 1.15.0 2018-11-07 09:07:53 +08:00
Brian Ng e882452c54 Bump @babel/parser (#5356)
Follows #5304 with flow inexact support in @babel/parser!
2018-11-07 08:42:11 +08:00
Ika 40ac85125a
fix(html-in-js): do not break empty content (#5355) 2018-11-07 08:32:26 +08:00
Ika a4e8aaf7a1
fix(jsx): do not move trailing char to the next line as leading char (#5354) 2018-11-07 07:41:34 +08:00
Tim Upchurch f9bce75034 Update language support docs (#5178)
* Update language support docs

This commit updates docs language to reflect the change in #4528 that removes the inferred default parser.

* Remove language-support.md docs file

This removes the language support doc file as information is out dated, or available elsewhere in the docs.

* removes language-support from sidebars config
2018-11-06 19:23:04 -02:00
Ika 6a54e21c12
fix(css-in-js): do not remove semicolon (#5353) 2018-11-07 00:19:42 +08:00
Alexander Kachkaev b87fe4cf22 Add option to enforce certain line endings (#5327) 2018-11-06 22:47:13 +08:00
Ika 40f46740f6
fix(jsx): consistent quotes in JSX expression (#5349) 2018-11-06 15:38:50 +08:00
Ika b6691ba615
fix(javascript): no regression for jsx in arrow function in jsx (#5343) 2018-11-06 15:38:30 +08:00
Thomas Bartel dbe86abc24 Make ast-to-doc.js a little easier to understand (#5346)
Rename genericPrint function to callPluginPrintFunction to avoid similar name to printGenerically
Add comments that explain the descent/recursion
2018-11-05 07:34:27 -08:00
Ika e022abc9b8
chore(playground): add a temporary workaround for parser-vue (#5347)
Temporary workaround
2018-11-05 22:11:59 +08:00
Ika 02f9802119
fix(javascript): no regression for ternary#test alignment (#5333) 2018-11-05 17:07:57 +08:00
Simon Lydell e2d8834c49 Fix link to jsx-single-quotes option 2018-11-05 09:37:30 +01:00
Jed Fox 2136fdc858 Add a preview playground redirect page (#5321)
* Add a preview playground redirect page

* Finish the code

* Third time’s the charm

* Use location.replace instead

* Add playground redirect link to PR template

* Formatted with latest Prettier :)

https://deploy-preview-5259--prettier.netlify.com/playground/#N4Igxg9gdgLgprEAuEAeAhAEQPIGEAqAmgAoCiABABYwC2ANgHwA6Uq19zrlcAhgCady5VDTgwe5MJR4AnAM5iAvExABXGADMAtAA4Vg4TACWMOnAYAlOHyMy4YY1ADmgMgJUAemOnzLD936cqABGEHwAngZsAIyW1rb2jq5+MSxCqAAOsTZ2DkbO5GEQquQwECXc5Dzp6TIQNUY88OTpdDxhTrWqUHwAdOQAkhrlcOR22QnkfBBwclCAmAQw5ADuEDIA1gA0whKUdhrKIABWPABuPHJgMkbpMEiURnKlMmE9QTxgawAUAJT6TmVvD4lMowCrECweHgMSrdSR0IxA0EjKo1OpXRojeFQNY9DyZVLCC5XG4GISQKCPcg0RpSciKcjuAB61Bg6TkSCYTHcnPcThMlFUQU5PUgNB5NTExjgMnFdhgUplXPSqjodB5n05fAA1N93D04AAPeyfKZgVSiWA9PbSuwyX5QIRCIxDT7UmC09D0qAqujfcjAAmOyTQSkAbXcACpyKoZHRyBH3FsagBdOlUmmUQOOugQMCNIzQK1wFrvOCfAAGLLZSHc7j4xZzYS0EpORjgSy0ABJgDUAL5aZtyhU9KBieEaF6i9wl9qdbrl+1B3vkOB0BT+rNkkOLVdp03mhAwEV2DGkMwWmCfADk6Svi6DK7oPXgBpguGg8FgafL+Aq1pktrkAAqhYAAy5CfN2+4XkWGg2tKvZ+ks5zkFAECLDkEBOFARgAF7WH0ADKqzPOQSAVpuky5gelohOEPQoggfC4PcdB8J8q73kIvYEh4RLXDAgTuHRES+O47CMCAGwgHUxghsgoCyLUSzELICByMgICnBARh8FJIBBDI7xrGIhHpO8eROMgMAyKocDSRJADq9zwHI5lgHAhHqSYRitjAYSaWAcgadJeQKDIMDEEZTjUsgGg8Gu9lHHIBoAEJGR8pk8KIoF5HAcUJQo0nmfI0qaRJ+n1LAjm6aCyA6AADMVtQKI5RnpJpErhSc+XSXYACOqjxFFPAxTwBWJdJCg0EY1m2UlciWWYACKqjoflSDxZNIDiEENV8HVSAAEzSTZPBGFiTjvjQsUoGho76aoCj4DwQQaZthVwL2vZAA

* Add a GIF
2018-11-05 00:11:08 +02:00
Stefan Mirea e17512adcd Add an option to print single quotes in JSX (#4798)
* feat(option-singleQuote-jsx): Added jsSingleQuote

* feat(option-singleQuote-jsx): Refactored to use a simple jsxSingleQuote flag

* feat(option-singleQuote-jsx): Fixed borked rebase

* feat(option-singleQuote-jsx): Updated snapshots

* feat(option-singleQuote-jsx): Resolved pending comments

* feat(option-singleQuote-jsx): Removed assert

* Fixed merge conflicts

* Updated snapshots after merge conflicts
2018-11-04 16:36:00 -05:00
Ika f6a95dd2e0 chore(deps): replace parse-srcset with the gh commit one
to avoid potential changes
2018-11-04 23:19:41 +08:00
Ika 5e8a4a115a
feat: support HTML/Vue/Angular (#5259) 2018-11-04 23:03:07 +08:00
Ika 0878a6a3e7
fix(less): remove CRs from inline comments (#5334)
The issue here is that less parser somehow included CRs in `comment.raws.content`, but it was hidden by the wrong trailing space elimination previously, which was fixed by #5165.

We already have such tests but it's not reproducible in AppVeyor since they use LF ([`core.autocrlf=input`](https://stackoverflow.com/a/20653073)).
2018-11-04 11:36:14 +08:00
Simon Lydell 275b0543c8
Never put spaces to the right of stars in indentable block comments (#5330)
Fixes #5323. Previously we added space after `/*` _on the first line
only,_ but the intent is to only fix the indentation of comments, not
changing their "contents". Besides, this was inconsistent with the
handling of every following line. Finally, it broke `/*!` comments which
some minifiers look for to know which (license) comments to keep.

People can use https://eslint.org/docs/rules/spaced-comment to enforce
when to start comments with spaces.
2018-11-03 20:53:24 +01:00
Onur Temizkan f6d8be881c fix(css-in-js) Keep newlines in CSS-in-JS Templates (Fixes: #5147) (#5240)
* fix(css-in-js) Keep newlines in CSS-in-JS Templates (Fixes: #5147)

* Add more tests

* Do not add semicolon when CSS prop is a template variable

* Fix deletion of original semicolon

* Prettify long line
2018-11-01 21:58:16 +02:00
Jaiden Gerig 0799280429 Fixed unstable comment between function declaration and block statement (#5250) 2018-11-01 21:55:33 +02:00
Calum Lind b8ebcd910c Add YAML file extensions to pre-commit hooks config (#5182)
- Prettier support YAML but pre-commit hook was not checking those
  files so added file extensions to hooks config.
- Used double-quoted flow scalar style to make the list of file
  extensions easier to read. Backslash for regex needed escaping and
  backslash each line to prevent YAML including spaces.
- Added alternative markdown file extensions.
2018-11-02 00:21:51 +08:00
Nathan Totten cce4a2683a Added Apex plugin (#5318) 2018-10-31 17:08:56 +02:00
Beau Smith a34b9701e5 Website and Playground Setup and Run Instructions (#5312)
Update readme with steps to setup and run locally. 

Removed note about the need to run two separate processes because `yarn start` was [updated to concurrently runs both processes](ef932741ad (diff-07f3a4647460e74f9514d8def137963a)).
2018-10-31 09:07:20 +08:00
Andrey Okonetchnikov 7238ceffab docs: Remove the warning about partially staged files (#5310)
Since partially staged files are now officially supported, this isn't up to date anymore.
2018-10-29 09:16:28 -03:00
Sibiraj 2402a2a07b build: update editorconfig to resolve a deprecated warning (#5307)
This resolves a deprecated warning when installing prettier.

[image](https://user-images.githubusercontent.com/20282546/47603753-0995a700-da0e-11e8-9c89-61e0ff3d13c9.png)
2018-10-28 15:01:53 +08:00
Ika 907c5cab72
chore(yarn): disable integrity migration
Yarn v1.10 adds `integrity`s but v1.9 removes them.
Add this option to prevent them from adding unnecessary diffs all the time.
This is the default value for Yarn v1.12+ (ref: yarnpkg/yarn#6465).
2018-10-27 21:01:26 +08:00
Jordan Brown b861448dbf Pretty print inexact (#5304) 2018-10-26 21:05:42 +03:00
Jordan Brown 5d47e02f64 Update flow parser to 0.84.0 (#5303) 2018-10-26 22:14:47 +08:00
Beau Smith 6e0de08122 User can copy JSON config from Playground. (#5295) 2018-10-25 17:41:08 -04:00
Aquib Master 1234ceb1d6 Fix flow extends not breaking out into new lines (#5244) 2018-10-25 10:49:53 -04:00
Jaiden Gerig 2cc32da5af Fixed unstable while comment (#5251)
* Fixed unstable while comment

* Aligned while loop formatting more closely with if statment formatting
2018-10-25 10:48:09 -04:00
Ashwin Bhat 253716dd49 Fix Flow generic comment positioning (#5290)
* add test for ensuring that calls with zero arguments look right
2018-10-25 08:44:16 -04:00
Jed Fox 6a174654a4 Fix indentation of block comments where every line starts with a star (#5206)
Previously this was done only for JSDoc comments. Now it's done in a few additional cases.
2018-10-23 21:04:24 +02:00
Ashwin Bhat 4d4fab39fe Add support for flow typecast comments (#5280)
* Add support for flow typecast comments

* Allow whitespace between comment start and colon

Also rename flow-comments.js to utils.js

* fix bug where type annotations could be accidentally created

* use better regex in detecting flow comment whitespace

* fix comment in utils.js

* simplify conditionals and improve comments

* fix lint error
2018-10-23 10:46:20 -04:00
Gilles Debunne 559831d08e Update husky integration code for husky v1.0.0 (#5266)
Latest husky (version 1.0.0) moved its hooks config from the `scripts` field to a new `husky` field in `package.json` ([ChangeLog](https://github.com/typicode/husky/blob/master/CHANGELOG.md)).

The `scripts` syntax described here, although shorter, will be deprecated soon. This change replaces it with the new husky syntax.

The new syntax is already used in [precommit.md](https://github.com/prettier/prettier/blob/master/docs/precommit.md).
2018-10-21 23:28:19 +08:00
Lucas Azzola d1d1f17157
Update some plugin links (#5282)
Looks like they were overlooked.
2018-10-20 12:40:09 +11:00
Lucas Duailibe 62e4654e60
Respect original text decorator order (#5207) 2018-10-17 14:14:59 -03:00
Evilebot Tnawi 023a8b78df feat: more shared utils for plugins (#5254) 2018-10-17 07:53:38 -07:00