Skip to content

Commit

Permalink
update 2.0 blog post wrt #6993
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Mar 22, 2020
1 parent 6257951 commit 55fdc49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ insert_final_newline = true

[cspell.json]
indent_size = 4

[website/blog/*.md]
trim_trailing_whitespace = false
16 changes: 8 additions & 8 deletions website/blog/2020-03-21-2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ Finally, the default value becomes `es5` instead of `none` in Prettier v2.0.
If the old behavior is still preferred, please configure Prettier with `{ "trailingComma": "none" }`.
There is a possibility that the default value will change to `always` (meaning even more trailing commas) in a future major version of Prettier as the JavaScript ecosystem further matures.

#### Remove deprecated API and change util signatures ([#6993](https://github.com/prettier/prettier/pull/6993) by [@fisker](https://github.com/fisker))
#### Plugin API: changes in `prettier.util` ([#6993](https://github.com/prettier/prettier/pull/6993) by [@fisker](https://github.com/fisker))

- Parser `typescript-eslint` is removed. Use the `typescript` parser instead.
- `prettier.util.mapDoc` is removed. Use `prettier.doc.utils.mapDoc` instead.
- `prettier.util.isNextLineEmpty` is updated.<br>
- `prettier.util.mapDoc` has been removed.<br>
Use `prettier.doc.utils.mapDoc` instead.
- `prettier.util.isNextLineEmpty` has been updated.<br>
Use `isNextLineEmpty(text, node, locEnd)` instead of `isNextLineEmpty(text, node, options)`.
- `prettier.util.isPreviousLineEmpty` is updated.<br>
- `prettier.util.isPreviousLineEmpty` has been updated.<br>
Use `isPreviousLineEmpty(text, node, locStart)` instead of `isPreviousLineEmpty(text, node, options)`.
- `prettier.util.getNextNonSpaceNonCommentCharacterIndex` is updated.<br>
- `prettier.util.getNextNonSpaceNonCommentCharacterIndex` has been updated.<br>
Use `getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd)` instead of `getNextNonSpaceNonCommentCharacterIndex(text, node, options)`.

#### Change default value for `arrowParens` to `always` ([#7430](https://github.com/prettier/prettier/pull/7430) by [@kachkaev](https://github.com/kachkaev))
Expand Down Expand Up @@ -168,12 +168,12 @@ If the old behavior is still preferred, please configure Prettier with `{ "endOf

Previously, Prettier searched the file system for plugins on every `prettier.format` call. Now, search results are cached. The cache can be cleared by calling `prettier.clearConfigCache()`.

#### Remove deprecated options and option values ([#7511](https://github.com/prettier/prettier/pull/7511), [#7533](https://github.com/prettier/prettier/pull/7533), [#7535](https://github.com/prettier/prettier/pull/7535), [#7536](https://github.com/prettier/prettier/pull/7536) by [@fisker](https://github.com/fisker))
#### Remove deprecated options and option values ([#6993](https://github.com/prettier/prettier/pull/6993), [#7511](https://github.com/prettier/prettier/pull/7511), [#7533](https://github.com/prettier/prettier/pull/7533), [#7535](https://github.com/prettier/prettier/pull/7535), [#7536](https://github.com/prettier/prettier/pull/7536) by [@fisker](https://github.com/fisker))

- Options:
- `useFlowParser` (`--flow-parser` in CLI) has been deprecated [since `v0.0.10`](https://github.com/prettier/prettier/blob/master/CHANGELOG.md#0010).
- Option values:
- `parser`: `babylon` (renamed to `babel` in v1.16.0), `postcss` (renamed to `css` in v1.7.1)
- `parser`: `babylon` (renamed to `babel` in v1.16.0), `postcss` (renamed to `css` in v1.7.1), `typescript-eslint` (an old alias for `typescript`)
- `proseWrap`: `true` (renamed to `always` in v1.9.0), `false` (renamed to `never` in v1.9.0)
- `trailingComma`: `true` (renamed to `es5` in v0.19.0), `false` (renamed to `none` in v0.19.0)

Expand Down

0 comments on commit 55fdc49

Please sign in to comment.