Lucas Duailibe
624b876b35
update style
2017-12-29 20:08:59 -03:00
Christopher Chedeau
7eca8011bc
Inline do expressions inside of JSX ( #3607 )
...
Fixes #3602
2017-12-29 18:58:01 -03:00
Jimmy Jia
cfb8987ecd
Revert Relay Classic non-support ( #3606 )
...
This reverts commit e8551b994d313ea023855a790c87acc4833150f9.
2017-12-29 21:14:08 +01:00
Lucas Duailibe
c34db47c0c
fix prettier loading
2017-12-29 14:17:26 -03:00
Robert Webb
833666a394
Support handlebars ( #3534 )
...
* feat(glimmer): initial HTML/Handlebars/Glimmer support
* feat(glimmer): support un-escaped mustache expressions
* fix(glimmer): add 'as |foo|' syntax
* fix(glimmer): support {{foo bar}} syntax
* feat(glimmer): implement all AST types
* feat(glimmer): implement if/else if/else
* test(glimmer): ignore leading/trailing whitespace from AST_COMPARE
* fix(glimmer): do not use trailing slash for void self-closing elements
* chore(build): disable html tests until we can sort out the glimmer dependency
* feat(html): complete rebase on parse5 addition
* Prettier Support For Glimmer VM/Handlebars
Polished Support for Sub Expressions
Added test cases for glimmer primitives
Added support for concat statements
Attempted to make element nodes work
Attempted block statements
Element Nodes are OK
Added support for block elements that are not else-if related
Added support for Else/If
Cleaning up
Rebase
Switch node 4 syntax
Update build
* Removed dead code/partials
* Added new lines to end of test files.
* Rebase after plugin change
* Added ignores to code coverage
2017-12-29 18:14:31 +01:00
Lucas Duailibe
8811e45002
Merge branch 'master' into new-playground
2017-12-29 13:20:48 -03:00
Lipis
6a75f66731
Add Google Analytics on Playground ( #3576 )
2017-12-29 09:59:49 -05:00
Lucas Azzola
bd78b3bfbe
Remove ALL_PARSERS, print ~ printWidth times ( #3596 )
2017-12-29 08:25:11 +11:00
Jimmy Jia
bbfc450cd2
Support Relay Classic ( #3595 )
2017-12-28 14:20:25 -03:00
Lucas Azzola
b0647cb2c9
Fix PR Preview Playground ( #3592 )
...
* Fix PR Preview Playground
* Use module.exports for Prettier export
* Keep index for backwards compatibility
2017-12-28 22:37:47 +11:00
Jimmy Jia
b63c669ed9
Support plugins field in config ( #3584 )
...
* Actually support plugins field in config
* Resolve plugin parsers
* Fix default from CLI for "plugins"
2017-12-28 20:08:58 +11:00
artiebits
15a68394dd
Move playground styles to the single CSS file ( #3588 )
...
* Move playground styles to the single css file
* Add separateCss property to siteConfig.js
2017-12-27 17:32:37 -05:00
Lucas Azzola
84dd11e875
Bump TypeScript to 2.7-insiders ( #3580 )
...
* Bump TypeScript to 2.7-insiders
* Update yarn.lock
2017-12-27 09:06:59 +11:00
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 Duailibe
225bfa7d97
playground wip
2017-12-26 00:22:17 -03: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