Commit Graph

1953 Commits (3a9b25b8bc5f43401bacd1284eceeaa3295d6604)

Author SHA1 Message Date
Lucas Azzola 3a9b25b8bc
Add JSX to supported language list (#3579) 2017-12-27 00:20:10 +11:00
Lucas Azzola ee148bfded
Split up comment printing (#3575)
* Split up comment printing

* Refactor plugin handling

* Allow multiparser to use options normalization

* Rename to canAttachComment

* Add inline comment

* Format code

* Use prettier.__debug to get AST
2017-12-27 00:04:09 +11:00
Josh Unger 358984ef0c add an example .prettierrc.js config (#3570)
* add an example .prettierrc.js config

* Update configuration.md
2017-12-26 18:26:09 +11:00
Joseph Frazier 7b211eab24 editorconfig: Only search for .editorconfig up to the VCS directory (#3559)
* editorconfig: Only search for .editorconfig up to $PWD

This addresses https://github.com/prettier/prettier/issues/3558

I'm not sure if this is the best way to find the "project root", but it
seems better than before.

* editorconfig: Search for `.editorconfig` up to the VCS directory

This uses [find-project-root] to find the nearest directory containing `.git` or `.hg`

See here for context: https://github.com/prettier/prettier/pull/3559#issuecomment-353756948

[find-project-root]: https://github.com/kirstein/find-project-root

* editorconfig: Add test for finding VCS directory

It's a little hacky in that the .hg file isn't really a Mercurial
repository, but it's enough to illustrate the intent. See here for
context: https://github.com/prettier/prettier/pull/3559#issuecomment-353857109
2017-12-26 18:16:09 +11:00
Jed Fox 1a3248bbc2 Change the changelog link to link to prettier/prettier (#3564)
* Change the changelog link to link to prettier/prettier

* Fix changelog links

* Double quotes
2017-12-26 00:04:02 -05:00
Lucas Azzola 4c9d4061da
Prettier Plugin API (#3536)
* Move files around in preparation for refactor

* Update paths in build script

* Extract generic printing logic from the JavaScript printer

* Conform printer API

* Fixup decorator handling

* Fix multiparser

* Create plugin entry for markdown

* Create plugin entry for javascript/typescript

* Create plugin entry for html

* Create plugin entry for graphql

* Create plugin entry for css/less/scss

* Move JSON to JS plugin entry

* Integrate plugins into getSupportInfo()

* Move astFormat to parser definition

* Move util to common

* Implement parser loading

* remark -> mdast

* Rename cli/cli -> cli/index

* Rename builder -> doc package, fix printer resolution

* Fix doc shape assumption in CSS-in-JS logic

* Fix third-party.js prod resolution

* Fixup build-docs script

* Distribute multiparser code

* Remove requirement to forward options

* Flatten closure

* Remove debug directory

* Expose doc

* Add external plugins

* Pass options to loadPlugins

* Export getParsers

* Pin resolve version

* Use getSupportInfo in Markdown embed

* Document plugin API

* Update build-docs

* Add CLI for plugins

* Lint docs

* Fixup build.js

* Add vue language

* Fixup multiparser for vue

* Upgrade rollup and rollup-plugin-commonjs

* Fixup third-party build

* Change AST format in docs
2017-12-26 12:23:50 +11:00
Josh Unger 62bfcac4c5 remove comment in prettier json example since comments are invalid in json (#3567)
remove comment in prettier json file example since comments are invalid in json
2017-12-26 01:15:18 +11:00
Lucas Azzola 9a1f3211c9
Add content{Start,End} to massageAST (#3566) 2017-12-25 20:39:34 +11:00
Jiawen Geng ea4bc9093e fix recursive in script (#3565)
See more here : https://github.com/prettier/prettier/issues/2078.
2017-12-25 20:16:50 +11:00
Christopher Chedeau c40b061b80
[vue] Introduce proper support for Vue Single File Components (SFC) (#3563)
There's a lot of demand for vue sfc (#2097). This introduces partial support for them: all the html is printed as is, except for the script and style tags which are printed using prettier. I believe that this should cover a lot of the use cases while being simple to support and if we want we can extend to more in the future.

I copy pasted the html parser used by vue (it's just a single 400 lines file) so that we don't run the chancesof conflicts. I'm also very conservative: I only print the style and script at the top level and for the lang attributes we support.

I expect this to be landable as is and provide value, review welcome :)
2017-12-25 01:15:33 +01:00
Jed Fox 3ef89b5fa1
Merge pull request #3562 from j-f1/patch-1
Make the playground header fit in with the rest of the site
2017-12-24 13:36:50 -05:00
Jed Fox 9cbaecbb1e
Link the version text to the PR or changelog entry 2017-12-24 12:05:54 -05:00
Jed Fox eb30207fe5
Remove the `v` marker addition
It looks terrible on PRs.
2017-12-24 11:57:44 -05:00
Jed Fox 4497aa1efc
Make the playground header fit in with the rest of the site
Fixes https://github.com/prettier/prettier/issues/3542.
2017-12-24 11:49:47 -05:00
Jed Fox 5ccc213a21 Conform the quotes in Markdown link titles to the singleQuote option (#3481)
* Add an option to utils.printString to use the passed string as-is

* Conform the quotes in Markdown link titles to the singleQuote option

* Don’t use destructuring

* Add some tests

* Format util.js

* Use custom string-printing logic

* Add some more tests

* Fix tests

* Address review comments

* Revert "Format util.js"

This reverts commit d2533ef7fb9231e2f733ece7decac9b923cf6941.

* Revert "Don’t use destructuring"

This reverts commit a5d3b0ac76a076e9a89cffc8cec396cabeacd1ee.

* Revert "Add an option to utils.printString to use the passed string as-is"

This reverts commit ef8e8322609ca3c2808885f3fadcd03f0790078c.

* Even more tests
2017-12-24 15:44:38 +01:00
Lipis 3dfa2c07b2 Add Google Analytics tracking ID (#3506) 2017-12-24 15:42:36 +01:00
ntmonson b8a715a8de Changed the alt attribute for monthly downloads (#3553)
Updated the alt attribute to reflect the image it is attached to.
2017-12-22 12:58:17 +11:00
Jerome Leclanche 591a9cb6d0 Add HearthSim to users.yml (#3554) 2017-12-22 12:56:38 +11:00
Jiawen Geng 0a28c7484f Add js version pre-commit (#3541) 2017-12-20 18:08:42 -02:00
Simen Bekkhus 36727421c2 chore: use scoped babel package (#3529) 2017-12-20 19:36:33 +11:00
Lipis 8b8268096f Refactor images for Users, Editors and Languages (#3479) 2017-12-19 10:42:16 -02:00
Jed Fox 9780c00332 Update the command documentation and add types (#3494)
* Update the command documentation and add types

* Fix signatures

* Remove the <T> generic of the Doc type for easier reading

* Move the types inline with the docs

* Prettify the code; unignore the code blocks

* Put back some ignores; add more semicolons;
2017-12-19 10:17:35 +11:00
Joseph Frazier f82b574fd4
Return early from `massageAST()` (#3522)
This reduces nesting and handles the edge cases first.

This commit is best viewed ignoring whitespace differences:

    git show -w
2017-12-18 12:33:53 -05:00
Anatolie Rotaru d4101169e5 Fix PostCSS VS Code integration (#3454) 2017-12-19 00:05:39 +11:00
Jed Fox 7d9f71d488 Add `root: true` to .eslintrc.yml (#3519) 2017-12-18 23:46:28 +11:00
Lucas Azzola ed80d6c5bd
Make all CLI logging go through a logger (#3515)
* Make all CLI logging go through a logger

* Add --loglevel docs

* Change default loglevel to log

* Update snapshots

* Switch to YAML eslint files
2017-12-18 23:22:07 +11:00
Lucas Azzola d1c97b3622
Convert eslint config and users/languages/editors files to YAML (#3516)
* YAML all the things

* Cleanup website data files

* Update edit links
2017-12-18 21:55:10 +11:00
Adam 56948a953e Add Troops to Users (#3505) 2017-12-18 09:48:30 +08:00
Lucas Azzola 5e81e75601
Add plugin:prettier/recommended (#3508)
* Add plugin:prettier/recommended

* Revert eslint-plugin-prettier docs changes
2017-12-18 08:39:31 +11:00
Lucas Azzola 8be1fbb58a
Switch to light logo in README (#3507) 2017-12-18 00:24:19 +11:00
Joseph Frazier c338fdd565 Revert "Set travis dist to "precise"" (#3510)
This reverts commit 675688c814.

See the following for context:
* https://github.com/prettier/prettier/pull/3349#issuecomment-350617020
* https://github.com/travis-ci/travis-ci/issues/7566#issuecomment-351514693
2017-12-18 00:06:49 +11:00
Praveen Durairaj f1680c3f22 Add hasura to list of users (#3504) 2017-12-16 15:56:54 +11:00
Georgii Dolzhykov 5c6b93a654 Add "JSON with comments" to vscodeLanguageIds (#3496) 2017-12-16 11:45:51 +11:00
Matt Mulder b778df4fc2 Add Yelp to list of users (#3502) 2017-12-15 19:09:15 -02:00
Tom Bonnike 23ffddf94a Added N26 to the list of users (#3499) 2017-12-16 00:02:35 +08:00
Anton Vasin 67a51c1da6 Update mathrioshka url to https (#3498) 2017-12-15 22:46:22 +11:00
Lucas Duailibe 4d23e9081d
Print flow type annotation comments as comments (#3449) 2017-12-15 05:11:48 -02:00
Kushagra Gour 57e821a28c add wingify to user list (#3497) 2017-12-15 03:12:22 -02:00
Anton Vasin 7f55cc5872 Add Mathrioshka to users (#3495) 2017-12-15 09:11:57 +08:00
Martin Irigaray f38c51269a IDEATI uses prettier (#3490) 2017-12-14 15:26:10 -02:00
Daniel Tschinder 1ba144b617 chore(docs): Add webstorm setup with eslint integration (#3489) 2017-12-14 23:19:54 +11:00
Hemratna Bhimani 9157968159 Adding 7span.com to user.json (#3486)
At 7Span we user Prettier in our day to day workflow.
2017-12-14 20:51:40 +11:00
Hemratna Bhimani f8f18487d2 Adding 7Span logo. (#3487) 2017-12-14 20:51:12 +11:00
Christian Rackerseder 7b6f3eaeea Added HolidayCheck to website ☀️ (#3488) 2017-12-14 20:43:51 +11:00
Mae Capozzi f804002579 Update grammar in the README.md (#3485) 2017-12-14 17:49:42 +11:00
Charles Pick d691c8d395 Add codemix to users (#3482) 2017-12-14 17:47:44 +11:00
James Henry 5feb76f13f Update tsep to v11 and update snapshot (#3471)
* Update tsep to v11 and update snapshot

* Remove unneeded TSNamespaceFunctionDeclaration
2017-12-14 17:44:59 +11:00
Nick Arnold d6db35c16b docs: update babylon project url (#3484) 2017-12-14 14:23:53 +11:00
James Henry 8f9798e792 Website: Add Nrwl to users (#3483)
* Update users.json

* Add nrwl logo
2017-12-14 10:47:25 +11:00
Emmanuel Vuigner 2816c45771 Add ZIP.ch to users.json (#3480) 2017-12-13 15:01:41 -02:00