Ika
445b4afc73
docs(readme): travis master badge ( #3666 )
2018-01-07 20:06:25 +11:00
Ika
dbe0758b48
chore: shorten filename ( #3636 )
...
Context: https://github.com/prettier/prettier/pull/3627#issuecomment-354935942
2018-01-02 23:48:46 -05:00
Ika
a627ca7b5d
docs: minor tweaks ( #3627 )
...
* docs(blog): replace `:emoji:` with `${emoji}`
* docs(blog): move images to assets
* docs(index): move images to assets
* docs(index): fix typo
2018-01-03 00:04:22 +08:00
Ika
6c0dd74518
feat(support-info): add options field ( #3433 )
...
* refactor: rename supportTable with supportLanguages
* refactor: use `dedent`
* test: reduce unnecessary data
* feat(support-info): add `options` field
* add `showDeprecated` option
* add `showUnreleased` option
* test: snapshot diff
* fix(support): add missing `since`
* fix: add missing `category`
* refactor: use template tag
* fix: `trailingComma:true` should redirect to `trailingComma:es5`
* refactor: reorder parser
* refactor: fix linting
* refactor: move options
* refactor: move options to printers
2017-12-31 15:34:37 +11:00
Ika
8a86c0cc9f
fix(playground): fix report version ( #3614 )
2017-12-31 12:12:56 +11:00
Ika
6872ed8310
fix(markdown): replace newlines with hardlines in multiparser ( #3611 )
...
* test: add failing test
* fix(markdown): replace newlines with hardlines in multiparser
2017-12-30 10:33:58 -05:00
Ika
0af436cd47
fix(playground): use prVersion ( #3613 )
2017-12-31 00:54:36 +11:00
Ika
47f05d12f5
docs(changelog): fix typo ( #3420 )
2017-12-06 13:20:01 +08:00
Ika
e09359d242
fix(doc-printer): no wrong function call ( #3401 )
2017-12-05 20:09:36 +08:00
Ika
f3e7ca2210
chore(playground): add new options ( #3350 )
2017-12-05 21:22:10 +11:00
Ika
1122701053
fix(doc-printer): respect indent/align order ( #3383 )
2017-12-05 08:59:27 +11:00
Ika
c1623d88e6
feat(markdown): preserve break style ( #3325 )
2017-12-03 15:02:13 +11:00
Ika
073c0b16d8
feat(markdown): add proseWrap: "preserve" option ( #3340 )
...
* test: add test case
* feat(markdown): add `proseWrap: "preserve"` option
* test: add tests
* docs(options): update `proseWrap`
* feat(markdown): change default to `proseWrap: "preserve"`
BREAKING CHANGE
* docs(options): update `proseWrap`
* test: specify option explicitly
* Fix lint after merge
* Fix error after merge
2017-12-02 09:48:40 +11:00
Ika
23c306c8a0
docs(index): fix links on GitHub ( #3367 )
2017-12-01 10:59:17 +08:00
Ika
7670024292
fix(markdown): do not break before special prefix ( #3347 )
2017-11-30 08:43:22 +11:00
Ika
fbbfa52517
fix(markdown): do not print linebreaks in heading ( #3343 )
2017-11-29 22:13:38 +11:00
Ika
ac3f74e7a3
docs(options): add available version for arrow-parens ( #3339 )
2017-11-29 00:20:26 +08:00
Ika
9b4ecec183
fix(markdown): preserve non-breakable whitespaces ( #3327 )
2017-11-27 19:37:52 +11:00
Ika
1c9ee6c5a7
chore(website): ignore <!-- prettier-ignore --> before passing into Docusaurus ( #3326 )
...
prettier-ignore -->` before passing into Docusaurus
2017-11-27 19:32:20 +11:00
Ika
a1d878acc7
fix(cli): respect --ignore-path when using --stdin-filepath ( #3309 )
2017-11-23 21:54:04 +11:00
Ika
76efb33e75
chore: setup markdown formatting ( #3224 )
...
* chore(deps): upgrade prettier to v1.8.2
* chore: setup lint-docs script
* docs: add `<!-- prettier-ignore -->`s
* docs: format docs
* Revert "docs: format docs"
This reverts commit 6dba903987dddc498cb589ca311905f25b6aee53.
* chore(prettierrc): set `--no-prose-wrap`
* docs: format docs
* Revert "docs: format docs"
This reverts commit 139bd744b6921916be8fac4fa3bab83bae5d12df.
* docs: tweak
* docs: format docs
* chore: rename .prettierrc
* chore: rename back to .prettierrc
* chore: split out third-party
* refactor: fix linting
* chore: do not split out third-party on website
2017-11-22 22:27:40 +11:00
Ika
d5a3abd7a6
fix(markdown): only indent the first non-list node in checkbox list item ( #3297 )
...
* fix(markdown): do not indent checkbox
* fix: keep alignment for first non-list node
* fix: force whitespaces
2017-11-22 00:01:59 +08:00
Ika
3cbbac3d08
fix(multiparser): fix markdown error and remove trailing new line ( #3293 )
2017-11-21 00:19:49 +08:00
Ika
b6f126eb29
feat(markdown): support TOML ( #3290 )
2017-11-19 17:38:25 +11:00
Ika
378cfee508
refactor(markdown): expose hasPunctuation to AST for better debugging ( #3272 )
...
* refactor(markdown): extract `punctuationRegex`
* refactor: expose `has(Leading|Trailing)Punctuaion` to AST for better debugging
* refactor: tweak
* refactor: tweak
* fix: no regression
* test: fix typo
2017-11-16 13:59:01 +08:00
Ika
b6b601815c
docs(webstorm): improve image urls ( #3261 )
2017-11-14 18:37:15 +11:00
Ika
5820ec1e11
chore(website): fix logo filename ( #3258 )
2017-11-13 21:50:27 +08:00
Ika
d08df0b221
fix(markdown): handle punctuation variants ( #3254 )
...
* fix(markdown): handle punctuation variants
* docs: add comment
2017-11-13 00:09:04 +08:00
Ika
bddbd1914d
fix(markdown): no extra whitespace between ascii punc and CJK char ( #3249 )
...
* fix(markdown): no extra whitespace between ascii punctuation and CJK character
* test: update snapshot
2017-11-12 00:38:18 +08:00
Ika
4ae52c5aa6
fix(markdown): do not enable splitText in inlineCode ( #3243 )
2017-11-12 00:29:59 +08:00
Ika
1cde865a11
fix(markdown): no extra whitespace between non-cjk and cjk-punctuation ( #3244 )
...
* fix(markdown): no extra whitespace between non-cjk and cjk-punctuation
* fix: no node v4 unsupported feature
2017-11-12 00:08:24 +08:00
Ika
4c6a7e8749
fix(markdown): escape all emphasis-like text ( #3246 )
...
* fix(markdown): escape all emphasis-like text
* test: add test case
2017-11-12 00:07:58 +08:00
Ika
92459047ed
fix(markdown): force print spaces ( #3225 )
2017-11-11 15:05:07 +08:00
Ika
49f578fb91
fix(markdown): do not break inlineCode ( #3230 )
2017-11-11 12:50:40 +08:00
Ika
ed0f91f7be
feat(playground): add options ( #3222 )
...
* chore(playground): add options
* chore(playground): re-reorder options
2017-11-09 22:30:38 +11:00
Ika
adabed2c3f
chore(playground): add ruler for inputEditor ( #3221 )
2017-11-09 21:08:50 +11:00
Ika
ec15405e56
docs(editors): sort alphabetically ( #3219 )
2017-11-09 21:07:50 +11:00
Ika
c37e7fae2a
docs(options): add note for available version ( #3217 )
2017-11-09 13:39:07 +08:00
Ika
7fb8e3fe43
fix(markdown): no break on link ( #3204 )
...
* fix(markdown): link/image url head is breakable
* fix(markdown): no break on link
2017-11-09 08:19:35 +11:00
Ika
9652ad75f8
docs(website): fix link ( #3206 )
2017-11-09 00:49:39 +08:00
Ika
4f1a2c4108
feat(markdown): add --no-prose-wrap option ( #3199 )
...
* feat(markdown): add `--no-prose-wrap` option
* refactor: fix typo
* refactor: fix typo
* refactor: reduce duplicate code
* docs: mention the option is for markdown
2017-11-08 21:01:06 +11:00
Ika
a1e3181340
refactor(markdown): simplify regex ( #3194 )
...
* refactor(markdown): simplify regex
* fix: check exact string for heading
2017-11-08 02:46:32 +08:00
Ika
ec7eced099
test: lowercase the test file to avoid cross platform issue ( #3189 )
2017-11-07 22:07:01 +08:00
Ika
18345817d8
fix(markdown): allow more cases that _-style emphasis is available ( #3186 )
...
* fix(markdown): add more cases `_`-style emphasis is available
* refactor: fix naming style
2017-11-07 23:33:29 +11:00
Ika
ffd198beaa
fix(markdown): handle additional spaces before code ( #3180 )
...
* fix(markdown): handle additional spaces before `code`
* test: update snapshots
* fix: ignore leading `\n` from indented `code`
* docs: add comment
2017-11-07 22:25:20 +11:00
Ika
9d616817be
fix(markdown): do not break on unbreakable place ( #3177 )
2017-11-07 21:10:41 +11:00
Ika
2bdb652667
fix(markdown): do not break before special prefix ( #3172 )
...
* fix(markdown): do not break before special prefix
* fix: add more cases
2017-11-07 20:40:09 +11:00
Ika
76ee59a191
chore(deps): update prettier to 1.8.0 ( #3167 )
...
* chore(deps): update prettier to 1.8.0
* refactor: fix linting
2017-11-07 16:42:38 +08:00
Ika
1d4848b37c
chore(deps): upgrade patch-level dependencies ( #3153 )
...
* chore(deps): update jest-docblock to 21.3.0-beta.7
* chore(deps): upgrade patch-level dependencies
* test: update snapshot
2017-11-07 00:38:37 +11:00
Ika
ec8deb6c0b
fix(markdown): print ----style thematic break ( #3148 )
...
* fix(markdown): print `---`-style thematic break
* test: fix diff
2017-11-05 20:50:10 +11:00
Ika
11d7213862
test(markdown): rename test case to avoid confusing ( #3086 )
2017-10-23 09:49:13 +08:00
Ika
c27cc7ff45
feat(markdown): support CJK and emoji ( #3026 )
...
* refactor: extract `splitText`
* fix: respcet CJK width in table
* test: add failing test
* fix: support emoji
* test: add failing test
* feat: support CJK character
* feat: enable adding whitespace between non-CJK/CJK-character by default
* fix: do not print softline at node that is sensitive to its identifier
* fix: treat full-width whitespace as CJK punctuation
* disallow leading/trailing full-width whitespace
* feat: remove `--split-cjk-text` option and enable it by default
* refactor: simplify regex and remove unnecessary `g` flag
2017-10-14 23:57:31 -05:00
Ika
c3b965145b
feat(markdown): auto-detect which number style of ordered list to be used ( #3029 )
2017-10-14 22:53:58 +11:00
Ika
c4118edbe7
fix(markdown): print auto-link as-is ( #3032 )
2017-10-14 22:49:12 +11:00
Ika
5c789b2dfc
fix(markdown): use the most popular unordered list style ( #3027 )
2017-10-14 22:41:25 +11:00
Ika
2ef879f20d
feat(cli): add --loglevel option ( #2992 )
...
* feat(cli): add `--loglevel` option
* fix: handle error from invalid option
* fix: choice value and shouldLog logic
* test: fix test cases
* fix: change log style
* test: truncate snapshots
* test: reduce duplicate code
* test: use patterns instead of snapshots
* test: fix regex
2017-10-13 20:17:01 -05:00
Ika
f009a96ae4
fix(doc-printer): use string-width ( #3015 )
...
* refactor(doc-printer): use `string-width`
* test: add test case
2017-10-12 02:27:02 -05:00
Ika
9f6f3e7355
feat: support markdown ( #2943 )
...
* feat(markdown): inital implementation
* feat(markdown): support strong
* fix: add missing default value
* feat(markdown): support inlineCode
* feat: support delete
* feat: support link
* feat: support image
* feat: support blockquote
* feat: support heading
* feat: support code
* feat: support yaml
* feat: support html
* feat: support list
* feat: support thematicBreak
* feat: support table
* feat: support linkReference
* feat: support imageReference
* feat: support definition
* feat: support footnote
* feat: support footnoteReference
* feat: support footnoteDefinition
* test(cli): update snapshots
* refactor: extract SINGLE_LINE_NODE_TYPES
* refactor: printChildren
* fix: correct newlines
* test: add trailing newline
* fix: blockquote formatting
* fix: node types
* fix: break line correctly
* fix: remove unnecessary properties to make AST_COMPARE happy
* fix: escape `|` in tableCell content
* fix: unexpected line break
* fix: ast difference from loose list
* fix: html break lines
* refactor: fix linting
* fix: normalize ast
* fix: escape specific chars
* test: add more tests
* fix: build markdown parser
* chore: remove unnecessary *.log
* fix: escape html entity
* feat: support prettier-ignore
* fix: line break for non-loose listItem
* feat: support formatting `code` based on `lang`
* fix: add `jsx` and `tsx`
* fix: use multiparser
* refactor: fix linting
* test: update test case 😉
* feat: switch to `_` style emphasis
* fix: sequence list should use different prefix
* test: add tests
* fix: do not print additional new line after `prettier-ignore`
* fix(list): enforce `1.` to avoid unnecessary git diff
* feat: enable `commonmark` option
* feat: support `break`
* fix: escape backslash
* refactor: escape html entity using backslash
* fix: respect autolink-style link
* feat: support md`...` and markdown`...`
* docs: replace ands with commas
* fix: respect indented code block
* fix: respect html entity
* docs: add docs for modified MDAST
* fix: inlineCode is breakline-able
* feat: support backtick in inlineCode
* feat: support a-lot-of-backtick in fenced code block
* feat: use `~~~`-style code block in js template
* fix: respect escaped chars
* fix: use `*`-style emphasis for invalid `_`-style output
* test: add test cases
* fix: use `- - -`-style thematicBreak to avoid conflict with yaml
* fix: remain the same content for linkReference identifier
* fix: `inlineCode` gap can be a line break
* fix: `html` should not print trailing spaces if it's in root
* refactor: fix typo
* fix: wrap `definition`'s url if there's whitespace
* fix: remove unnecessary whitespace at the end of paragraph
* fix: fix: remove unnecessary whitespace at the start of paragraph
* fix: setence children length is possible 0
* fix: support continuous ordered list
* fix: do not print addtional hardline after loose list
* fix: use double-backtick style for single-backtick value in inlineCode
* fix: support nested emphasis
* fix: support space-url in link/image
* fix: escape `)` in link/image url
* fix: support single-quote in link/image/definition title
* fix: respect alt in image/imageReference
* fix: use `*`-style thematicBreak in list
* fix: loose/tight list linebreaks
* fix: print third linebreak before indented code block with a tight list in the previous
* test: move bug cases
* fix: remove unnecessary linebreaks
* refactor: fix typo
2017-10-12 09:46:44 +11:00
Ika
f7907b9282
fix(doc-printer): respect CJK width ( #3003 )
...
* test: add failing test
* fix(doc-printer): respect CJK width
2017-10-11 00:32:45 -05:00
Ika
abc3b12c5e
docs(readme): fix description for filePath in prettier.resolveConfig ( #3007 )
2017-10-11 15:57:57 +11:00
Ika
6c8cde9672
fix(cli): do not early exit for --debug-check ( #2987 )
...
* test: add failing test
* fix(cli): do not early exit for `--debug-check`
2017-10-07 04:36:43 -05:00
Ika
d9737e6ffa
test: fix snapshots ( #2957 )
...
* test: trigger test to check its status
* test: update snapshots
* refactor: use strip-ansi
2017-10-02 19:56:34 +02:00
Ika
7770356a51
test(integration): update title and catch all outputs ( #2951 )
2017-10-02 18:08:34 +02:00
Ika
26254ece0f
chore(deps): pin dependencies ( #2953 )
2017-10-02 17:58:21 +02:00
Ika
c7f9bb5731
chore(deps): update cosmiconfig to v3.1.0 ( #2952 )
2017-10-02 13:01:32 +11:00
Ika
0d756080b5
fix: ignore and show warning for unknown option from config file ( #2929 )
2017-09-28 19:59:32 +02:00
Ika
70f5165bb1
fix(typescript): allow symbol type ( #2899 )
2017-09-26 12:34:31 +10:00
Ika
630ea58a50
refactor: use custom error ( #2896 )
2017-09-25 21:11:27 +02:00
Ika
4435ecbc7b
fix(cli): validate options for every config-precedence ( #2894 )
...
* fix(cli): validate options for every `config-precedence`
* refactor: use camelcase
* refactor: reduce duplicate code
* refactor: rename function
* refactor: rename parameter
2017-09-25 21:04:25 +02:00
Ika
d0a622ffa8
fix: do not print stack trace for invalid option ( #2895 )
...
* fix: do not print stack trace for invalid option
* refactor: use ConfigError
2017-09-25 20:42:56 +02:00
Ika
184e368a9a
feat: support detailed --help ( #2847 )
...
* feat: support detailed --help
* refactor: put alias first, separate with comma
* feat: support detailed --help for --no-option
* docs: add missing type
* docs: remove `This requires node 8 or a transform`
* docs: remove config-precedence's choice descriptions in option.description
* docs: replace `option-name` with `flag`
* docs: update docs for `choices`
* docs: update `help` description
* docs: update error message
* docs: replace `undocumented` with empty string
* refactor: extract `getOptionDefaultValue`
* refactor: dynamically generate `defaults to ...`
* refactor: extract `getOptionWithLevenSuggestion`
* refactor: extract `createChoiceUsages`
* refactor: remove `optionTitleName`
* test: add `--help` tests for all options
* fix: handle `--help --help`
* feat: support `--help <alias>`
* refactor: use `flattenArray`
* feat: handle `--help <unknown>`
* docs: add description for `semi`, `color` and `bracket-spacing`
* fix: remove unnecessary option in `--help`
2017-09-21 07:54:13 +02:00
Ika
c100911bbc
chore(deps): pin cosmiconfig ( #2815 )
2017-09-14 19:10:55 +08:00
ikatyang
6fa30d9ccf
refactor(runPrettier): replace multi-.mockRestore() with jest.restoreAllMocks()
2017-09-14 13:23:10 +08:00
ikatyang
6f9da6441c
chore(deps): update jest-* to v21.1.0
2017-09-14 13:13:03 +08:00
ikatyang
b2a8f3ffce
Merge branch 'master' into refactor/cli
2017-09-14 12:49:07 +08:00
ikatyang
0bb7933bb1
refactor: move categoryOrder to cli-constant
2017-09-14 12:39:38 +08:00
ikatyang
7d7fb36499
docs: requirePragma: <bool>
2017-09-13 21:43:57 -06:00
Ika
71f5d185a7
docs(readme): port requirePragma docs to README.md ( #2812 )
...
* fix default value
2017-09-14 11:26:43 +08: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
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
ikatyang
3fa11984e9
refactor: use standard // fall through
2017-09-10 23:26:13 +08: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
ikatyang
82eaadc03a
refactor: remove unnecessary code
2017-09-09 12:09:43 +08:00
ikatyang
97100c42c4
test(integration): add tests for cursor-offset
2017-09-09 12:06:50 +08:00
ikatyang
6ab8edafd5
test: add tests
2017-09-09 11:49:22 +08:00
ikatyang
507545510f
refactor: add comment
2017-09-08 16:53:51 +08:00