8000 GitHub - Layouwen/eslint-config: Avan's ESLint config preset
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Layouwen/eslint-config

 
 

Repository files navigation

@avanlan/eslint-config

npm code style

Usage

Starter Wizard

We provided a CLI tool to help you set up your project, or migrate from the legacy config to the new flat config with one command.

pnpm dlx @avanlan/eslint-config@latest

Manual Install

If you prefer to set up manually:

pnpm i -D eslint @avanlan/eslint-config

And create eslint.config.mjs in your project root:

// eslint.config.mjs
import avanlan from '@avanlan/eslint-config'

export default avanlan()
Combined with legacy config:

If you still use some configs from the legacy eslintrc format, you can use the @eslint/eslintrc package to convert them to the flat config.

// eslint.config.mjs
import antfu from '@avanlan/eslint-config'
import { FlatCompat } from '@eslint/eslintrc'

const compat = new FlatCompat()

export default antfu(
  {
    ignores: [],
  },

  // Legacy config
  ...compat.config({
    extends: [
      'eslint:recommended',
      // Other extends...
    ],
  })

  // Other flat configs...
)

Note that .eslintignore no longer works in Flat config, see customization for more details.

Add script for package.json

For example:

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

Configs

antfu/eslint-config

License

MIT License © 2025 AvanLan

About

Avan's ESLint config preset

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 81.1%
  • JavaScript 12.5%
  • Vue 4.9%
  • HTML 0.6%
  • Astro 0.5%
  • CSS 0.2%
  • Svelte 0.2%
0