Commit Graph

1779 Commits (49f578fb91a65104fd8342626dfb56077b8e1104)

Author SHA1 Message Date
Simon Lydell 32dfb80c86 Remove unnecessary fall-through comment 2017-09-13 18:21:04 +08:00
Simon Lydell be65370301 Remove reassignment in createOptionUsage 2017-09-13 18:21:04 +08:00
Simon Lydell 5d435abe0a Tweak option categories
- Move Format options first, since they feel the most important.
- Move --find-config-path to the Config category.
- Merge Command into Other. It wasn't clear what "Command" options are,
  and the Other category isn't too long anyway.
- Move --range-end and --range-start into Other. The aren't Format
  options.
2017-09-13 18:21:04 +08:00
Simon Lydell c99f7e2e38 Tweak option descriptions 2017-09-13 18:21:04 +08:00
Simon Lydell 602c2a2774 Rename detailOptions to detailedOptions 2017-09-13 18:21:04 +08:00
Simon Lydell 661c029036 Make createUsage a bit easier to read 2017-09-13 18:21:04 +08:00
Simon Lydell 4e5c808730 Fix typo in option description 2017-09-13 18:21:04 +08:00
Simon Lydell e060406df1 Update options config comment 2017-09-13 18:21:04 +08:00
Simon Lydell 2b9e1f80c5 Refactor option category grouping 2017-09-13 18:21:04 +08:00
Simon Lydell c2847d90cd Make ESLint catch category typos 2017-09-13 18:21:04 +08:00
Simon Lydell f53eab9b8d Make cli-util.js a bit more readable 2017-09-13 18:21:04 +08:00
Simon Lydell e192279218 Remove the other .splice in cli-util.js 2017-09-13 18:21:04 +08:00
Simon Lydell 1c6a881ed9 Remove one .splice in cli-util.js 2017-09-13 18:21:04 +08:00
Simon Lydell 79eaa5a6e1 Remove reassignment in createUsage 2017-09-13 18:21:04 +08:00
Simon Lydell 72132b4e97 Remove trailing whitespace in cli-constant.js 2017-09-13 18:21:04 +08:00
Stepan Burguchev fd937ec334 fix webstorm integration guide (#2796) 2017-09-13 12:06:49 +02:00
Simon Lydell 8ba2acadbb Make sure that shown playground Prettier version always is in sync 2017-09-12 22:17:06 +02:00
Simon Lydell 951aed47f6 Print playground AST with Prettier to make it easier to read 2017-09-12 22:17:06 +02:00
Simon Lydell 482a1d8311 Improve doc and ast editor appearance 2017-09-12 22:17:06 +02:00
Simon Lydell c08b70a0da Update playground service worker script caching 2017-09-12 08:03:10 +02:00
Lucas Azzola 3f74c45b91 Support graphql(schema, `query`) (#2781) 2017-09-11 20:18:11 +02:00
Simon Lydell d6eeaae29b Fix some playground HTML errors and warnings 2017-09-11 19:59:03 +02:00
Simon Lydell cdb7c0d4e3 Set playground Codemirror mode based on parser 2017-09-11 19:55:15 +02:00
Simon Lydell a768740945 Update issue template 2017-09-11 19:28:17 +02:00
Simon Lydell 1827d65d93 Add a "Copy as markdown" button to the playground 2017-09-11 19:27:56 +02:00
Lucas Duailibe f51929e262 Lint fix 2017-09-10 15:00:52 -06:00
Lucas Duailibe 902f7f0339 Use same logic for binary chain 2017-09-10 15:00:52 -06:00
Lucas Duailibe 1b2127efb6 Update snapshot 2017-09-10 15:00:52 -06:00
Lucas Duailibe bd78572b19 Break closing paren of ConditionalExpression in member chains 2017-09-10 15:00:52 -06:00
ikatyang 2ec2ff9f9d refactor: replace `getDetailOption()` with `detailOptionMap` 2017-09-11 00:48:05 +08:00
ikatyang a62be6a1d5 refactor: add `getDetailOption()` 2017-09-11 00:45:07 +08:00
ikatyang b4ed4d1ffb refactor: remove `hidden`, display option usage only if (opposite-)description existed 2017-09-11 00:24:03 +08:00
长天之云 df5482008e fix(prettierignore): support absolute filename (#2783) 2017-09-10 18:21:56 +02:00
ikatyang d6a1474901 refactor: replace `no-option` with `oppositeDescription` 2017-09-11 00:09:14 +08:00
Ika 8b02f702d5 fix(build): update ISSUE_TEMPLATE version regex to work as intended (#2785) 2017-09-10 17:37:07 +02:00
Lucas Duailibe 955a2c1472 Keep conditional expressions in one line on method chains (#2784)
Fixes #2775.

This commit will make conditional expressions to match the behavior of
logical expression in method chains:

```js
(a ? b : c).map()

// if the conditional fits in oneline
(a ? b : c)
  .map()

// if the conditional doesn't fit
(a
  ? b
  : c)
  .map()
```
2017-09-10 08:34:55 -07:00
ikatyang 3fa11984e9 refactor: use standard `// fall through` 2017-09-10 23:26:13 +08:00
Lucas Duailibe bba7dcf498 Fix break on conditional expressions inside return
Fixes #2777

Since we can't break after `return` and don't add `()` around
ConditionalExpressions' tests, we end up with some weird indentation when
breaking.
2017-09-10 04:13:47 -06:00
ikatyang 4c9763c530 docs: fix typo 2017-09-10 16:39:43 +08:00
ikatyang 1a4aac8f9b refactor: put `no-option` after `option` 2017-09-10 14:10:42 +08:00
ikatyang 0c3fe2bc9f refactor: sort category 2017-09-10 13:45:18 +08:00
ikatyang b9bc54aab6 refactor: adjust category 2017-09-10 13:37:21 +08:00
ikatyang b51135d9fd refactor: add explaining for each of the properties 2017-09-10 13:29:18 +08:00
ikatyang 0f9bb5b971 refactor: rename `formatOption` with `forwardToApi` 2017-09-10 12:32:15 +08:00
ikatyang eaafbb77aa refactor: adjust warning message 2017-09-10 12:17:33 +08:00
ikatyang 46a4cac617 refactor: pick format option from detailOptions 2017-09-10 12:11:32 +08:00
Ika 3db840258b chore(build): update ISSUE_TEMPLATE.md before publish (#2776) 2017-09-09 23:39:11 +10:00
ikatyang fabba20900 refactor: fix typo 2017-09-09 16:41:28 +08:00
ikatyang 4d4d8e3f4e refactor: normalizeArgv without using getter 2017-09-09 13:38:28 +08:00
ikatyang a7f595ca3e refactor: move createUsage to util 2017-09-09 12:40:55 +08:00