Skip to content

Inline ignore comments

Use oxfmt-ignore to skip formatting the next statement:

js
// oxfmt-ignore
const a = 42;

/* oxfmt-ignore */
const x = () => {
  return 2;
};

<>
  {/* oxfmt-ignore */}
  <span ugly format="" />
</>;

WARNING

Prettier's trailing ignore comments are not supported for performance reasons.

For non-JS files, see Prettier's ignore documentation.

TOML files do not support ignore comments.

Prettier compatibility

prettier-ignore is also supported.