For JS in Vue, Svelte, and Astro files, use oxfmt-ignore inside the <script> tag:
vue
<script>// oxfmt-ignoreconst a = 42;</script>
Trailing ignore comments are also supported:
js
const a = 42; // oxfmt-ignore
Other native languages also support oxfmt-ignore in their own comment syntax:
<!-- oxfmt-ignore --> for HTML, Vue, and Markdown
/* oxfmt-ignore */ for CSS, SCSS, and Less
# oxfmt-ignore for YAML and GraphQL
For the rest of Svelte and Astro files (e.g., markup, <style>) and other Prettier-backed files, use prettier-ignore comment. See also Prettier's ignore documentation.
Currently, TOML files do not support ignore comments.
Inline ignore comments
For JS/TS files, use
oxfmt-ignoreto skip formatting the next statement:For JS in Vue, Svelte, and Astro files, use
oxfmt-ignoreinside the<script>tag:Trailing ignore comments are also supported:
Other native languages also support
oxfmt-ignorein their own comment syntax:<!-- oxfmt-ignore -->for HTML, Vue, and Markdown/* oxfmt-ignore */for CSS, SCSS, and Less# oxfmt-ignorefor YAML and GraphQLFor the rest of Svelte and Astro files (e.g., markup,
<style>) and other Prettier-backed files, useprettier-ignorecomment. See also Prettier's ignore documentation.Currently, TOML files do not support ignore comments.
Prettier compatibility
prettier-ignorecomment is also supported