Commit Graph

1439 Commits (dd84559991f6a5a5ac58ff70dd05c0c4b5018e11)

Author SHA1 Message Date
Kent C. Dodds 7c4a8d07a0 Add PayPal to prettier users (#2403)
* add PayPal as a prettier user

* add paypal logo
2017-07-06 08:46:38 +10:00
Joseph Frazier 9290dd8803 Add some standardjs-esque eslint rules (#2401)
I experimented with simplifying the eslint config to just use eslint-config-standard and eslint-config-prettier. There were too many errors to make it a quick change, but I did find a few useful rules we could adopt instead.

---

* lint: Remove useless return statements

http://eslint.org/docs/rules/no-useless-return

* lint: Split declarations into multiple statements

http://eslint.org/docs/rules/one-var

* lint: Remove unneeded ternary operators

http://eslint.org/docs/rules/no-unneeded-ternary

* lint: Require symbol descriptions

http://eslint.org/docs/rules/symbol-description

* lint: Disallow declarations in nested blocks

http://eslint.org/docs/rules/no-inner-declarations

* lint: Disallow yoda conditions

http://eslint.org/docs/rules/yoda

* Revert "lint: Disallow yoda conditions"

See discussion at https://github.com/prettier/prettier/pull/2401#discussion_r125750068

This reverts commit f3b568d5bd48a742460cb0f805d1be38d8f61a40.
2017-07-05 16:54:46 -04:00
Joseph Frazier 16bc297572 Fix --debug-print-doc (#2400)
* Add test of --debug-print-doc

See https://github.com/prettier/prettier/issues/2396

* Pass test of --debug-print-doc

See https://github.com/prettier/prettier/issues/2396
2017-07-05 18:25:51 +02:00
Joseph Frazier 8fcd667200 Update yarn.lock 2017-07-05 10:44:14 -04:00
Kevin Gibbons f490dba609 switch a use of .map to .each (#2395) 2017-07-05 02:03:18 +02:00
Kevin Gibbons 28b3a4b925 Break sequence expressions (#2388)
* Add SequenceExpression tests

* Clean up printing of SequenceExpressions

* Remove test and lint
2017-07-04 22:50:57 +02:00
Joseph Frazier e82a774568 Make --list-different to work with --stdin (#2393)
* Add test for `prettier --stdin --list-different`

See https://github.com/prettier/prettier/issues/2389

* Pass test for `prettier --stdin --list-different`

This fixes https://github.com/prettier/prettier/issues/2389

* Deduplicate --list-different handling

* Exit-early to reduce nesting in listDifferent()

* Simplify condition in listDifferent()
2017-07-04 14:41:46 -04:00
Evilebot Tnawi a0cadad222 feat(cli): support multiple patterns with ignore pattern (#2356) 2017-07-04 17:55:06 +02:00
Joseph Frazier ead0bc0a9c Use eslint-plugin-import to detect devDependencies used in production (#2387)
This solves the same problem as https://github.com/prettier/prettier/pull/2386,
but at lint-time, rather than only on Travis.
2017-07-04 17:53:45 +02:00
Lucas Azzola 067b49fbd7 Re-enable automatic deployment 2017-07-04 09:22:42 +10:00
Lucas Azzola bf2bcbcb1a Create CNAME 2017-07-04 09:19:39 +10:00
Kushagra Gour 0b41ecb55b docs(README): update bash script to mimic lint-stage behavior (#2384) 2017-07-03 14:38:43 -07:00
Joseph Frazier 782835de75 Move strip-bom from devDependencies to dependencies 2017-07-03 17:35:28 -04:00
Dara Hak 185fc608d3 Fix typo on website's tag line 2017-07-03 22:55:10 +02:00
Lucas Azzola 461fb30181 Fix formatted with Marked 2017-07-03 22:13:09 +10:00
Lucas Azzola 65bbbaec58 Add content to website (#2377)
* Add content to website

* Fix linting error

* Cleanup, extract content to JSON files
2017-07-03 12:48:05 +02:00
Karl O'Keeffe 06ae32ddce Ensure there is a line break after leading JSX white space (#2348) 2017-07-03 12:43:10 +02:00
Lucas Azzola c3346b0363 Disable automatic website deployment [ci skip] 2017-07-02 11:13:58 +10:00
Lucas Azzola 770ea21c29 Only deploy from node stable 2017-07-02 10:56:34 +10:00
Lucas Azzola ed4943dbec Set CI_PULL_REQUEST 2017-07-02 10:45:57 +10:00
Lucas Azzola d741a47e8f Set env variables to mock CircleCI [skip ci] (#2376) 2017-07-02 10:42:25 +10:00
Frank Li 80f38ce75b Website (#2241)
* initial docusaurus set-up

* Delete why-prettier.md

* Update README.md

* Update Docusaurus structure

* Update package.json

* Update siteConfig.js

* Remove ~ files

* chore(website): update build script

* Add redirect script

* Get eslint working on website

* Fix to allow for baseUrl of '/'

* Update docusaurus version

* Update README.md

* Change redirect script to use baseUrl of '/'

* Fix index.js formatting

* Load redirect script

* General cleanup

* Add projects using prettier
* Update service worker to just scope to playground
* Reduce link repeatition
* Link "Try it out" button to /playground/
* Make header of playground approximately same as main site
* Remove .html from URLs (e.g. users.html -> users/)
* Link Gitter Chat

* Add circleci.yml

* Only run builds on master

* Do deployment using Travis
2017-07-02 10:14:24 +10:00
Lucas Azzola 6f32a40edd Fix multiparser in website, fixes #2328 (#2374) 2017-07-01 18:14:21 +02:00
Lucas Azzola 6f9824778d Strip BOM before parsing, fixes #2362 (#2373) 2017-07-01 18:11:13 +02:00
Mitermayer Reis 7cf46acb9d Fix vim readme broken link (#2368)
* fixing-vim-readme-broken-link - Fixing broken link
2017-07-01 15:47:15 +10:00
Jarda Snajdr 3f6a232cea Fix indentation of a do-while condition (#2359)
Fixes #2353. Use the same printing code for both `WhileStatement` and `DoWhileStatement`.
Fix calculation of `isInsideParenthesis` when printing a `LogicalExpression`. There is
no such thing as `DoStatement` -- it should be `DoWhileStatement`.
2017-06-29 15:46:25 -07:00
Ryan Delaney 3319db6d51 Add `.gql` file extension to be parsed as GraphQL (#2357) 2017-06-29 13:50:54 -07:00
Simon Lydell 7b176b5d73 Merge pull request #2341 from lydell/shelljs
Convert build.sh into build.js using shelljs
2017-06-29 18:26:27 +02:00
Haroen Viaene 863b1be4b5 docs(README): hype train clarification (#2354)
* docs(README): hype train clarification

* Update README.md
2017-06-29 07:48:42 -07:00
Simone Picciani 85e0bffa7d Removed injectGlobal and keyframes (#2342) 2017-06-28 16:03:33 -07:00
Lucas Azzola 968cc3cb2b Delete fuzzer2.js 2017-06-29 08:52:14 +10:00
Simone Picciani 067a0137bd Add support for css, keyframes and injectGlobal keywords (#2337)
* styled components now support css keyword

* added support also for keyframes

* added comment to reflect the new keywords

* modified comment

* ignore css and keyframes when testing ast manipulations

* added also injectGlobal
2017-06-28 14:31:27 -07:00
Simon Lydell 20a0723fc1 Convert build.sh into build.js using shelljs
For better cross platform compatibility.
2017-06-28 22:34:59 +02:00
Simon Lydell ba51d2dfa8 Enable linting of build scripts 2017-06-28 21:37:33 +02:00
Joseph Frazier 21733e441d Normalize ALE headers in Vim docs 2017-06-28 12:37:37 -04:00
Joseph Frazier 175cde1dc5 Force trailingComma option to "none" when parser is JSON (#2335)
* Run JSON tests with `trailingComma: "all"`

* Add test of `parser: 'json', trailingComma: 'all'` with non-.json extension

See https://github.com/prettier/prettier/issues/2308#issuecomment-311707801

* Force trailingComma option to "none" when parser is JSON

This fixes https://github.com/prettier/prettier/issues/2308
2017-06-28 09:29:47 -07:00
Joseph Frazier 8e37fd76e9 Add support for range-formatting GraphQL (#2319)
* Add test for range-formatting GraphQL

See https://github.com/prettier/prettier/issues/2296#issue-238985580

* Pass test for range-formatting GraphQL

See https://facebook.github.io/graphql/#sec-Appendix-Grammar-Summary.Query-Document

This fixes https://github.com/prettier/prettier/issues/2296

* Consider *Definition GraphQL nodes to be formattable

See https://github.com/prettier/prettier/pull/2319#discussion_r124569400
2017-06-28 09:21:11 -07:00
Jack Franklin 9ee3e581d4 (docs): Document using Prettier + Vim using ALE (#2333) 2017-06-28 09:20:34 -07:00
Lucas Azzola 678964b8de fix(typescript): don't add namespace keyword to global declaration, fixes #2327 (#2329) 2017-06-28 07:53:10 -07:00
Christopher Chedeau 5db9407d78 1.5.2 2017-06-27 20:33:35 -07:00
Christopher Chedeau b231948a36 GraphQL: Print directives for field declarations (#2317) 2017-06-27 20:22:03 -07:00
Christopher Chedeau 45c8e40d8a GraphQL: Implement schema (#2316) 2017-06-27 20:15:55 -07:00
Christopher Chedeau 019beb54e5 GraphQL: Fix directives separator (#2315)
I couldn't figure out what the separator was, I tried `,`, `on` but none of them worked. Turns out it is `|`!
2017-06-27 19:58:38 -07:00
Christopher Chedeau 14caabd635 GraphQL: Print arguments for FieldDefinition (#2314) 2017-06-27 19:49:59 -07:00
Christopher Chedeau bbf8f76823 GraphQL: Implement scalar (#2313) 2017-06-27 19:34:25 -07:00
Christopher Chedeau 0a2a099efe GraphQL: Implement interface (#2312) 2017-06-27 19:30:58 -07:00
Christopher Chedeau 8e31088761 GraphQL: Implement input (#2311) 2017-06-27 19:27:02 -07:00
Christopher Chedeau b63e1c2dd7 GraphQL: Implement Enum (#2310) 2017-06-27 19:20:53 -07:00
Christopher Chedeau 51c7503dae GraphQL: Implement DirectiveDefinition (#2309) 2017-06-27 19:10:07 -07:00
Christopher Chedeau fbf4c3a952 GraphQL: Support object definition implements (#2307) 2017-06-27 18:51:56 -07:00