Commit Graph

125 Commits (master)

Author SHA1 Message Date
Adrian Zgorzałek 7c9823fcba Teach prettier/graphql about formatting fragment variables. (#6016)
Fragment variables are an experimental extension to GraphQL schema.
Formatting should follow the same rules as formatting an OperationDefinition node,
hence code is the same.
2019-04-04 09:44:52 -03:00
Ika f4bcb13d41
feat(typescript): support TS 3.4 (#6027)
- add support for `readonly` operator
- `as const` was already supported, added tests to ensure no regression
2019-04-04 15:32:54 +08:00
Noah Sugarman 0b07e10833 fix multiline dynamic import comments (#6025) 2019-04-02 12:35:03 -07:00
Kevin Gibbons 1e471a0079 Add parentheses for immediately-constructed fn/class (#5996) 2019-03-28 21:06:39 +03:00
Zaven Muradyan 887f800651 fix(angular): don't add unnecessary parentheses to pipes (#5929) 2019-03-13 09:02:36 +08:00
Lucas Azzola f32b289032
Support shared Prettier configuration (#5963)
* Support external configuration

* Document changes

* Update existing snapshots

* Update existing snapshots (2)

* Fix typo in docs

* Add example config repo
2019-03-13 09:34:51 +11:00
Hugo Alliaume b38319740a feat: autoload plugins that are located in `@*/prettier-plugin-* (#5945)
* add tests

* implement the feature

* update docs

* update changelog

* typo
2019-03-10 20:34:04 +11:00
Lucas Azzola f526c47b1e
Add an option to modify when Prettier quotes object properties (#5934)
* Implement quote-props=preserve

* Implement quote-props=consistent

* Add tests

* Enable quoteProps in playground

* Add documentation

* Cache objectHasStringProp calculations

* Fixup changelog
2019-03-06 20:33:08 +11:00
Julien Marchand ed1db90c68 Honor stdin-filepath when outputting error messages. (#5878) 2019-02-20 08:39:25 -05:00
Yang Su 71b815f583 JavaScript: Fix parens logic for optional chaining expressions and closure type casts (#5843) 2019-02-11 13:33:56 -02:00
Ika dd7715ae85 Bump Prettier dependency to 1.16.4 2019-02-03 20:35:04 +08:00
Lucas Azzola 2982dcd897
Fixup getSupportInfo for babylon parser prior to 1.16.0 (#5826)
This undoes an accidental breaking change where `prettier.getSupportInfo('1.0.0')` would report supporting the `babel` parser instead of `babylon`.

Fixes #5822
2019-02-03 21:57:59 +11:00
Nathan Totten a093bb3f7b Adds LWC Parser to support unquoted interop attributes (#5800)
This pull requests adds a new parser option `lwc`. This is the same as the HTML parser, but it adds support for unquoted HTML attributes per the needs of LWC. See: #5627
2019-02-01 13:58:50 +08:00
Ika 154435bb36 Bump Prettier dependency to 1.16.3 2019-01-31 12:23:34 +08:00
陈帅 a9d2c41464 feat(markdown): do not align table contents if it exceeds the print width and `--prose-wrap never` is set (#5701)
Fixes #5651
2019-01-30 12:24:21 -05:00
Ika 3c56b9ad18 Release 1.16.2 2019-01-30 16:23:45 +08:00
Yang Su 47da0804a9 JavaScript: fix edge cases in type cast comment detection regex (#5793)
Fix edge cases involving {...} ([record @type](http://usejsdoc.org/tags-type.html)) and newlines in prettier's detection code for type cast comments
2019-01-30 15:24:34 +08:00
Ika 847a78e8e9
fix(html): do not format non-normal whitespaces as normal whitespaces (#5797) 2019-01-30 14:30:10 +08:00
Alexander Kachkaev 36aeb4ce4f Fix CI detection to avoid unwanted TTY behavior (#5804) 2019-01-30 14:08:03 +08:00
Ika 0274f9ca42 Release 1.16.1 2019-01-22 21:53:04 +08:00
Ika 153d2d0570
fix(typescript): stable parens for function type in arrow return type (#5790) 2019-01-22 21:07:10 +08:00
Ika 1061be0702
fix(mdx): correctly recognize inline JSX (#5783) 2019-01-22 12:02:30 +08:00
Ika 2002ce0453
fix(javascript): add necessary parentheses for decorators (#5785) 2019-01-22 00:54:41 +08:00
Simen Bekkhus 565731668f fix: do not format callbacks with arguments as React hooks (#5778)
Ref: https://github.com/prettier/prettier/pull/5608#issuecomment-455860396
2019-01-22 00:26:39 +08:00
Ika 106fc36c81
docs: add CHANGELOG.unreleased.md (#5775)
Ref: https://github.com/prettier/prettier/issues/5735#issuecomment-452784056
2019-01-21 08:33:07 +08:00