diff --git a/.editorconfig b/.editorconfig index cda3b3db3..49a6d74cd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,6 @@ insert_final_newline = true [cspell.json] indent_size = 4 + +[website/blog/*.md] +trim_trailing_whitespace = false diff --git a/website/blog/2020-03-21-2.0.0.md b/website/blog/2020-03-21-2.0.0.md index 747dc15e3..1fcad5c73 100644 --- a/website/blog/2020-03-21-2.0.0.md +++ b/website/blog/2020-03-21-2.0.0.md @@ -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.
+- `prettier.util.mapDoc` has been removed.
+ Use `prettier.doc.utils.mapDoc` instead. +- `prettier.util.isNextLineEmpty` has been updated.
Use `isNextLineEmpty(text, node, locEnd)` instead of `isNextLineEmpty(text, node, options)`. -- `prettier.util.isPreviousLineEmpty` is updated.
+- `prettier.util.isPreviousLineEmpty` has been updated.
Use `isPreviousLineEmpty(text, node, locStart)` instead of `isPreviousLineEmpty(text, node, options)`. -- `prettier.util.getNextNonSpaceNonCommentCharacterIndex` is updated.
+- `prettier.util.getNextNonSpaceNonCommentCharacterIndex` has been updated.
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)) @@ -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)