Hyoban's ESLint Config
raw JSON → 7.0.3 verified Sat Apr 25 auth: no javascript
A personal ESLint configuration preset based on @antfu/eslint-config, extended with import-sort for import ordering, extra Markdown linting rules via eslint-plugin-markdown and markdown-preferences, optional Tailwind CSS support, and over 30 integrated plugins for JavaScript, TypeScript, React, JSON, YAML, and more. Currently at v7.0.3, it requires ESLint v9+ and flat config. It ships TypeScript types and provides a single `defineConfig` export. Breaking changes include removal of the `hyoban` option in v7.0.0 and migration to the antfu-based config in v6.0.0.
Common errors
error Error: Cannot find module 'eslint-config-hyoban' ↓
cause Package has not been installed or is installed globally instead of locally.
fix
Run 'npm install eslint-config-hyoban --save-dev' (or 'yarn add -D eslint-config-hyoban' / 'pnpm add -D eslint-config-hyoban').
error TypeError: defineConfig is not a function ↓
cause CommonJS require() used on an ESM-only package.
fix
Change your config file to .mjs or set type: module in package.json and use import { defineConfig } from 'eslint-config-hyoban'.
error Could not find 'tailwindcss' settings in defineConfig ↓
cause Tailwind CSS preset requires explicit enablement via 'tailwindcss: true' or settings object.
fix
Add 'tailwindcss: { settings: { tailwindConfig: './tailwind.config.ts' } }' to defineConfig options.
error ESLint couldn't find the config 'eslint-config-hyoban' ↓
cause The package is not installed or ESLint cannot resolve it due to flat config migration issues.
fix
Ensure the package is installed as a dev dependency and that you are using eslint.config.mjs with proper resolution.
Warnings
breaking Removal of hyoban option in v7.0.0: The 'hyoban' config option has been removed. Users must rely solely on antfu-based options. ↓
fix Remove any references to the hyoban option from your config. Use antfu-based options or override rules directly.
breaking Migration to antfu-based config in v6.0.0: The entire config structure changed. Previous v5 configs are not compatible. ↓
fix Migrate your config to the flat config format and use 'defineConfig' from eslint-config-hyoban as shown in the docs.
deprecated The 'perfectionist' sorting plugin is replaced by 'import-sort' as the default sorting plugin. ↓
fix Enable perfectionist manually if needed: defineConfig({ perfectionist: true }).
gotcha ESM-only package: This package exports only ES modules. CommonJS require() will fail. ↓
fix Use dynamic import: const { defineConfig } = await import('eslint-config-hyoban'); or set 'type': 'module' in package.json.
gotcha Flat config only: ESLint v9 flat config (.mjs or .js with type: module) is required. Legacy .eslintrc is not supported. ↓
fix Use eslint.config.mjs or eslint.config.js with 'type': 'module'.
Install
npm install eslint-config-hyoban yarn add eslint-config-hyoban pnpm add eslint-config-hyoban Imports
- defineConfig wrong
import { defineConfig } from 'eslint-config-hyoban/defineConfig'correctimport { defineConfig } from 'eslint-config-hyoban' - default wrong
const hyobanConfig = require('eslint-config-hyoban')correctimport hyobanConfig from 'eslint-config-hyoban' - defineConfig types wrong
import { ConfigItem } from 'eslint-config-hyoban'correctimport type { ConfigItem } from 'eslint-config-hyoban'
Quickstart
// eslint.config.mjs
import { defineConfig } from 'eslint-config-hyoban'
import { process } from 'node:process'
export default defineConfig({
tailwindcss: {
settings: {
tailwindConfig: process.env.TAILWIND_CONFIG ?? './tailwind.config.ts',
},
},
react: true,
jsdoc: {
override: {
'jsdoc/require-description': 'warn',
},
},
})