Personal ESLint config built on @antfu/eslint-config.
pnpm add -D @tednaaa/eslint-config eslint jiti
jitiis only needed for aneslint.config.ts.
import { defineConfig } from '@tednaaa/eslint-config';
export default defineConfig();defineConfig takes the same arguments as antfu(): options first, then any extra flat configs.
export default defineConfig({
stylistic: { indent: 2 },
vue: {
overrides: {
'vue/enforce-style-attribute': ['error', { allow: ['module'] }],
},
},
});
stylistic.indentdoesn't reach Vue templates: overridevue/html-indenttoo.
ESLint is the only formatter. Don't add Prettier or turn off stylistic.
- Lint with
eslint --fixbefore committing. - Turn off the editor's own formatter and run ESLint fixes on save instead. For Zed, copy
.zed/settings.json.