diff --git a/src/docs/guide/usage/formatter/embedded-formatting.md b/src/docs/guide/usage/formatter/embedded-formatting.md index e0d3d873a87..7b2bde118f5 100644 --- a/src/docs/guide/usage/formatter/embedded-formatting.md +++ b/src/docs/guide/usage/formatter/embedded-formatting.md @@ -32,6 +32,28 @@ const styles = css` `; ``` +GraphQL inside a tagged template literal: + +```js +const query = gql` + query { + user { + id + name + } + } +`; + +const query2 = graphql(` + query { + user { + id + name + } + } +`); +``` + HTML inside a tagged template literal: ```js diff --git a/src/docs/guide/usage/formatter/ignore-comments.md b/src/docs/guide/usage/formatter/ignore-comments.md index beb413f2c4f..081b921e5be 100644 --- a/src/docs/guide/usage/formatter/ignore-comments.md +++ b/src/docs/guide/usage/formatter/ignore-comments.md @@ -17,11 +17,29 @@ const x = () => { return 2; }; ``` -For non-JS files, use `prettier-ignore` comment. See also Prettier's [ignore documentation](https://prettier.io/docs/ignore#html). +For JS-in-Vue, use `oxfmt-ignore` inside the ` +``` + + +Trailing ignore comments are also supported: + + +```js +const a = 42; // oxfmt-ignore +``` + + +For other files and non-JS parts of Vue files (e.g., `