docs: fix linting

master
Ika 2018-05-29 10:16:07 +08:00 committed by GitHub
parent b8ded70848
commit 11275bfa9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ const prettier = require("prettier");
`format` is used to format text using Prettier. [Options](options.md) may be provided to override the defaults.
```js
prettier.format("foo ( );", { semi: false, parser: 'babylon' });
prettier.format("foo ( );", { semi: false, parser: "babylon" });
// -> "foo()"
```
@ -27,7 +27,7 @@ prettier.format("foo ( );", { semi: false, parser: 'babylon' });
The `cursorOffset` option should be provided, to specify where the cursor is. This option cannot be used with `rangeStart` and `rangeEnd`.
```js
prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: 'babylon' });
prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babylon" });
// -> { formatted: '1;\n', cursorOffset: 1 }
```