Commit Graph

311 Commits (cce4a2683a0d42655569b6653e0e9488ad560e17)

Author SHA1 Message Date
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
Beau Smith 6e0de08122 User can copy JSON config from Playground. (#5295) 2018-10-25 17:41:08 -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
Raphael Boidol 59c075b311 [ImgBot] optimizes images (#5261)
*Total -- 1,155.42kb -> 742.94kb (35.7%)

/website/static/images/users/iress-200x100.png -- 78.46kb -> 4.68kb (94.03%)
/website/static/images/users/assertible-200x100.png -- 31.41kb -> 2.68kb (91.47%)
/website/static/images/users/sevenspan-200x100.png -- 19.97kb -> 5.77kb (71.09%)
/website/static/icon.png -- 4.47kb -> 1.72kb (61.45%)
/website/static/images/users/zipch-200x100.png -- 3.91kb -> 1.64kb (58.04%)
/website/static/images/users/discord-200x100.png -- 3.18kb -> 1.42kb (55.5%)
/website/static/images/users/nrwl-200x100.png -- 25.42kb -> 11.47kb (54.89%)
/website/static/images/users/loyaltylion-200x100.png -- 5.14kb -> 2.49kb (51.58%)
/website/static/images/users/drizly-200x100.png -- 7.02kb -> 3.44kb (50.94%)
/website/static/images/users/mathrioshka-200x100.png -- 37.09kb -> 19.25kb (48.1%)
/website/static/images/users/troops-200x100.png -- 6.75kb -> 3.54kb (47.61%)
/website/static/images/languages/markdown-128px.png -- 3.66kb -> 1.93kb (47.29%)
/website/static/images/users/eyesquare-200x100.png -- 10.26kb -> 5.49kb (46.53%)
/website/static/images/editors/webstorm-128px.png -- 6.64kb -> 3.77kb (43.18%)
/website/static/images/editors/atom-128px.png -- 8.66kb -> 5.07kb (41.45%)
/website/static/images/users/lifesum-200x100.png -- 12.70kb -> 7.45kb (41.33%)
/website/static/images/users/brigad-200x100.png -- 13.67kb -> 8.06kb (41.02%)
/website/static/images/users/holidaycheck-200x100.png -- 13.79kb -> 8.30kb (39.81%)
/website/static/images/users/outreach-200x100.png -- 8.52kb -> 5.36kb (37.13%)
/website/static/images/users/hudl-200x100.png -- 8.77kb -> 5.56kb (36.66%)
/website/static/images/editors/visualstudio-128px.png -- 3.13kb -> 1.98kb (36.62%)
/website/static/images/languages/js-128px.png -- 3.34kb -> 2.12kb (36.62%)
/website/blog/assets/github-diff-ternary-in-jsx.png -- 67.71kb -> 44.43kb (34.37%)
/website/static/images/users/getonboard-200x100.png -- 5.53kb -> 3.74kb (32.43%)
/website/static/images/users/hackclub-200x100.png -- 7.90kb -> 5.44kb (31.13%)
/website/static/prettier.png -- 16.74kb -> 11.61kb (30.62%)
/docs/assets/youtube-cover/a-prettier-printer-by-james-long-on-react-conf-2017.png -- 328.21kb -> 230.23kb (29.85%)
/website/static/images/users/transloadit-200x100.png -- 10.47kb -> 7.47kb (28.66%)
/website/static/images/users/paypal-200x100.png -- 12.50kb -> 8.94kb (28.5%)
/website/static/images/users/mongodb-200x100.png -- 9.72kb -> 6.99kb (28.08%)
/website/static/images/languages/graphql-128px.png -- 8.10kb -> 5.85kb (27.71%)
/docs/assets/youtube-cover/javascript-code-formatting-by-christopher-chedeau-on-react-london-2017.png -- 137.75kb -> 100.08kb (27.34%)
/website/static/images/users/codemix-200x100.png -- 3.82kb -> 2.87kb (24.92%)
/website/static/images/users/m6web-200x100.png -- 21.61kb -> 16.69kb (22.78%)
/website/static/images/users/yelp-200x100.png -- 10.59kb -> 8.23kb (22.35%)
/website/static/images/users/react-200x100.png -- 6.72kb -> 5.23kb (22.13%)
/website/static/images/users/babel-200x100.png -- 15.44kb -> 12.08kb (21.76%)
/website/static/images/users/freelancer-200x100.png -- 5.86kb -> 4.74kb (19.08%)
/website/static/images/users/ideati-200x100.png -- 4.05kb -> 3.29kb (18.62%)
/website/static/images/users/yarn-200x100.png -- 5.75kb -> 4.71kb (18.07%)
/website/static/images/users/talkable-200x100.png -- 3.07kb -> 2.56kb (16.63%)
/website/static/images/users/webpack-200x100.png -- 5.13kb -> 4.44kb (13.49%)
/website/static/images/users/escrow-200x100.png -- 7.47kb -> 6.48kb (13.25%)
/website/static/images/users/moonmail-200x100.png -- 5.69kb -> 4.96kb (12.87%)
/website/static/images/users/jest-200x100.png -- 3.26kb -> 2.84kb (12.86%)
/website/static/images/editors/vim-128px.png -- 13.85kb -> 12.16kb (12.19%)
/website/static/images/users/nhl-200x100.png -- 11.18kb -> 9.85kb (11.92%)
/website/static/images/editors/emacs-128px.png -- 21.24kb -> 18.90kb (11.03%)
/website/static/images/users/jane-200x100.png -- 4.14kb -> 3.70kb (10.71%)
/website/static/images/users/webflow-200x100.png -- 4.51kb -> 4.08kb (9.49%)
/website/static/images/users/storybook-200x100.png -- 6.04kb -> 5.49kb (9.11%)
/website/static/images/editors/vscode-128px.png -- 14.85kb -> 13.53kb (8.9%)
/website/static/images/editors/sublimetext-128px.png -- 6.83kb -> 6.39kb (6.55%)
/website/static/images/users/zeit-200x100.png -- 0.94kb -> 0.88kb (6.45%)
/website/static/images/users/smooth-code-200x100.png -- 9.16kb -> 8.66kb (5.49%)
/website/static/images/languages/css-128px.png -- 7.21kb -> 6.87kb (4.79%)
/website/static/images/users/rnfirebase-200x100.png -- 8.63kb -> 8.26kb (4.28%)
/website/static/images/editors/espresso-128px.png -- 22.42kb -> 21.78kb (2.84%)
/website/static/images/users/monei-200x100.png -- 5.35kb -> 5.31kb (0.75%)
2018-10-16 15:07:33 -03:00
Jed Fox b61fec6091
Fix <Language showName /> prop type (#5265)
There isn‘t a `boolean` prop type, so this was throwing an error when Netlify built the site.
2018-10-14 08:03:35 -04:00
Ika dd4687e7ef
feat(html): whitespace-sensitive formatting (#5168)
- whitespace-sensitive formatting 
  - respect css `display: block`/`white-space: pre` (data from [`html-styles`](https://github.com/marionebl/html-styles))
  - support magic comment (`<!-- display: block -->`)
  - add an option to specify whitespace sensitivity (`--html-whitespace-sensitivity <css|strict|ignore>`)
    - magic comments take precedence
    - (default) `css`: respect default css style (safe in the most cases)
    - `strict`: every node is considered whitespace sensitive (the safest)
    - `ignore`: every node is considered whitespace insensitive (dangerous, the original behavior)
  - inline inline-tags 
- support ie conditional comment (`<!--[if IE]><![endif]-->`)
- indent the script/style content
- no inconsistent output for 2+ attributes
- force break tag if there're multiline attributes
2018-10-13 13:55:38 +08:00
Marek Bodinger 095bfb8404 Add Exponea to users.yml (#5133)
* Add Exponea to users.yml

* Update exponea.svg
2018-09-22 18:05:13 -04:00
Ika 13147facc5
feat(html): switch to htmlparser2 (#5127)
- switch to [`htmlparser2`](https://github.com/fb55/htmlparser2)
  - no need to fork
  - won't generate pseudo nodes ([`parse5` will](https://github.com/prettier/prettier/issues/5098#issuecomment-423055181))
  - should be [faster](https://github.com/fb55/htmlparser2#performance)
- support custom self-closing tags
- support HTML entities
- remove extra trailing newline for `<template>`
- distinguish empty/empty-string attributes (`<tag x>`/`<tag x="">`)
- rename `--parser parse5` with `--parser html`
- enable `html` since 1.15, which means it's enabled by default if you install the dev version from GitHub after this PR merged.
2018-09-22 21:53:38 +08:00
Ika 79f4251e26
chore: enable html on preview playground (#5105) 2018-09-19 09:19:18 +08:00
Cody Reichert ead9127d70 Add Assertible to users.yml (#5099) 2018-09-15 15:10:12 -04:00
Ernesto García 8283320648 Add Get on Board to list of users (#5072) 2018-09-08 19:55:32 -04:00
Yashu Mittal 3c77c5dcfb Adding CodeCarrot to OCF list (#5069) 2018-09-08 07:38:03 +08:00
Lipis 2e8366a84e
Update tools and dependent project numbers (#5033) 2018-08-31 10:52:37 +03:00
Ika 1790211f76
feat: support MDX (#4975)
* feat: support MDX

* refactor: flip condition
2018-08-13 22:23:09 +08:00
Ika 1915cc3c46
chore: enable glimmer parser on preview playground (#4915) 2018-08-01 15:44:37 +08:00
Ika 514fcb835a chore: bump Prettier dependency to 1.14.0 2018-07-29 15:44:21 +08:00
Ika c2d90f14d8
docs(blog): 1.14 release (#4857) 2018-07-29 15:25:22 +08:00
Ika 02f64af6e3
fix(vue): no error on range format (#4868) 2018-07-22 15:58:29 +08:00
Marvin Heilemann 85eb3b63ad Added Unibeautify (#4834)
Added `unibeautify-vscode` plugin for VSCode as an alternative prettier for VSCode
2018-07-11 09:45:19 -07:00
Ika c4be0a57c3
feat(playground): add description for options (#4785)
* feat(playground): add description for options

* fix: support opposite description

* refactor
2018-07-02 08:23:21 +08:00
Yangshun Tay 94d928b9eb Upgrade Docusaurus to 1.3.1 (#4738) 2018-07-01 10:59:20 -03:00
Ika b4a92c6ee5
feat(playground): use real code sample (#4770)
* feat(playground): double click to insert example

* fix: correct condition

* feat: real code sample

* fix: remove unnecessary updateValue

* feat: auto-select on focus
2018-07-01 16:17:25 +08:00
Rhys Bower 2c2283ea7d Update Jest URL to jestjs.io (#4756) 2018-06-26 22:05:45 -03:00
Ika dcf44ffbdc
feat: support YAML (#4563)
* feat: support YAML

* fix: do not indent sequence in mappingValue

* docs: add yaml to index.md

* fix: reduce `SyntaxError: Node#parse consumed no characters`

* chore: remove old-build and new-worker.js

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* refactor

* fix: no space after `<<`

* fix: add yaml to standalone test

* test: add tests

* fix: next empty line in flow collection

* fix: tabs are not allowed
http://yaml.org/spec/1.2/spec.html#space/indentation/

* fix: update parser

* feat: rewrite the mappingItem logic
* feat: indent sequence in mapping
* feat(doc): add ifBreak#groupId and group#id

* chore: fix node 4

* chore: add tools_yaml.svg

* chore: remove resolved TODO

* refactor: remove unnecessary workaround

* chore(worker): importScriptOnce

* chore(build): rename with babelPlugins

* make it rollup compatible

* feat: support singleQuote

* refactor
2018-06-21 10:29:42 +08:00
Ika c5bbee67d3
fix(playground): no unnecessary import (#4653) 2018-06-09 00:01:14 +08:00
Jed Fox 1669a7b38b
Redirect the broken 1.13 blog link to the correct one (#4570)
* Redirect the broken 1.13 blog link to the correct one

https://twitter.com/prettiercode/status/1000819715374272515

* Redirect the broken 1.13 blog link to the correct one

https://twitter.com/prettiercode/status/1000819715374272515

* Revert "Rename 2018-05-27-1.13.0.md to 2018-05-23-1.13.0.md"

This reverts commit bce668af05.

* Fix redirect target
2018-05-28 07:24:09 -04:00
Suchipi 2303d6801f website: Change pre overflow-x to auto (#4573)
`overflow-x: scroll` shows scrollbars under every code block even if they aren't scrollable:

![scrollbar](https://user-images.githubusercontent.com/1341513/40591633-f0e85540-61d1-11e8-9906-c0c67d432d26.png)
2018-05-28 11:00:43 +10:00
Lipis bce668af05
Rename 2018-05-27-1.13.0.md to 2018-05-23-1.13.0.md
To fix the broken link on Twitter.. https://twitter.com/PrettierCode/status/1000819715374272515
2018-05-27 23:47:32 +03:00
Lucas Duailibe 7b723d345d Fix unpkg URL 2018-05-27 17:18:54 -03:00
dnalborczyk a227df916a fix spelling (#4568)
* fix spelling

* fix more things
2018-05-27 16:58:54 -03:00
Suchipi f5f84977a5
Rename 2018-05-23-1.13.0.md to 2018-05-27-1.13.0.md
Context: https://github.com/prettier/prettier/pull/4530#issuecomment-392359122
2018-05-27 13:36:48 -06:00
Suchipi e0b6a328aa
Fix typo in 1.13 blog post 2018-05-27 12:44:20 -06:00
Lucas Duailibe 412b064df8 Format docs with Prettier 1.13 2018-05-27 15:38:31 -03:00
Lucas Duailibe 0d57f22098 Use new worker on playground 2018-05-27 15:24:50 -03:00
Lucas Duailibe 9ee6d0bf55
1.13 release notes (#4530) 2018-05-27 15:18:07 -03:00
Lucas Duailibe 1c66625f37
Add standalone docs (#4550) 2018-05-27 15:17:38 -03:00
Lucas Duailibe f40b82d183
Fix playground (#4541) 2018-05-24 21:11:12 -03:00
Lucas Duailibe 52a2a46b3c
New build system (#4449) 2018-05-24 15:30:45 -03:00
Lucas Azzola 938d2f06be
Update dependent count in website (#4515)
[155,216](https://github.com/prettier/prettier/network/dependents) now!
2018-05-20 12:58:37 +10:00
Suchipi ec45dc9a4c
(refactor): Move common options out of JS plugin (#4445)
* (refactor): Move common options out of JS plugin

* Add Common category to playground
2018-05-15 14:14:50 -06:00
Ika 1062f2a889
feat: support JSON.stringify formatting (#4450)
* test: move tests

* feat: support legacy JSON formatting

* fix: add missing assertion

* test: fix coverage

* fix: same output as JSON.stringify

* refactor: fix linting

* refactor: rename to json-stringify

* refactor: fix linting

* fix: should fix the production build

* docs: remove outdated name

* fix(playgound): add lib/parser-json-stringify.js

* feat(playgound): add example for json-stringify

* fix: no error on singleQuote string

* fix(playground): correctly load json-stringify

* fix: identifier is only allowed in ObjectProperty.key

* refactor: clearer
2018-05-14 09:12:25 +08:00
Christian Gill 18eebc89fc Add HousingAnywhere to users (#4476) 2018-05-13 16:53:21 -04:00
Ika 92485601eb
refactor: fix linting 2018-05-10 02:27:56 +08:00
Lucas Duailibe f48dd0ea3b
Simplify `build-docs.js` (#4453) 2018-05-09 14:41:51 -03:00
Lucas Duailibe edcebb0d54
Fix playground (#4454) 2018-05-09 14:27:25 -03:00
Lucas Duailibe ef932741ad
Add concurrently to website `yarn start` (#4441) 2018-05-08 16:53:49 -03:00
Johann Hubert Sonntagbauer 1a6cf3d071 revert changes to code mirror gutter styles (#4419) 2018-05-04 13:31:53 -03:00
Lucas Duailibe c77f1e5987 [playground] Fix doc debug 2018-05-03 10:12:06 -03:00
Lucas Duailibe 6ceba37f9f
Add miniprettier to website and docs (#4411) 2018-05-02 12:51:28 -03:00