ESLint Configuration

This project uses ESLint for code quality and style consistency across the monorepo.

Setup

ESLint v9 with flat config format is configured for all packages:

  • Root: Shared base configuration
  • apps/web: Nuxt 3 + Vue 3 + TypeScript
  • apps/api: Hono + Bun + TypeScript

Usage

Run linting for all packages:

pnpm lint

Run linting for a specific package:

pnpm --filter @meisterbill/web lint
pnpm --filter @meisterbill/api lint

Auto-fix linting issues:

pnpm lint:fix

Auto-fix for a specific package:

pnpm --filter @meisterbill/web lint:fix

Pre-commit Hook

The .git/hooks/pre-commit hook automatically runs linting before allowing commits.

If linting issues are found: 1. Auto-fix is applied automatically 2. You'll need to review the changes 3. Commit again to proceed

Configuration Files

  • apps/web/eslint.config.js - Web app ESLint configuration
  • apps/api/eslint.config.js - API ESLint configuration

Rules

TypeScript Rules

  • @typescript-eslint/no-unused-vars: Warn (with _ prefix allowed)
  • @typescript-eslint/no-explicit-any: Warn
  • @typescript-eslint/no-var-requires: Error
  • @typescript-eslint/explicit-function-return-type: Off
  • @typescript-eslint/explicit-module-boundary-types: Off

Vue 3 Rules (Web)

  • vue/multi-word-component-names: Off
  • vue/component-name-in-template-casing: PascalCase
  • vue/custom-event-name-casing: camelCase
  • vue/define-macros-order: Enforced

Node.js/Bun Rules (API)

  • no-console: Off
  • no-debugger: Error
  • no-process-exit: Warn

General Style Rules

  • indent: 2 spaces
  • quotes: Single quotes
  • semi: No semicolons
  • comma-dangle: Always multiline
  • no-var: Error
  • prefer-const: Error

Ignored Files

  • node_modules/**
  • dist/**
  • .nuxt/**
  • .output/**
  • coverage/**
  • *.min.js
  • public/**
  • static/**

Troubleshooting

Linting takes too long

Only changed files are checked in pre-commit hooks. For full runs, consider using:

pnpm lint --cache

Too many errors

Run auto-fix first:

pnpm lint:fix

If you still have issues, you can temporarily disable rules inline:

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const data: any = fetchData()

Adding new packages

Copy an existing eslint.config.js and adjust for your package's needs.