Appearance
For JS/TS files, use oxfmt-ignore to skip formatting the next statement:
oxfmt-ignore
// oxfmt-ignore const a = 42; /* oxfmt-ignore */ const x = () => { return 2; }; <> {/* oxfmt-ignore */} <span ugly format="" /> </>;
For JS-in-Vue, use oxfmt-ignore inside the <script> tag:
<script>
<script> // oxfmt-ignore const a = 42; </script>
Trailing ignore comments are also supported:
const a = 42; // oxfmt-ignore
For other files and non-JS parts of Vue files (e.g., <template>, <style>), use prettier-ignore comment. See also Prettier's ignore documentation.
<template>
<style>
prettier-ignore
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, use
oxfmt-ignoreinside the<script>tag:Trailing ignore comments are also supported:
For other files and non-JS parts of Vue files (e.g.,
<template>,<style>), useprettier-ignorecomment. See also Prettier's ignore documentation.Currently, TOML files do not support ignore comments.
Prettier compatibility
prettier-ignorecomment is also supported