api: remove the version parameter of getSupportInfo (#7620)

* api: remove the version parameter of getSupportInfo

* add changelog entry

* remove mapDeprecated

* Update pr-7620.md

* remove the first parameter completely

* Update api.md

* add default value for opts just to be on the safe side
This commit is contained in:
Georgii Dolzhykov authored and GitHub committed 2020-02-23 02:47:17 +02:00
1 parent 863a92c9c8
commit cf3d9f0b80
14 files changed
+254 -765

No files matched your search

+2 -4
View File
@@ -104,11 +104,9 @@ When setting `options.resolveConfig` (`boolean`, default `false`), Prettier will
Use `prettier.getFileInfo.sync(filePath [, options])` if you'd like to use sync version.
## `prettier.getSupportInfo([version])`
## `prettier.getSupportInfo()`
Returns an object representing the parsers, languages and file types Prettier supports.
If `version` is provided (e.g. `"1.5.0"`), information for that version will be returned, otherwise information for the current version will be returned.
Returns an object representing the options, parsers, languages and file types Prettier supports.
The support information looks like this:
+1 -1
View File
@@ -68,7 +68,7 @@ Prettier plugins are regular JavaScript modules with five exports:
### `languages`
Languages is an array of language definitions that your plugin will contribute to Prettier. It can include all of the fields specified in [`prettier.getSupportInfo()`](api.md#prettiergetsupportinfo-version).
Languages is an array of language definitions that your plugin will contribute to Prettier. It can include all of the fields specified in [`prettier.getSupportInfo()`](api.md#prettiergetsupportinfo).
It **must** include `name` and `parsers`.