apps/mantine.dev/src/pages/eslint-config-mantine.mdx
import { Layout } from '@/layout'; import { MDX_DATA } from '@/mdx';
export default Layout(MDX_DATA.EslintConfig);
eslint-config-mantine is a set of ESLint rules and configurations used in Mantine projects. You can use it in your project to ensure that your code follows the same style and conventions as Mantine.
Mantine ESLint config requires ESLint 9 or higher:
<InstallScript dev packages="@eslint/js eslint eslint-plugin-jsx-a11y eslint-plugin-react typescript-eslint eslint-config-mantine" />Add the following configuration to your eslint.config.mjs:
import mantine from 'eslint-config-mantine';
import tseslint from 'typescript-eslint';
export default tseslint.config(
...mantine,
{ ignores: ['**/*.{mjs,cjs,js,d.ts,d.mts}'] },
);
Mantine ESLint config extends recommended ESLint, typescript-eslint and eslint-plugin-jsx-a11y rules and adds custom rules and configurations. You can find the full list of rules and source code in the eslint-config-mantine repository.