@wzo/eslint-config
v0.0.3
Published
Shared ESLint flat config (antfu-based) for @wzo projects
Readme
@wzo/eslint-config
Shared ESLint flat config for
@wzoprojects — @antfu/eslint-config with our house style (4-space indent, single quotes, no semicolons) plus a few rule and Vue-template tweaks.
Install
pnpm add -D @wzo/eslint-config eslintUsage
eslint.config.js:
import defineConfig from '@wzo/eslint-config'
export default defineConfig()defineConfig takes the exact same arguments as antfu(...) — an options object
followed by any number of extra flat-config objects:
import defineConfig from '@wzo/eslint-config'
export default defineConfig(
{ vue: true, ignores: ['**/.nuxt/**', '**/.output/**'] },
{ rules: { 'no-console': 'off' } },
)All options (vue, react, typescript, formatters, unocss, …) and every
named export (GLOB_*, combine, parserPlain, …) are re-exported from antfu
unchanged — see the antfu/eslint-config docs
for the full reference.
Extending other configs
Append any third-party flat config — extra arguments are merged after ours:
import defineConfig from '@wzo/eslint-config'
import somePlugin from 'eslint-plugin-xxx'
export default defineConfig(
{ vue: true },
somePlugin.configs.recommended,
{ rules: { 'no-console': 'off' } },
)Inherit a legacy .eslintrc extends via @eslint/eslintrc (pnpm add -D @eslint/eslintrc):
import { FlatCompat } from '@eslint/eslintrc'
import defineConfig from '@wzo/eslint-config'
const compat = new FlatCompat()
export default defineConfig(
{},
...compat.config({ extends: ['eslint:recommended'] }),
)defineConfig() returns antfu's FlatConfigComposer, so you can chain
.prepend() / .append() / .override() / .renamePlugins() / .removeRules():
import defineConfig from '@wzo/eslint-config'
export default defineConfig({ vue: true })
.override('antfu/stylistic/rules', {
rules: { 'style/generator-star-spacing': ['error', { after: true, before: false }] },
})
.removeRules('no-console')Run npx eslint --inspect-config to see every named config block and its rules.
Note antfu renames plugin prefixes, so inline disables use the new names —
ts/*, style/*, node/*, yaml/* (not @typescript-eslint/* etc.).
House defaults
Everything follows antfu except these baked-in differences:
- Stylistic: 4-space indent, single quotes, no semicolons;
lessOpinionated,typescript: true no-console: warn (allowsconsole.error/console.warn)curly/style/brace-style: allow single-line bodiesyaml/indent: off- Vue template tweaks (4-space
html-indent, closing bracket on same line,no-multiple-template-rootoff)
Releasing
Maintainers only. Publishing runs in GitHub Actions via npm trusted publishing (OIDC) — no npm token required.
pnpm release # changelogen bumps the version, creates the tag, and pushesPushing a v* tag triggers release.yml, which
upgrades npm (OIDC needs npm ≥ 11.5.1), then pnpm publish — provenance is
attached automatically. prepublishOnly rebuilds dist before publish.
License
MIT © 2026 nowo
