oxc-config-mantine
July 28, 2026 · View on GitHub
Mantine Oxc configuration for oxlint and oxfmt.
Install
yarn add --dev oxlint oxfmt oxc-config-mantine
Usage
In your oxlint.config.ts:
import { defineConfig } from 'oxlint';
import { oxlint } from 'oxc-config-mantine';
export default defineConfig({
extends: [oxlint],
ignorePatterns: ['**/*.{mjs,cjs,js,d.ts,d.mts}'],
});
In your oxfmt.config.ts:
import { defineConfig } from 'oxfmt';
import { oxfmt } from 'oxc-config-mantine';
export default defineConfig(oxfmt);
You can extend the formatter config with project-specific options:
import { defineConfig } from 'oxfmt';
import { oxfmt } from 'oxc-config-mantine';
export default defineConfig({
...oxfmt,
ignorePatterns: [...oxfmt.ignorePatterns, 'dist'],
});
Import order
The formatter config sorts imports into the following groups:
- Package styles –
@mantine/core/styles.css,@mantine/core/styles.layer.css(followed by a blank line) dayjsreactnext,next/*- Node.js built-in modules
- Other external packages
@mantine/*@mantinex/*@mantine-tests/*@docs/*@/*- Parent imports (
../*) - Sibling imports (
./*) - Index imports
- CSS modules (
*.module.css) - Local styles (
*.css)
Note that this config sets sortImports.sortSideEffects to true, which oxfmt disables by
default. It is required to move package styles into the first group – without it, side effect
imports stay where they are.
If you need to change the order, override sortImports entirely – spreading the config does not
merge nested objects:
export default defineConfig({
...oxfmt,
sortImports: { ...oxfmt.sortImports, newlinesBetween: true },
});
License
MIT