---
title: "Create your own ESLint config and share it across projects"
description: "Build your own shareable ESLint config on top of antfu/eslint-config, publish it to npm and reuse the same Vue and TypeScript rules across your projects."
canonical_url: "https://angelblanco.dev/blog/create-your-eslint-config/"
---

> Index of every page on this site: [llms.txt](https://angelblanco.dev/llms.txt)

If you've ever worked on multiple projects, you know the pain of copying [ESLint](https://eslint.org/) configurations between repositories. Every time you set up a new project, you either start from scratch or copy the `eslint.config.js` file from your last one. There's a better way: publish your own shareable ESLint config package.

## Why I love antfu/eslint-config

Discovering [@antfu/eslint-config](https://github.com/antfu/eslint-config) changed how I configure ESLint. The move to "Flat Config" seemed unnecessary to me, until [Anthony Fu](https://antfu.me/) built a config that makes ESLint simple to set up and extend.

Instead of juggling dozens of plugins, configurations and dependencies, you install one package and you're done. It's zero config by default: you import it, export it, and it respects your `.gitignore`. It looks at your project and enables the right rules for [Vue](https://vuejs.org/), [TypeScript](https://www.typescriptlang.org/) or plain JavaScript, with opinionated defaults you can override.

It also formats your code, so for most projects you don't need [Prettier](https://prettier.io/). Besides JavaScript and TypeScript, it handles JSON, Markdown and YAML, so ESLint manages everything.

For my usual stack (Vue and TypeScript), it's the best starting point for configuring ESLint.

## Why create your own ESLint config package?

Extending `antfu`'s config with my own preferences and plugins is simple, since it's designed for composing your own configuration. I'm used to ending lines with semicolons, indenting with 2 spaces and putting the `<template>` at the top of my `.vue` files.

But the real value isn't personal taste. It's **consistency and reuse**. Once you publish your ESLint config as an [npm](https://www.npmjs.com/) package, you can:

- Add plugins for specific libraries that can't be part of `antfu`'s core.
- Use it in all your repositories, with the same rules everywhere.
- Version your linting rules: update the package, bump it in your projects, and they all get the new rules.
- Share it with your team or make it public.
- Maintain it in one place instead of updating the same rules in 10 projects.

## My config: @angelblanco/eslint-config

My configuration, [@angelblanco/eslint-config](https://www.npmjs.com/package/@angelblanco/eslint-config), is available on npm, and the source code is on GitHub:

<github-repo-preview description="Ángel Blanco's ESLint configuration, built on @antfu/eslint-config for Vue + TypeScript projects." repo="angelblanco/eslint-config">



</github-repo-preview>

## How to create your own

Creating your own ESLint config is straightforward. Instead of starting from scratch, you can fork mine:

1. Fork [@angelblanco/eslint-config](https://github.com/angelblanco/eslint-config).
2. Register on npm with your GitHub username.
3. Update `package.json` with your own package name, for example `@yourname/eslint-config`, and the rest of the details.
4. Install the dependencies with `pnpm install`.
5. Customize the rules in `index.ts`.
6. Build the JavaScript output with tsup by running `pnpm build`.
7. Publish it with `npm publish --access public`.
8. Install `@yourname/eslint-config` in your other repositories and import it in their ESLint config.

The [README in my repository](https://github.com/angelblanco/eslint-config) has up-to-date installation instructions, usage examples and every rule I changed. Open an issue if you want a hand.

## Make it yours

You don't need to reinvent the wheel. Start from something solid like @antfu/eslint-config, adjust it to your taste and publish it. The whole process takes about an hour, and you end up with one versioned linting configuration for all your projects.

If you work with Vue and TypeScript, try antfu's config or mine. If neither is exactly what you want, fork it and make it yours.

## Sitemap

See the full [sitemap](https://angelblanco.dev/sitemap.md) for all pages.
