Commit Graph

2005 Commits (46baad09cd6fd5f3cdf09500998e436737f5aedd)

Author SHA1 Message Date
Lucas Duailibe 46baad09cd
Fix vue print error with self-closing tags (#3705) 2018-01-10 17:41:11 -02:00
Michael Sharer 0e0fa5cc23 Add NHL to users list (#3703)
* Update users.yml

* Add NHL to users list
2018-01-11 00:23:15 +08:00
Lucas Azzola a10418ee80
Bump Prettier to 1.10.1 (#3699)
* Bump Prettier to 1.10.1

* Fix relative paths
2018-01-11 01:13:09 +11:00
Haroen Viaene 408f3d3657 playground: add (s)css examples (#3696)
* playground: add (s)css examples

see #3667

* escape quotes

* add license notice

* lol fix prettier on prettier codebase
2018-01-10 07:57:04 -05:00
Lucas Azzola cf511ec2e9 1.10.1 2018-01-10 23:39:06 +11:00
Lucas Azzola bae21cb166 1.10.0 2018-01-10 23:08:15 +11:00
Jed Fox 9a1b57587d Add 1.10 blog post (#3659)
* Add 1.10 blog post

Copied from releases page

* Change a few things

* Add overview of changes

* Lint docs

* Scaffold out release notes

* Add prettier-ignores

* docs: add missing references

* docs: fix heading level

* docs: fix example

* Document plugin API

* Use shellsession

* docs: fix example

* docs: fix links

* Fix heading level

* change: ts upgrade -> numeric separator support

Instead of mentioning we updated the typescript version, we should emphasize on what value we added to users

* Fix repeated phrase

* add comment type annotation explanation

* Add note on no more wrapping () JSX elements

* Grammar

* Add more release notes

* Fill out remaining release notes

* Fix lint

* Add verb

* Fix heading level

* Update 2018-01-10-1.10.0.md

* Update 2018-01-10-1.10.0.md

* Add twitter buttons

* docs: add note for #3694

* Fix cake
2018-01-10 23:03:39 +11:00
Ika 3df7d60a7f feat(markdown): respect `tabWidth` for list indentation (#3694)
* test: add test case

* feat(markdown): respect `tabWidth` for list indentation

* test: add extreme `tabWidth` test case
2018-01-10 18:45:22 +11:00
Lucas Azzola b1a7787e87
Fix vue self-closing tags (#3693) 2018-01-10 18:44:18 +11:00
Ika 7e24d3ff79 fix(playground): avoid `assign to readonly` error on Safari (#3668)
* fix(playground): suppress`assign to readonly` error

* fix(playground): avoid `assign to readonly` error
2018-01-10 18:02:49 +11:00
Rory O’Kane 2891db1a3c Make `--ignore-path` link more specific in docs (#3690) 2018-01-09 20:16:15 -02:00
Marcel Jackwerth a27d19b2c1 Allow Plugins to preprocess text (#3664)
* Allow Plugins to preprocess text

* Actually pull up text

* Always expect the preprocessor to set the text

* Add tests for preprocessing

* Remove unused variable
2018-01-10 00:27:26 +11:00
Lucas Duailibe 01a59eeee3
Wrap conditionals and await in parens in spread property (#3681) 2018-01-09 01:45:51 -02:00
Jed Fox dc4e44968f
Follow redirects in the user URLs (#3672)
(except the ones redirecting to `/en/` or similar)

Also remove trailing slashes on domains
2018-01-08 10:32:33 -05:00
Lucas Azzola eb1096d4af
Add pretty-quick pre-commit docs (#3675) 2018-01-09 02:19:53 +11:00
Ika 5e2e7a2881 feat(playground): add example placeholder (#3657)
* feat(playground): add example placeholder

* Add TypeScript example

* fix: mock process.binding

* fix: add missing comma

* refactor: use legacy function

* fix: mock return `{}`

* Return the error stack when there’s a non-SyntaxError thrown

* Code style

* fix: mock path.resolve

* chore: cache placeholder.js

* fix mock path.resolve attempt 2

* fix: mock path.{parse,join,dirname}

* fix: mock process.cwd

* fix: mock path.parse root
2018-01-07 06:59:14 -05:00
Ika 445b4afc73 docs(readme): travis master badge (#3666) 2018-01-07 20:06:25 +11:00
michele e4e3c757fb Added GumGum to list of users (#3660) 2018-01-05 22:40:00 -02:00
Lucas Azzola b65e679e70 Update plugins docs (#3653) 2018-01-05 10:48:47 -05:00
Tejas Kumar 053202cc16 Added Contiamo to list of users (#3655) 2018-01-06 02:05:02 +11:00
Lucas Azzola e5d6a4704f
Automatically load plugins from package.json (#3624)
* Automatically load plugins from package.json

* Fix build by adding json extension

* Fixup misuse of options argument

* Rewire graceful-fs to fs

* Document graceful-fs issue

* Alias graceful-fs to fs in Rollup
2018-01-05 21:09:51 +11:00
Christopher Chedeau a4dd86436a
[scss] Print comments inside of selector as is (#3649)
Fixes #3647
2018-01-04 19:03:04 -08:00
Lucas Duailibe 7f75499dd2 Prevent adding softline after arrow attribute with comments (#3641)
* failing test

* fix
2018-01-03 12:12:01 -08:00
Lucas Duailibe 157df6e3fd
Print imageReference with no alt in Markdown (#3643) 2018-01-03 13:54:53 -03:00
Lucas Duailibe 7d3a30615b
Don't add () in JSX attributes with elements (#3640) 2018-01-03 11:36:25 -03:00
Marcel Jackwerth 6260629f18 [Plugins] Allow custom getCommentChildNodes (#3639)
* [Plugins] Allow plugins to specify their own getChildNodes for comment printing

* Rename getChildNodes -> getCommentChildNodes
2018-01-03 23:58:53 +11:00
Ika dbe0758b48 chore: shorten filename (#3636)
Context: https://github.com/prettier/prettier/pull/3627#issuecomment-354935942
2018-01-02 23:48:46 -05:00
Lucas Duailibe 6a953e47b5
Print description of enum and input for GraphQL (#3633) 2018-01-03 01:29:11 -03:00
Christopher Chedeau 5356db0e69
Normalize GraphQL multi-line strings (#3632)
* Normalize GraphQL multi-line strings

See discussion in https://github.com/prettier/prettier/pull/3605#discussion_r159120321

* split
2018-01-02 11:55:53 -08:00
Ika a627ca7b5d
docs: minor tweaks (#3627)
* docs(blog): replace `:emoji:` with `${emoji}`

* docs(blog): move images to assets

* docs(index): move images to assets

* docs(index): fix typo
2018-01-03 00:04:22 +08:00
Christopher Chedeau dcf04187db
Tweak CSS of the blog section (#3625)
* Tweak CSS of the blog section

* light codeblocks

![image](https://user-images.githubusercontent.com/197597/34471012-52212fba-eef2-11e7-8f75-404a3693c87d.png)
2018-01-01 17:08:47 -08:00
Lucas Azzola c00c1cb6e0
Change quoted date back to 2017 2018-01-01 12:40:10 +11:00
Li Siyao c6304fb426 Happy new year 2018! (#3620) 2018-01-01 00:41:21 +01:00
Lucas Duailibe 2cb9498ab6 Output files as-is if ignored (#3618)
* fix --stdin-filepath

* output file as-is without --write

* return early

* use writeOutput
2017-12-31 18:08:09 +01:00
Christopher Chedeau 58e5536741
Update GraphQL parser (#3605)
* Update GraphQL parser

Fixes #3601

This adds support for
- description as strings
- extending all the possible types
- block strings
- allow removing {} if there's no implementation for all graphql types

This is a breaking change but shouldn't be a big issue.
- Empty types are no longer allowed (there's an option to enable it but it hasn't been released yet). The fix is to remove `{}`

Something that hasn't been changed because not released:
- Doesn't support the new `&` separator for implementing multiple interfaces

A bug has been fixed:
- Now properly prints @directives for unions.

* Properly handle triple quotes
2017-12-31 16:45:06 +01:00
Lucas Duailibe 51744e1008 Print parens in FunctionTypeAnnotation when arrowParens is "always" (#3616)
* add test case

* print parens in function type annotation
2017-12-31 16:01:21 +01:00
Ika 6c0dd74518 feat(support-info): add `options` field (#3433)
* refactor: rename supportTable with supportLanguages

* refactor: use `dedent`

* test: reduce unnecessary data

* feat(support-info): add `options` field

* add `showDeprecated` option
* add `showUnreleased` option

* test: snapshot diff

* fix(support): add missing `since`

* fix: add missing `category`

* refactor: use template tag

* fix: `trailingComma:true` should redirect to `trailingComma:es5`

* refactor: reorder parser

* refactor: fix linting

* refactor: move options

* refactor: move options to printers
2017-12-31 15:34:37 +11:00
Lucas Azzola 800a1cf9d4
Add Blog, Populate with Release Notes (#3604)
* Add blog

* Rename files, add extra #

* Improve formatting

* Convert pull-request links

* Fix typo

* Update links in CHANGELOG.md, lint docs

* Add missing parens

* Remove banner images

* Add 1.0 release blog post

* Fix encoding bug

* Add truncate to 1.0 blog post

* TS syntax highlighting looks better than JS highlighting on Flow

* Add introductory sentences to older posts

* More highlighting fixes

* Fix mistake

* Fix more highlighting errors

* More highlighting fixes

* Add CSS fix

* fix truncate on 1.9.0 post

* fix truncate on 1.0.0 post

* Fix additional # and my name in 1.0.0

* Restore js -> ts on codeblocks
2017-12-31 15:23:17 +11:00
Ika 8a86c0cc9f fix(playground): fix report version (#3614) 2017-12-31 12:12:56 +11:00
Ika 6872ed8310 fix(markdown): replace newlines with hardlines in multiparser (#3611)
* test: add failing test

* fix(markdown): replace newlines with hardlines in multiparser
2017-12-30 10:33:58 -05:00
Ika 0af436cd47 fix(playground): use `prVersion` (#3613) 2017-12-31 00:54:36 +11:00
Lucas Azzola a041914551
Extract cleanAST to language-specific files (#3610)
* Extract cleanAST to language-specific files

* Fix lint

* Fix clean-ast for vue and glimmer
2017-12-30 21:30:09 +11: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
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
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