Mikael Brevik
cbabefdb0f
Adds various prettier-browser changes ( #175 )
...
* Adds link to GH repo in title
* Adds popular keybindings (subl) to editor
* Changes theme to base16-dark to fit better with body bg
2017-01-13 17:14:48 -05:00
James Long
3713408871
Update live editor to 0.0.6
2017-01-13 15:40:22 -05:00
James Long
4ffdb0c43f
Improve CHANGELOG format again
2017-01-13 15:13:30 -05:00
James Long
2ab030b1d2
Fix CHANGELOG format
2017-01-13 15:10:21 -05:00
James Long
7e3161096b
v0.0.6
2017-01-13 15:09:37 -05:00
James Long
3af7da5748
Reprint all the files!
2017-01-13 15:03:53 -05:00
James Long
6be89286bb
Wrap ForStatement in a block for const decls ( #172 )
2017-01-13 14:57:46 -05:00
Vu Tran
b429b2443c
include index.js in format:all script ( #132 )
2017-01-13 14:23:07 -05:00
Alex Rattray
47102bc3ef
Add regression tests for long JSX Expression contents
2017-01-13 14:22:49 -05:00
Alex Rattray
4fe16bda4d
Multiline JSX opening tag breaks children out too (for #73 )
2017-01-13 14:22:49 -05:00
Alex Rattray
2e1e6eece2
JSX maintains spaces that matter ( fixes #30 and thus part of #73 )
2017-01-13 14:22:49 -05:00
Alex Rattray
b09a02084f
Break JSXOpeningElement between attributes ( fixes #15 )
2017-01-13 14:22:49 -05:00
Alex Rattray
d91a28ef81
Wrap Stateless JSX Arrow Functions and Assignment in Parens (fixes part of #73 )
2017-01-13 14:22:49 -05:00
James Long
31a07feb84
Remove leftover `arrowParensAlways` option ( #171 )
2017-01-13 14:18:42 -05:00
Travis Jefferson
0b70a0f2a3
Numeric literal callees should keep parens ( #141 )
...
* Numeric literal callees should keep parens
* Remove isNumber check
2017-01-13 14:01:21 -05:00
Christopher Chedeau
df99ae56b0
Add test for shebang and move to index.js ( #170 )
...
When looking into adding a test, I realized that the logic was inside of bin/prettier.js and therefore only applying to the cli. Moving it to index.js and adding a test so that it's more robust :)
2017-01-13 13:39:07 -05:00
Rogelio Guzman
ec5b0f7c76
Fix for Node 4
2017-01-13 13:25:13 -05:00
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