Update configuration to be clearer about js config (#4993)

So in the list, it says to use `prettier.config.js` as your file name for configuring prettier in js. But in the example it has `//.prettierrc.js`. This confused me so I tried both file names. Both these file names work to configure prettier so I updated the docs to reflect that.
master
David 2018-08-20 14:33:02 +10:00 committed by Ika
parent a687b9383b
commit dda7c265d0
1 changed files with 3 additions and 3 deletions

View File

@ -5,9 +5,9 @@ title: Configuration File
Prettier uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for configuration file support. This means you can configure prettier via:
- A `.prettierrc` file, written in YAML or JSON, with optional extensions: `.yaml/.yml/.json/.js`.
- A `.prettierrc` file, written in YAML or JSON, with optional extensions: `.yaml/.yml/.json`.
- A `.prettierrc.toml` file, written in TOML (the `.toml` extension is _required_).
- A `prettier.config.js` file that exports an object.
- A `prettier.config.js` or `.prettierrc.js` file that exports an object.
- A `"prettier"` key in your `package.json` file.
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.
@ -28,7 +28,7 @@ JSON:
JS:
```js
// .prettierrc.js
// prettier.config.js or .prettierrc.js
module.exports = {
printWidth: 100,
parser: "flow"