Skip to content

Embedded Formatting

WARNING

Not fully implemented. See tracking issue.

Formats code embedded in JS/TS files (CSS in template literals, GraphQL, HTML in JSX).

Configuration

.oxfmtrc.json
json
{
  "embeddedLanguageFormatting": "auto"
}

Values

  • "auto" — (default) Format embedded sections
  • "off" — Skip embedded formatting

Example

CSS inside a tagged template literal:

jsx
const styles = css`
  .container {
    background: blue;
    color: red;
  }
`;