Rogelio Guzman
4ebccef79d
Add tests for trailingComma option
2017-01-13 13:25:13 -05:00
Rogelio Guzman
63c87b6cd0
Add tests for tabWiths option
2017-01-13 13:25:13 -05:00
Rogelio Guzman
7f9655e186
Add tests for quotes option
2017-01-13 13:25:13 -05:00
Rogelio Guzman
e54b9806a3
Add tests for bracketSpacing option
2017-01-13 13:25:13 -05:00
Rogelio Guzman
3e0ac6c18e
Update run_spec to support options
2017-01-13 13:25:13 -05:00
Christopher Chedeau
958ea215a6
Add trailing comma support for multiline exports ( #168 )
...
```
echo "export { aaaaaaaa, bbbbbb, cccccc, dddddddd, eeeeeee, fffffffff, ggggggggg } from 'vjeux';" | ./bin/prettier.js --stdin --trailing-comma
export {
aaaaaaaa,
bbbbbb,
cccccc,
dddddddd,
eeeeeee,
fffffffff,
ggggggggg,
} from "vjeux";
```
2017-01-13 13:00:46 -05:00
Christopher Chedeau
3dcf46c77c
Do not put spaces on empty for loop ( #169 )
...
```js
for (;;) {
```
instead of
```js
for (; ; ) {
```
2017-01-13 13:00:32 -05:00
Christopher Chedeau
8e0f97e410
Break multiline imports ( #167 )
...
Follows the same pattern as https://github.com/jlongster/prettier/pull/156/files
```js
echo "import { aaaaaaaa, bbbbbb, cccccc, dddddddd, eeeeeee, fffffffff, ggggggggg } from 'vjeux';" | ./bin/prettier.js --stdin
import {
aaaaaaaa,
bbbbbb,
cccccc,
dddddddd,
eeeeeee,
fffffffff,
ggggggggg
} from "vjeux";
```
2017-01-13 12:59:33 -05:00
Jamie Webb
ecb26b3432
treat shebang outside of parsing ( #137 )
...
* treat shebang outside of parsing
* use less costly indexOf and reuse format function
* avoid reprinting new line and potential double space at start
* move options back to format function
2017-01-13 12:57:27 -05:00
James Long
fb9c1e8098
Fix misprinting of computed properties in method chains. ( #157 )
...
* Fix misprinting of computed properties in method chains.
Closes #23 , #94 .
* Fix snapshot conflict
2017-01-12 15:06:44 -05:00
James Long
ab37f7fd02
Merge pull request #156 from jlongster/break-imports-exports
...
Break long `exports` into multiple lines.
2017-01-12 15:00:00 -05:00
James Long
aab300844f
Use group instead of conditionalGroup
2017-01-12 14:53:12 -05:00
Benjamin Tan
1549936e68
Break long `exports` into multiple lines.
...
Ref #19 .
2017-01-12 14:38:22 -05:00
James Long
bbe2524dab
Merge pull request #134 from vjeux/generics
...
Support method generics on babylon parser
2017-01-12 13:50:10 -05:00
James Long
a1d9d2a02f
Merge pull request #142 from vjeux/minimize_quotes
...
Minimize string escapes
2017-01-12 13:39:17 -05:00
Christopher Chedeau
291440b730
Support method generics on babylon parser
...
This is working on the flow parser but not babylon
```js
echo 'class C<T> { submit<T>() { } }' | ./bin/prettier.js --stdin
class C<T> {
submit<T>() {}
}
```
2017-01-12 07:48:26 -08:00
Christopher Chedeau
afca3d7e7a
Minimize string escapes
...
If there you are opting in for double quote but there's a string with a double quote in it, it's better to swap to a single quote to avoid having too many `\`. Note that if there are both single and double quotes in the string, we should use the default string instead.
Fixes #139
2017-01-12 07:44:16 -08:00
James Long
d25881530f
Merge pull request #126 from vjeux/jsx_quotes
...
Always use double quotes for JSX and properly escape
2017-01-12 10:30:42 -05:00
James Long
d2318cf283
Merge pull request #128 from stakodiak/patch-1
...
Fix typo in README.
2017-01-12 10:30:02 -05:00
James Long
809aabc3bd
Merge pull request #133 from vjeux/generic_babylon
...
Support type annotation for rest argument on babylon parser
2017-01-12 10:28:57 -05:00
James Long
d5a27090e4
Merge pull request #138 from tjefferson08/tj_no_infc_decf
...
Emacs library fix: use `setq' instead of `infc' and `decf'
2017-01-12 10:26:58 -05:00
James Long
00fbf8c1bf
Merge pull request #153 from jlongster/tweak-test-runner
...
Fix old name reference in tests_config
2017-01-12 10:14:58 -05:00
James Long
62bfdcd65a
Fix old name reference in tests_config
2017-01-12 10:09:13 -05:00
James Long
ea084dcd59
Merge pull request #125 from hzoo/update-deps
...
Update deps
2017-01-12 10:06:58 -05:00
James Long
6432034ed4
Merge pull request #148 from sapegin/patch-1
...
Add title and encoding to the REPL
2017-01-12 10:03:24 -05:00
James Long
1ccf6b0344
Merge pull request #90 from bakkot/property-names
...
Fix #79 : omit unnecessary quotes in property names
2017-01-12 09:11:36 -05:00
Artem Sapegin
7fee1588ae
Add title and encoding to the REPL
2017-01-12 13:59:32 +01:00
Travis Jefferson
0af65c6bc9
Use `setq' instead of `infc' and `decf'
...
It's more prolific!
2017-01-11 19:44:24 -06:00
Christopher Chedeau
35fb28bef2
Support type annotation for rest argument on babylon parser
...
This is working on the flow parser but not babylon
```js
echo 'function f(...flags: Array<boolean>) {}' | ./bin/prettier.js --stdin
function f(...flags: Array<boolean>) {}
```
2017-01-11 15:05:28 -08:00
Alex Stachowiak
c9c560bfef
Fix typo in README.
2017-01-11 12:48:07 -08:00
Henry Zhu
80f280d6a3
remove unused recast ref
2017-01-11 15:38:58 -05:00
Christopher Chedeau
a6cdede9f6
Always use double quotes for JSX and properly escape
...
JSX quotes are unfortunately using html escaping. Also, we should disregard the single-quote option for JSX quotes as we always want double quotes.
2017-01-11 11:40:24 -08:00
Henry Zhu
1b5c7b3a03
remove recast (not used)
2017-01-11 14:32:33 -05:00
Henry Zhu
eabc4005ce
update yarn.lock
2017-01-11 14:30:23 -05:00
James Long
be6e92f064
Merge pull request #122 from vjeux/browser
...
Add prettier-browser
2017-01-11 14:26:51 -05:00
James Long
3126e463d7
Merge pull request #124 from jlongster/mark-0.0.5
...
v0.0.5 -- Accidentally didn't push this commit out before others land…
2017-01-11 14:25:59 -05:00
James Long
b9cf404631
v0.0.5 -- Accidentally didn't push this commit out before others landed; 0.0.5 is actually based on commit faed09ceea
2017-01-11 14:09:30 -05:00
Christopher Chedeau
4685164faf
Add prettier-browser
...
This is a very handy way of playing out with prettier without having to install it. People have already been using it actively in the issues. Putting it directly inside of the repo would be better than on mine.
2017-01-11 10:56:23 -08:00
Kevin Gibbons
18f54005f6
Do not unquote string properties
2017-01-11 09:31:34 -08:00
James Long
0eda44405b
Merge pull request #119 from esbenp/add-visual-studio-code-plugin
...
add instructions for Visual Studio plugin
2017-01-11 12:11:04 -05:00
James Long
250d6d88dd
Merge pull request #109 from dinoboff/patch-1
...
chore: link prettier package to its github project
2017-01-11 12:09:23 -05:00
Esben Petersen
a673fc4e62
add instructions for Visual Studio plugin
2017-01-11 18:09:15 +01:00
James Long
b936c653c7
Merge pull request #117 from knowbody/patch-1
...
add gitter badge to readme
2017-01-11 12:02:39 -05:00
Mateusz Zatorski
57a73b8620
add gitter badge to readme
2017-01-11 17:01:02 +00:00
Damien Lebrun
477e745a78
chore: link prettier package to its github project
...
Add repository field to package.json, allowing the package page at npm to link to https://github.com/jlongster/prettier
2017-01-11 16:57:59 +00:00
James Long
c8f671236c
Merge pull request #116 from knowbody/remove-node-0-10-support
...
remove node 0.10 from travis config, add travis badge to readme
2017-01-11 11:57:19 -05:00
James Long
466d8509af
Update snapshots
2017-01-11 11:54:28 -05:00
Mateusz Zatorski
884bae1761
remove node 0.10 from travis config, add travis badge to readme
2017-01-11 16:48:45 +00:00
James Long
faed09ceea
Merge pull request #111 from knowbody/add-travis
...
add travis config and add yarn support
2017-01-11 11:36:16 -05:00
Mateusz Zatorski
6f0743e07d
fix italic in readme
2017-01-11 16:31:42 +00:00