Conversation
docs/api.md
Outdated
|
|
||
| ## `prettier.format(source [, options])` | ||
|
|
||
| `format` is used to format text using Prettier. [Options](#options) may be provided to override the defaults. |
docs/api.md
Outdated
| searching from the current directory). | ||
| Or you can pass directly the path of the config file as `options.config` if you don't wish to search for it. | ||
| A promise is returned which will resolve to: | ||
| * An options object, providing a [config file](#configuration-file) was found. |
There was a problem hiding this comment.
[config file](./configuration.html)
docs/cli.md
Outdated
| --- | ||
|
|
||
| Run Prettier through the CLI with this script. Run it without any | ||
| arguments to see the [options](#options). |
docs/cli.md
Outdated
| ## `--find-config-path` and `--config` | ||
|
|
||
| If you are repeatedly formatting individual files with `prettier`, you will incur a small performance cost | ||
| when prettier attempts to look up a [configuration file](#configuration-file). In order to skip this, you may |
There was a problem hiding this comment.
[configuration file](./configuration.html)
docs/configuration.md
Outdated
| The configuration file will be resolved starting from the location of the file being formatted, | ||
| and searching up the file tree until a config file is (or isn't) found. | ||
|
|
||
| The options to the configuration file are the same the [API options](#options). |
docs/configuration.md
Outdated
| } | ||
| ``` | ||
|
|
||
| For more information on how to use the CLI to locate a file, see the [CLI](#cli) section. |
docs/language-support.md
Outdated
| [Babylon](https://github.com/babel/babylon) parser with all language | ||
| features enabled, but you can also use the | ||
| [Flow](https://github.com/facebook/flow) parser with the | ||
| `parser` API or `--parser` CLI [option](#options). |
docs/options.md
Outdated
| * [`json`](https://github.com/babel/babylon/tree/f09eb3200f57ea94d51c2a5b1facf2149fb406bf#babylonparseexpressioncode-options) _Since v1.5.0_ | ||
| * [`graphql`](https://github.com/graphql/graphql-js/tree/master/src/language) _Since v1.5.0_ | ||
|
|
||
| [Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ |
There was a problem hiding this comment.
[Custom parsers](./api.html#custom-parser-api)
docs/index.md
Outdated
|
|
||
|
|
||
| [empty lines]:/docs/en/rationale.html#empty-lines | ||
| [multi-line objects]:/docs/en/rationale.html#multi-line-objects |
There was a problem hiding this comment.
Would be better to use relative path?
| [](https://www.npmjs.com/package/prettier) | ||
| [](#badge) | ||
|
|
||
| Prettier is an opinionated code formatter with support for: |
There was a problem hiding this comment.
Prettier is an opinionated code formatter
A simple description here would be better I think.
|
Footer needs to be updated as well, especially prettier/website/core/Footer.js Lines 40 to 44 in e436ada |
|
Thanks for the review! Should have marked as wip - I knew about the links needing to be changed. |
|
|
||
| Prettier enforces a consistent code **style** (i.e. code formatting that won't affect the AST) across your entire codebase because it disregards the original styling[\*](#styling-footnote) by parsing it away and re-printing the parsed AST with its own rules that take the maximum line length | ||
| into account, wrapping code when necessary. | ||
|
|
There was a problem hiding this comment.
I'd keep this part here (not the title "What does prettier do?")
Prettier is an opinionated code formatter. It enforces a consistent style by parsing
your code and re-printing the parsed AST with its own rules that take the
maximum line length into account, wrapping code when necessary.
For example, take the following code:
<!-- and so on -->
You can try it on our interactive REPL: http://prettier.io/playground
There was a problem hiding this comment.
I’d still include the example to make it more clear what prettier does.
There was a problem hiding this comment.
Trying to avoid too much copy-pasting. We're doing this to remove the need to sync the docs.
However, I think it would be a great idea to write a different, more concise summary of Prettier in the README, with a basic example.
There was a problem hiding this comment.
Basically like this https://github.com/babel/babel#intro
There was a problem hiding this comment.
Yeah I'm just saying an example would be very good here, I don't really care which one :-)
I suggested keeping the one there just for the sake of simplicity
README.md
Outdated
| [](https://codecov.io/gh/prettier/prettier) | ||
| [](https://www.npmjs.com/package/prettier) | ||
| [](#badge) | ||
|  |
There was a problem hiding this comment.
?
docs/options.md
Outdated
| * [`graphql`](https://github.com/graphql/graphql-js/tree/master/src/language) _Since v1.5.0_ | ||
|
|
||
| [Custom parsers](#custom-parser-api) are also supported. _Since v1.5.0_ | ||
| [Custom parsers](./custom-parser-api.html) are also supported. _Since v1.5.0_ |
There was a problem hiding this comment.
This one is a special case: [Custom parsers](./api.html#custom-parser-api)
|
OK I think this is good to go, any final comments? |
|
Just realized we forgot to mention the markdown support on homepage: azz#1 |
docs/ignore.md
Outdated
|
|
||
| ## Markdown | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Fixed. I had to remove vim from a bunch of places for the same reason. Should investigate because vim is supported by Prism.
There was a problem hiding this comment.
It seems the prism in docusaurus is outdated, I didn't see any vim in website/node_modules/docusaurus/lib/core/Prism.js, and the new [email protected] seems replaced it with highlight.js.
|
Not sure why codecov is saying coverage decreased. Didn't touch any source code. |
docs/cli.md
Outdated
| --- | ||
|
|
||
| Run Prettier through the CLI with this script. Run it without any | ||
| arguments to see the [options](./options.html). |
There was a problem hiding this comment.
https://docusaurus.io/docs/en/doc-markdown.html#linking-other-documents
This can help when you want to navigate through docs on GitHub since the links there will be functional links to other documents (still on GitHub), but the documents will have the correct html links when they get rendered.
[options](./options.html) -> [options](options.md)
There was a problem hiding this comment.
Ooh neat. I'll check if it works with the version we're using.


Moves all documentation to the website.
Rationale.md/editorsdirectoryUsageinto many pages. Technically a breaking change for/usage.htmlURLs.Closes #2825
Supersedes #3116
Closes #3028
Closes #3138