An ESLint flat config preset for TypeScript-first projects with built-in support for React, Vue, JSON, YAML, TOML, Tailwind CSS, UnoCSS, and formatting rules.
- Node.js
^22.13.0 || >=24 - ESLint
^10.2.1 - ESM-only package consumption
Use the CLI to create or migrate your flat config setup:
pnpm dlx @dhzh/eslint-config@latestThe wizard updates:
package.jsoneslint.config.*.vscode/settings.json.npmignore
Install the package and ESLint:
pnpm i -D eslint @dhzh/eslint-configThen create eslint.config.mjs:
// eslint.config.mjs
import { defineConfig } from '@dhzh/eslint-config';
export default defineConfig();defineConfig() accepts configs, ignorePatterns, and sourceType.
// eslint.config.mjs
import { defineConfig } from '@dhzh/eslint-config';
export default defineConfig({
ignorePatterns: ['dist', 'coverage'],
configs: {
json: {
packageJsonRequireType: false,
},
yml: {
quotes: 'double',
},
imports: {
closeOrder: false,
},
},
});For the full option surface, check src/types/index.ts and the config implementations under src/configs.
Rows marked as Planned are not wired into the current published config yet.
MIT License © 2022 Lyle Zheng