Getting Started

Introduction

Opinionated ESLint flat config preset for EienJS projects, TypeScript, AdonisJS, Vue, Nuxt, and Astro.

@eienjs/eslint-config is an opinionated, single-line ESLint Flat Config preset designed for EienJS applications and packages. Forked from @antfu/eslint-config, it provides zero-config linting and code formatting out of the box with first-class support for TypeScript, AdonisJS, Vue, Nuxt, and Astro.

Key Features

  • Flat Config First: Built natively on ESLint's flat configuration system (eslint.config.js) and powered by eslint-flat-config-utils for effortless composition.
  • Auto-Detection: Automatically detects TypeScript, Vue (vue, nuxt, vitepress, @slidev/cli), and pnpm workspaces (pnpm-workspace.yaml) in your project.
  • Framework Integrations: Dedicated rule sets and directory-aware overrides for AdonisJS, Nuxt (v3 and v4), Vue, and Astro.
  • Formatting Without Prettier: Uses ESLint Stylistic to format JavaScript, TypeScript, Vue, JSON, YAML, and TOML directly through ESLint, with optional Prettier integration via eslint-plugin-format for CSS, HTML, Markdown, XML, SVG, and Astro.
  • Rich Built-in Defaults: Preconfigured rules for Node.js (eslint-plugin-n), JSDoc, Unicorn (snake_case filenames), Perfectionist (import/export sorting), RegExp, Vitest (test), JSONC (package.json and tsconfig.json sorting), YAML, TOML, and Markdown code blocks.
  • Interactive CLI Wizard: Quickly initialize or migrate your project configuration and .vscode/settings.json with a single command.

Requirements

  • Node.js: >= 20.x recommended
  • ESLint: ^10.5.0 (Flat Config)
  • TypeScript: >= 5.0 (optional, auto-detected when installed)
@eienjs/eslint-config is published as a pure ESM package and generates eslint.config.js (or eslint.config.mjs for CommonJS projects).

Next Steps

Head over to the Installation guide to set up @eienjs/eslint-config using the interactive CLI wizard or manual installation, or explore Configuration to see all available options.