Lucas Azzola
486a89bfdc
fix(typescript): workaround - don't wrap directives in parens, fixes #2074 ( #2107 )
2017-06-11 19:10:56 -07:00
Lucas Azzola
e8f12cf621
TypeScript: Remove parens from type annotations where possible ( #2098 )
...
* fix(typescript): remove parens from union types where possible, fixes #1885
* fix(typescript): ensure parenthesis removal is stable
* fix(typescript): don't strip parens around function type
2017-06-11 18:06:47 -07:00
Lucas Azzola
9c608d2ec1
fix(typescript): use printFunctionParams for call/construct signature, fixes #2105 ( #2106 )
2017-06-11 16:06:38 -07:00
Jonas Gierer
2dba2a64da
Add `prettier-github` to related projects
2017-06-11 18:59:29 +02:00
Lucas Azzola
ec7d99439d
fix(typescript): print arrow function type params on same line as params, fixes #2099 ( #2101 )
2017-06-11 07:30:51 -07:00
Lucas Azzola
026f9b4de7
docs: prune old vim links from the table of contents
2017-06-11 22:35:35 +10:00
Lucas Azzola
4395e09b78
fix(import): allow break with both default named import, fixes #2050 ( #2096 )
2017-06-10 21:55:21 -07:00
Lucas Azzola
a79a444bac
fix(variable-declarator): indent first variable in one-var scenario, fixes #2072 ( #2095 )
2017-06-10 21:19:50 -07:00
Lucas Azzola
fdb7467de7
feat(html): add support for HTML fragments ( #2093 )
2017-06-10 20:10:34 -07:00
Lucas Azzola
b4f0ff346e
feat(mutliparser): add react-relay and graphql-tag parsing ( #2092 )
2017-06-10 08:59:27 -07:00
Lucas Azzola
d1b94c540c
Implement parser switching (HTML, Vue, styled-components) ( #2086 )
...
* feat(multiparser): implement switching from html -> css,js,ts
* feat(multiparser): use quasi value instead of originalText
2017-06-10 08:03:39 -07:00
Lucas Azzola
77f0c05d2a
fix(method-chain): break on non-literal computed member expression, fixes #2075 ( #2087 )
2017-06-10 07:47:22 -07:00
Lucas Azzola
1e08f03554
fix(typescript): break on multiple interface extends, fixes #2043 ( #2085 )
2017-06-10 07:46:59 -07:00
Lucas Azzola
f7819d5695
CSS: implement prettier-ignore ( #2089 )
...
* fix(css): implement prettier-ignore, fixes #2007
* refactor(css): move prettier-ignore to printNodeSequence
2017-06-10 07:45:59 -07:00
Lucas Azzola
a9409f11e7
fix(css): print @else on same line as }, fixes #2053 ( #2088 )
2017-06-10 07:40:05 -07:00
Lucas Azzola
8903e5e527
fix(html): fix AST_COMPARE on htmlparser2 ASTs ( #2084 )
2017-06-09 19:45:39 -07:00
Lucas Azzola
d00956d51d
feat(html): add parse5/htmlparser2 printer ( #2083 )
2017-06-09 19:22:59 -07:00
Christopher Chedeau
f399e90bc2
Preserve lines after directives ( #2070 )
...
Looks like we were only doing it at the top level, we should do it everywhere.
Fixes #2067
2017-06-08 17:10:01 -07:00
Christopher Chedeau
d062961ccf
Create README.md
2017-06-08 16:57:26 -07:00
Mitermayer Reis
7114eb4f1e
Fixing type on vim documentation ( #2066 )
...
* Adding --stdin-filepath option in order to enable filetype inference from
stdin
* Fixing typo on the documentation
2017-06-08 14:37:02 -07:00
Christopher Chedeau
939734b75e
Use ifBreak instead of shouldBreak ( #2063 )
...
shouldBreak is only a heuristic to enforce a break, if it breaks "naturally", then it won't be applied.
Fixes #2055
2017-06-08 11:47:49 -07:00
Tim Griesser
753ff5f0ac
Fix lint errors ( #2062 )
2017-06-08 09:49:24 -07:00
Mitermayer Reis
8a87681f66
Adding vim editor reference ( #2041 )
...
* Adding --stdin-filepath option in order to enable filetype inference from
stdin
* Creating vim editor integration docs
- Moving vim editor integration into editors directory
- Adding information about vim-prettier
2017-06-08 09:43:27 -07:00
Tim Griesser
df26cc05cc
Support graphql ListType ( #2061 )
2017-06-08 09:34:35 -07:00
Christopher Chedeau
883e637fa9
Support the Keyword type ( #2056 )
...
This is an issue in https://github.com/eslint/typescript-eslint-parser/issues/315
Fixes #2049
2017-06-08 09:25:28 -07:00
Tim Griesser
e9045e4bcf
Support graphql NonNullType ( #2060 )
2017-06-08 09:20:41 -07:00
Pier Paolo Ramon
126727380d
CSS: Every selector is now printed in its own line ( #2047 )
...
Changes the behaviour for line breaking inside selector lists (those
separated by ',') so that every selector is in its own line.
Fixes #1962
2017-06-08 07:46:24 -07:00
Christopher Chedeau
4758f5a80d
1.4.4
...
Oops, I forgot to re-run the build scripts, this broke postcss
2017-06-07 16:38:05 -07:00
Christopher Chedeau
f702c2c614
1.4.3
...
* Fix support for node 4 (#1988 )
* Fix website on iOS Safari (#1970 )
Formatting change:
* Position JSX whitespace (`{" "}`) at the end of lines (#1964 )
Lots of small fixes, mainly for TypeScript.
2017-06-07 15:48:34 -07:00
Martin V
820e39b2b3
Clean up build script, add Babel for docs js bundles ( #1970 )
...
* Clean up build script, add Babel for docs js bundles
* Update package.json
2017-06-07 15:20:48 -07:00
Christopher Chedeau
924363193b
Check if the next group has comments ( #2040 )
...
Fixes #1958
Fixes #1959
2017-06-07 15:20:11 -07:00
Christopher Chedeau
1edb1f261b
Include typeAnnotation inside of node location ( #2039 )
...
We should remove this hack once https://github.com/eslint/typescript-eslint-parser/issues/314 lands
Fixes #1946
2017-06-07 15:05:46 -07:00
Christopher Chedeau
42b0368e3d
Fix decorator comments for export class ( #2038 )
...
We need to do the same location trick for export class unfortunately.
Fixes #1956
2017-06-07 14:55:55 -07:00
Christopher Chedeau
b730f4eccf
Add group around TSMethodSignature ( #2037 )
...
This ensures that the comment size is not taken into account during measurement
Fixes #1976
2017-06-07 14:20:55 -07:00
Christopher Chedeau
09f147decd
Do not throw for unprinted comments inside of JSX ( #2036 )
...
Fixes #1990
2017-06-07 12:57:03 -07:00
Christopher Chedeau
ccda4c7115
Break decorator before content ( #2032 )
...
Fixes #1996
2017-06-07 12:40:47 -07:00
Christopher Chedeau
e16478ef80
Fix less &:extends when parsed with scss ( #2034 )
...
This is the only breakage that people ever reported with CSS so I'm happy adding one edge case like this.
Fixes #1967
2017-06-07 12:40:36 -07:00
Christopher Chedeau
cabae6d877
Fix parenthesis for call expression inside of member expression inside of new ( #2035 )
...
Fixes #2033
2017-06-07 12:40:27 -07:00
Christopher Chedeau
c7cacf0529
Break if string | null ( #2028 )
...
We were a bit too aggressive around the `| null` heuristic.
Fixes #2002
2017-06-07 11:51:32 -07:00
Christopher Chedeau
c9c8512170
Only prevent lone `set` if there's no type annotations ( #2026 )
...
If there are, it's not ambiguous.
Fixes #2023
2017-06-07 11:51:25 -07:00
Christopher Chedeau
5ba0b0ec87
Add semi for functions without body ( #2025 )
...
We don't need to be overly restrictive and should add the semi if there's no body
Fixes #2003
2017-06-07 11:51:17 -07:00
Christopher Chedeau
57b3fe8a50
Update commands.md
2017-06-07 11:43:06 -07:00
Christopher Chedeau
e1ebbff001
Update commands.md
2017-06-07 11:42:31 -07:00
Christopher Chedeau
9d4fabd691
Pretty printer commands.js
2017-06-07 11:17:04 -07:00
Alexandre BODIN
8ec1b40961
GraphQL: Add support for union types ( #2014 )
2017-06-07 10:33:46 -07:00
Eugene Korbut
0222d8eefe
Update README for emacs integration link ( #2024 )
2017-06-07 09:21:17 -07:00
Sashko Stubailo
0583fd4ce6
Add alias and null value ( #2017 )
...
Add kitchen sink test case
2017-06-06 18:06:15 -07:00
Joseph Frazier
1f3665fba0
Upgrade prettier to v1.4.2, fix lint issues ( #2018 )
...
This corrects the regressions seen in commit
26e829b
(https://github.com/prettier/prettier/pull/1888 )
2017-06-06 18:05:22 -07:00
Joseph Frazier
f261ad4efb
Add .yarnrc to use exact versions ( #2016 )
...
Now, `yarn add` and `yarn upgrade` will write exact versions to
package.json and yarn.lock.
See commit fadbbeb
(https://github.com/prettier/prettier/pull/291 )
2017-06-06 18:04:52 -07:00
Sashko Stubailo
88f962beee
Add support for GraphQL directies ( #2015 )
2017-06-06 17:42:47 -07:00