Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(blog): 1.15 release #5296

Merged
merged 104 commits into from Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
8fe4dff
docs(blog): 1.15 release draft
ikatyang Oct 25, 2018
34ae239
docs: add placeholder for #5290
ikatyang Oct 25, 2018
63a8ebd
docs: add placeholder for #5244
ikatyang Oct 25, 2018
49948c0
docs: add placeholder for #5251
ikatyang Oct 25, 2018
f3a3df9
docs: add placeholder for #5303
ikatyang Oct 26, 2018
d457ca3
Describe my PRs
j-f1 Oct 26, 2018
a33da78
Format!
j-f1 Oct 26, 2018
97f7c38
Case (#2)
lipis Oct 26, 2018
b944ad5
Group languages
lipis Oct 26, 2018
04577e0
docs: add placeholder for #5304
ikatyang Oct 27, 2018
635c802
docs: add description for HTML/Vue/Angular
ikatyang Oct 28, 2018
9ff013e
docs: update options
ikatyang Oct 30, 2018
777d853
style: fix linting
ikatyang Oct 30, 2018
866e963
docs: add TODOs
ikatyang Oct 30, 2018
ebc16d0
docs: add description for MDX
ikatyang Oct 30, 2018
e2a7def
docs: add description
ikatyang Oct 30, 2018
dbf03a5
docs: add description
ikatyang Oct 30, 2018
e7b7ff5
docs: add description
ikatyang Oct 30, 2018
911b43f
docs: add description
ikatyang Oct 30, 2018
7d5dc51
docs: add description
ikatyang Oct 30, 2018
5a5c91e
docs: add description
ikatyang Oct 30, 2018
e52dfb8
docs: add missing `<!-- prettier-ignore -->`
ikatyang Oct 30, 2018
5d8a951
docs: add description
ikatyang Oct 31, 2018
678ca36
docs: add description
ikatyang Oct 31, 2018
2524990
docs: add prettier-ignore
ikatyang Oct 31, 2018
b912bcc
docs: add description
ikatyang Oct 31, 2018
8dc7318
docs: add description
ikatyang Oct 31, 2018
145e1f7
docs: add description
ikatyang Oct 31, 2018
c3391ec
docs: add description
ikatyang Oct 31, 2018
1510a62
docs: add description
ikatyang Oct 31, 2018
8e5c22f
docs: add description
ikatyang Oct 31, 2018
8e559f1
docs: add description
ikatyang Oct 31, 2018
b3b57c8
docs: add description
ikatyang Oct 31, 2018
5fd1c6b
docs: add description
ikatyang Oct 31, 2018
6499621
docs: add descriptions
ikatyang Oct 31, 2018
b9ff12d
docs: add description
ikatyang Oct 31, 2018
99dce93
docs: colorful cli demo
ikatyang Oct 31, 2018
fe46ed5
docs: add description
ikatyang Oct 31, 2018
635e062
docs: add description
ikatyang Oct 31, 2018
a0c47b1
docs: consistent title
ikatyang Oct 31, 2018
b066fea
docs: merge items
ikatyang Oct 31, 2018
c7befd4
docs: add description
ikatyang Oct 31, 2018
4ebe4ce
docs: add description
ikatyang Oct 31, 2018
3541da9
docs: add description
ikatyang Oct 31, 2018
c1216a6
docs: add description
ikatyang Oct 31, 2018
6f955c4
docs: add description
ikatyang Oct 31, 2018
fafc916
docs: add description
ikatyang Oct 31, 2018
fd639de
docs: add description
ikatyang Oct 31, 2018
8dc930a
docs: add description
ikatyang Oct 31, 2018
fa22499
docs: add description
ikatyang Oct 31, 2018
deca40d
docs: add description
ikatyang Oct 31, 2018
41fea68
docs: add description
ikatyang Oct 31, 2018
b25ae8c
docs: add description
ikatyang Oct 31, 2018
da2c942
docs: add description
ikatyang Oct 31, 2018
16360b2
docs: add description
ikatyang Oct 31, 2018
9e23584
docs(ignore): add HTML
ikatyang Nov 1, 2018
5d525c3
docs: add description
ikatyang Nov 1, 2018
4201921
docs: add description
ikatyang Nov 1, 2018
a32a694
docs: add description
ikatyang Nov 1, 2018
1630c75
docs: add description
ikatyang Nov 1, 2018
996845d
docs: add description
ikatyang Nov 1, 2018
9aa630e
docs: add description
ikatyang Nov 1, 2018
aa4029d
docs: add description
ikatyang Nov 1, 2018
d5e454f
docs: add description
ikatyang Nov 1, 2018
244f6b3
docs: add description
ikatyang Nov 1, 2018
0c7d474
docs: add description
ikatyang Nov 1, 2018
95d2d06
Merge branch 'master' into docs/blog-1.15
ikatyang Nov 1, 2018
6b97643
docs: add description
ikatyang Nov 1, 2018
1a7a86f
docs: add description
ikatyang Nov 1, 2018
9af3e81
docs: add TODOs
ikatyang Nov 2, 2018
3f41901
docs: add description
ikatyang Nov 3, 2018
326504c
docs: add description
ikatyang Nov 3, 2018
3f4d5b3
docs: reorder
ikatyang Nov 3, 2018
088b0e6
docs: add description
ikatyang Nov 3, 2018
9a088f4
docs: add description
ikatyang Nov 3, 2018
5a1634a
Remove U+0008 BACKSPACE characters from 1.15 blog post
lydell Nov 3, 2018
96fd630
docs: add description
ikatyang Nov 3, 2018
25602f7
Merge branch 'docs/blog-1.15' of https://github.com/ikatyang/prettier…
ikatyang Nov 3, 2018
f75dcc8
docs: add missing prettier-ignore
ikatyang Nov 3, 2018
0e1401c
docs: add missing reference
ikatyang Nov 3, 2018
2a79f19
docs: add description for JSX splitting fix PR
lydell Nov 3, 2018
99548b9
docs: add summary
ikatyang Nov 3, 2018
951608c
Merge branch 'docs/blog-1.15' of https://github.com/ikatyang/prettier…
ikatyang Nov 3, 2018
3fbb849
docs: update item title
ikatyang Nov 3, 2018
d1ca6b5
docs: remove unnecessary newlines
ikatyang Nov 3, 2018
1f2d20d
docs: add references for regression fixes
ikatyang Nov 4, 2018
00506cc
docs: tweak wording
ikatyang Nov 4, 2018
c040bf3
Tweak wording and syntax highlighting
j-f1 Nov 4, 2018
c27fdfb
docs: fix linting
ikatyang Nov 4, 2018
da7216a
docs: add description for #4798
ikatyang Nov 4, 2018
3f35cda
docs: add thanks
ikatyang Nov 4, 2018
e8a134b
Final wording tweaks
j-f1 Nov 4, 2018
ce8d395
Proofread blog post and fix grammar issues
suchipi Nov 5, 2018
21ef4a1
Fix prettier issue
suchipi Nov 5, 2018
90beb63
docs: update thanks
ikatyang Nov 5, 2018
833268f
Merge branch 'master' into docs/blog-1.15
ikatyang Nov 5, 2018
652a1d3
chore(playground): remove temporary workaround for #5345
ikatyang Nov 5, 2018
6719f97
Merge branch 'master' into docs/blog-1.15
ikatyang Nov 6, 2018
444e9ea
docs: add description for #5327
ikatyang Nov 6, 2018
cb717ad
fix minor typos
existentialism Nov 6, 2018
60e8682
docs: update blog post date
ikatyang Nov 6, 2018
f74dc4c
docs: update for #5356
ikatyang Nov 6, 2018
d16895a
Merge branch 'master' into docs/blog-1.15
ikatyang Nov 6, 2018
7c2142d
docs: update thanks
ikatyang Nov 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-hooks.yaml
Expand Up @@ -3,4 +3,4 @@
entry: prettier --write
language: node
# From https://github.com/prettier/prettier/blob/7a7eb170/docs/index.md
files: \.(css|less|scss|ts|tsx|graphql|gql|json|js|jsx|md)$
files: \.(css|less|scss|ts|tsx|graphql|gql|json|js|jsx|md|html|vue)$
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -11,7 +11,9 @@
· SCSS
· Less
· JSX
· HTML
· Vue
· Angular
· GraphQL
· JSON
· Markdown
j-f1 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 1 addition & 1 deletion docs/language-support.md
Expand Up @@ -7,6 +7,6 @@ Prettier attempts to support all JavaScript language features, including non-sta

All of JSX and Flow syntax is supported. In fact, the test suite in `tests/flow` _is_ the entire Flow test suite and they all pass.

Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, [Less](http://lesscss.org/), [SCSS](http://sass-lang.com), [Vue](https://vuejs.org/), [JSON](http://json.org/), [GraphQL](http://graphql.org/), [Markdown](http://commonmark.org), and [YAML](http://yaml.org/).
Prettier also supports [TypeScript](https://www.typescriptlang.org/), CSS, [Less](http://lesscss.org/), [SCSS](http://sass-lang.com), HTML, [Vue](https://vuejs.org/), [Angular](https://angular.io/), [JSON](http://json.org/), [GraphQL](http://graphql.org/), [Markdown](http://commonmark.org), and [YAML](http://yaml.org/).

The minimum version of TypeScript supported is 2.1.3 as it introduces the ability to have leading `|` for type definitions which prettier outputs.
25 changes: 20 additions & 5 deletions docs/options.md
Expand Up @@ -183,13 +183,12 @@ Valid options:
- `"json-stringify"` (same parser as `"json"`, but outputs like `JSON.stringify`) _Since v1.13.0_
- `"graphql"` (via [graphql/language](https://github.com/graphql/graphql-js/tree/master/src/language)) _Since v1.5.0_
- `"markdown"` (via [remark-parse](https://github.com/wooorm/remark/tree/master/packages/remark-parse)) _Since v1.8.0_
- `"vue"` (uses several parsers) _Since 1.10.0_
- `"mdx"` (via [remark-parse](https://github.com/wooorm/remark/tree/master/packages/remark-parse) and [@mdx-js/mdx](https://github.com/mdx-js/mdx/tree/master/packages/mdx)) _Since v1.15.0_
- `"html"` (via [angular-html-parser](https://github.com/ikatyang/angular-html-parser/tree/master/packages/angular-html-parser)) _Since 1.15.0_
- `"vue"` (same parser as `"html"`, but also formats vue-specific syntax) _Since 1.10.0_
- `"angular"` (same parser as `"html"`, but also formats angular-specific syntax via [angular-estree-parser](https://github.com/ikatyang/angular-estree-parser)) _Since 1.15.0_
- `"yaml"` (via [yaml](https://github.com/eemeli/yaml) and [yaml-unist-parser](https://github.com/ikatyang/yaml-unist-parser)) _Since 1.14.0_

<!-- TODO: Uncomment and move below "markdown" above when 1.15.0 is released.
- `"mdx"` (same parser as `"markdown"`, with some custom overrides) _Since 1.15.0_
-->

[Custom parsers](api.md#custom-parser-api) are also supported. _Since v1.5.0_

| Default | CLI Override | API Override |
Expand Down Expand Up @@ -263,3 +262,19 @@ Valid options:
| Default | CLI Override | API Override |
| ------------ | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `"preserve"` | <code>--prose-wrap <always&#124;never&#124;preserve></code> | <code>proseWrap: "<always&#124;never&#124;preserve>"</code> |

## HTML Whitespace Sensitivity

_available in v1.15.0+_
Copy link
Member

@j-f1 j-f1 Oct 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if these should be formatted differently (grammar-wise)? Perhaps:

First available in vX.X.X. Deprecated in vY.Y.Y

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there's a +, I guess it should be fine?


TODO

Valid options:

- `"css"` - Respect the default value of CSS `display` property.
- `"strict"` - Whitespaces are considered sensitive.
- `"ignore"` - Whitespaces are considered insensitive.

| Default | CLI Override | API Override |
| ------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| `"css"` | <code>--html-whitespace-sensitivity <css&#124;strict&#124;ignore></code> | <code>htmlWhitespaceSensitivity: "<css&#124;strict&#124;ignore>"</code> |
178 changes: 178 additions & 0 deletions website/blog/2018-10-00-1.15.0.md
@@ -0,0 +1,178 @@
---
author: Ika (@ikatyang)
authorURL: https://github.com/ikatyang
title: "Prettier 1.15: HTML, Vue, Angular and MDX Support"
---

TODO: update the blog post date

This release adds TODO.

<!--truncate-->

## Highlights
### HTML/Vue/Angular
#### Support HTML, Vue, and Angular ([#5259] by [@ikatyang])
<!--
- mention the previous hard working (@evilebottnawi and @azz)
- mention `--html-whitespace-sensitivity` (also link to options.md)
- magic comments
- mention difference between html/vue/angular parser
- custom elements can be self-closed in `vue` but not `html` and `angular`
- automatic parser inference (`.component.html` for angular)
- vue-specific syntax
- angular-specific syntax
- mention html`input` and /* HTML */ `input`
- mention angular inline template
-->
### MDX
#### Support MDX ([#4975] by [@ikatyang])
### JavaScript
#### Respect original text decorator order ([#5207] by [@duailibe])
#### Keep decorators inline if they were written inline ([#5188] by [@duailibe])
#### Print nested ternaries differently ([#5039] by [@suchipi])
#### Improved object-break heuristic ([#5205] by [@j-f1])
### JSX
#### fix: splitting jsx text correctly ([#5006] by [@yuliaHope])

## Other changes
### API/CLI
#### Infer via shebang ([#5149] by [@haggholm])
#### Add a new `trim` command to trim whitespaces in the current line ([#4772] by [@warrenseine])
#### refactor: move cli leven suggestion to options-normalizer ([#5057] by [@ikatyang])
#### refactor: extract options-normalizer/validator ([#5020] by [@ikatyang])
#### feat: add printer.preprocess ([#5041] by [@ikatyang])
#### fix(config): better error message for unsupported extension ([#4969] by [@ikatyang])
### JavaScript
#### Treat single-star comments as JSDoc ([#5206] by [@j-f1])
#### Add support for flow typecast comments ([#5280] by [@swac])
#### Break nested TSConditionalType ([#5272] by [@duailibe])
#### Correct parentheses for mixed exp/mod ([#5243] by [@bakkot])
#### Fix comment issue with try finally ([#5252] by [@aquibm])
#### Inline the arguments of an arrow function in the body is conditional expression ([#5209] by [@duailibe])
#### Fix printing of catch clause with a comment ([#5202] by [@duailibe])
#### Fix comment in variable declarator ([#5190] by [@duailibe])
#### Fix parens around ternary inside OptionalMemberExpression ([#5179] by [@existentialism])
#### Escape not just backticks but `${` as well in graphql tags ([#5137] by [@lydell])
#### fix(js): quote property name as es5 compatible ([#5157] by [@koba04])
#### fix(js) Break args when second arg is a ternary ([#5151] by [@onurtemizkan])
#### Add support for timeouts passed as integers to test functions ([#5085] by [@j-f1])
#### Format {before,after}{Each,All} calls like regular function calls ([#5011] by [@ericsakmar])
#### Bugfix/ Don't inline pipeline operator with leading ownline comment ([#5015] by [@flxwu])
#### Bugfix/ Leave Dangle Comments in NewExpression ([#5017] by [@flxwu])
#### remove redundant ASI protection for BindExpression ([#4970] by [@TitanSnow])
#### fix #4963: parens are incorrectly stripped in BindExpression ([#4964] by [@TitanSnow])
#### Fix ternary format in function call ([#4368] by [@malcolmsgroves])
#### verify the precedingNode type when handling import declaration comments ([#5016] by [@ericsakmar])
#### Fix Flow generic comment positioning ([#5290] by [@swac])
#### Fixed unstable while comment ([#5251] by [@jaideng123])
### JSX
#### Prevent JSX from breaking a logical expression chain ([#5092] by [@duailibe])
#### [unicode] Fix trailing nbsp ([#5165] by [@vjeux])
#### Keep simple JSXOpeningTag's unbroken ([#5078] by [@duailibe])
#### fix: no false positive for arrow function in jsx expression ([#5063] by [@ikatyang])
### Flow
#### Inline Generics with a single identifier ([#5066] by [@duailibe])
#### Fix flow extends not breaking out into new lines ([#5244] by [@aquibm])
#### Update flow parser to 0.84.0 ([#5303] by [@jbrown215])
### TypeScript
#### Add ASI protection for TSNonNullExpression ([#5262] by [@duailibe])
#### fix(typescript) Do not add extra semicolon to `TSMethodSignature` when `prettier-ignore` is used ([#5160] by [@onurtemizkan])
#### fix(typescript): no invalid parens for destructuring with default value ([#5096] by [@ikatyang])
#### fix(typescript): no-semi for class props with modifiers ([#5083] by [@ikatyang])
#### fix(typescript): add parens for complex nodes in ClassExpression ([#5074] by [@ikatyang])
#### fix(typescript): preserve necessary parens for TSOptionalType ([#5056] by [@ikatyang])
### CSS
#### fix(css): no wrong loc info caused by front matter ([#5103] by [@ikatyang])
### Markdown
#### fix(markdown): trailing spaces after front matters are allowed ([#5107] by [@ikatyang])
#### fix(markdown): do not add whitespaces between Latin and Hangul ([#5040] by [@ikatyang])
#### fix(markdown): preserve leading/trailing newlines in fenced code block ([#5038] by [@ikatyang])
#### fix(markdown): inline footnote def if there's only one 1-line paragraph ([#5025] by [@ikatyang])
#### fix(markdown): stably print lists in front of whitespace-only trailing newline ([#5024] by [@ikatyang])
#### feat(markdown): preserve math ([#5050], [#5220] by [@ikatyang])
### YAML
#### fix(yaml): escape quotes correctly ([#5236] by [@ikatyang])
#### fix(yaml): update parsers ([#5027] by [@ikatyang])
#### feat(yaml): prefer implicit key for empty value ([#4972] by [@ikatyang])

[@aquibm]: https://github.com/aquibm
[@bakkot]: https://github.com/bakkot
[@duailibe]: https://github.com/duailibe
[@ericsakmar]: https://github.com/ericsakmar
[@existentialism]: https://github.com/existentialism
[@flxwu]: https://github.com/flxwu
[@haggholm]: https://github.com/haggholm
[@ikatyang]: https://github.com/ikatyang
[@j-f1]: https://github.com/j-f1
[@jaideng123]: https://github.com/jaideng123
[@jbrown215]: https://github.com/jbrown215
[@koba04]: https://github.com/koba04
[@lydell]: https://github.com/lydell
[@malcolmsgroves]: https://github.com/malcolmsgroves
[@onurtemizkan]: https://github.com/onurtemizkan
[@suchipi]: https://github.com/suchipi
[@swac]: https://github.com/swac
[@TitanSnow]: https://github.com/TitanSnow
[@vjeux]: https://github.com/vjeux
[@warrenseine]: https://github.com/warrenseine
[@yuliaHope]: https://github.com/yuliaHope
[#4368]: https://github.com/prettier/prettier/pull/4368
[#4772]: https://github.com/prettier/prettier/pull/4772
[#4964]: https://github.com/prettier/prettier/pull/4964
[#4969]: https://github.com/prettier/prettier/pull/4969
[#4970]: https://github.com/prettier/prettier/pull/4970
[#4972]: https://github.com/prettier/prettier/pull/4972
[#4975]: https://github.com/prettier/prettier/pull/4975
[#5006]: https://github.com/prettier/prettier/pull/5006
[#5011]: https://github.com/prettier/prettier/pull/5011
[#5015]: https://github.com/prettier/prettier/pull/5015
[#5016]: https://github.com/prettier/prettier/pull/5016
[#5017]: https://github.com/prettier/prettier/pull/5017
[#5020]: https://github.com/prettier/prettier/pull/5020
[#5024]: https://github.com/prettier/prettier/pull/5024
[#5025]: https://github.com/prettier/prettier/pull/5025
[#5027]: https://github.com/prettier/prettier/pull/5027
[#5038]: https://github.com/prettier/prettier/pull/5038
[#5039]: https://github.com/prettier/prettier/pull/5039
[#5040]: https://github.com/prettier/prettier/pull/5040
[#5041]: https://github.com/prettier/prettier/pull/5041
[#5050]: https://github.com/prettier/prettier/pull/5050
[#5056]: https://github.com/prettier/prettier/pull/5056
[#5057]: https://github.com/prettier/prettier/pull/5057
[#5063]: https://github.com/prettier/prettier/pull/5063
[#5066]: https://github.com/prettier/prettier/pull/5066
[#5074]: https://github.com/prettier/prettier/pull/5074
[#5078]: https://github.com/prettier/prettier/pull/5078
[#5083]: https://github.com/prettier/prettier/pull/5083
[#5085]: https://github.com/prettier/prettier/pull/5085
[#5092]: https://github.com/prettier/prettier/pull/5092
[#5096]: https://github.com/prettier/prettier/pull/5096
[#5103]: https://github.com/prettier/prettier/pull/5103
[#5107]: https://github.com/prettier/prettier/pull/5107
[#5137]: https://github.com/prettier/prettier/pull/5137
[#5149]: https://github.com/prettier/prettier/pull/5149
[#5151]: https://github.com/prettier/prettier/pull/5151
[#5157]: https://github.com/prettier/prettier/pull/5157
[#5160]: https://github.com/prettier/prettier/pull/5160
[#5165]: https://github.com/prettier/prettier/pull/5165
[#5179]: https://github.com/prettier/prettier/pull/5179
[#5188]: https://github.com/prettier/prettier/pull/5188
[#5190]: https://github.com/prettier/prettier/pull/5190
[#5202]: https://github.com/prettier/prettier/pull/5202
[#5205]: https://github.com/prettier/prettier/pull/5205
[#5206]: https://github.com/prettier/prettier/pull/5206
[#5207]: https://github.com/prettier/prettier/pull/5207
[#5209]: https://github.com/prettier/prettier/pull/5209
[#5220]: https://github.com/prettier/prettier/pull/5220
[#5236]: https://github.com/prettier/prettier/pull/5236
[#5243]: https://github.com/prettier/prettier/pull/5243
[#5244]: https://github.com/prettier/prettier/pull/5244
[#5251]: https://github.com/prettier/prettier/pull/5251
[#5252]: https://github.com/prettier/prettier/pull/5252
[#5259]: https://github.com/prettier/prettier/pull/5259
[#5262]: https://github.com/prettier/prettier/pull/5262
[#5272]: https://github.com/prettier/prettier/pull/5272
[#5280]: https://github.com/prettier/prettier/pull/5280
[#5290]: https://github.com/prettier/prettier/pull/5290
[#5303]: https://github.com/prettier/prettier/pull/5303
8 changes: 7 additions & 1 deletion website/data/languages.yml
Expand Up @@ -6,8 +6,14 @@
- "[`JSX`](https://facebook.github.io/jsx/)"
- "[`Flow`](https://flow.org/)"
- "[`TypeScript`](https://www.typescriptlang.org/)"
- "[`Vue`](https://vuejs.org/)"
- "[`JSON`](http://json.org/)"
- name: HTML
showName: false
image: /images/languages/tools_html.svg
variants:
- "`HTML5`"
- "[`Vue`](https://vuejs.org/)"
- "[`Angular`](https://angular.io/)"
- name: CSS
showName: false
image: /images/languages/tools_css.svg
Expand Down
22 changes: 22 additions & 0 deletions website/static/images/languages/tools_html.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.