docs(blog): 1.15 release (#5296)

This commit is contained in:
Ika authored and GitHub committed 2018-11-07 09:09:04 +08:00
1 parent 4559a774bb
commit fa40f2ddd3
8 files changed
+1949 -32

No files matched your search

+19
View File
@@ -53,6 +53,25 @@ matrix(
</div>
```
## HTML
```html
<!-- prettier-ignore -->
<div class="x" >hello world</div >
<!-- prettier-ignore-attribute -->
<div
(mousedown)=" onStart ( ) "
(mouseup)=" onEnd ( ) "
></div>
<!-- prettier-ignore-attribute (mouseup) -->
<div
(mousedown)="onStart()"
(mouseup)=" onEnd ( ) "
></div>
```
## CSS
```css
+22 -9
View File
@@ -191,13 +191,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 |
@@ -272,7 +271,23 @@ Valid options:
| ------------ | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `"preserve"` | <code>--prose-wrap <always&#124;never&#124;preserve></code> | <code>proseWrap: "<always&#124;never&#124;preserve>"</code> |
<!--TODO(1.15)
## HTML Whitespace Sensitivity
_available in v1.15.0+_
Specify the global whitespace sensitivity for HTML files, see [whitespace-sensitive formatting] for more info.
[whitespace-sensitive formatting]: https://prettier.io/blog/2018/11/07/1.15.0.html#whitespace-sensitive-formatting
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> |
## End of Line
@@ -310,6 +325,4 @@ Valid options:
| Default | CLI Override | API Override |
| -------- | ----------------------------------------------------------- | ---------------------------------------------------------- |
| `"auto"` | <code>--end-of-line <auto&#124;cr&#124;crlf&#124;lf></code> | <code>endOfLine: "<auto&#124;cr&#124;crlf&#124;lf>"</code> |
-->
| `"auto"` | <code>--end-of-line <auto&#124;lf&#124;crlf&#124;cr></code> | <code>endOfLine: "<auto&#124;lf&#124;crlf&#124;cr>"</code> |