Getting Started with LintMyAI

LintMyAI catches what AI coding assistants get wrong. Hallucinated imports, hardcoded secrets, dead code, fake error handling -- the patterns no existing linter covers.

Quick Start

Run a scan on any project with zero configuration:

npx lintmyai .

That's it. LintMyAI auto-detects your framework, loads the right rules, and reports issues in seconds.

Installation

For permanent installation in your project:

npm install -D eslint-plugin-lintmyai lintmyai

Or with pnpm:

pnpm add -D eslint-plugin-lintmyai lintmyai

Your First Scan

When you run npx lintmyai ., you'll see output like this:

LintMyAI v1.0.0

Scanning 42 files...

src/api/auth.ts
  12:5  warning  Async function has no await expression     no-fake-async
  28:9  warning  Hardcoded secret detected: API_KEY         no-hardcoded-secrets

src/utils/helpers.ts
  5:1   warning  Package 'left-pad' may not exist on npm    no-hallucinated-packages

3 warnings found (3 rules triggered)

Each warning tells you the file, line, what the issue is, and which rule flagged it. These are patterns AI coding assistants commonly produce -- code that looks correct but has hidden quality issues.

Configuration

Generate an ESLint configuration file tailored to your project:

npx lintmyai init

This creates an eslint.config.js with the recommended rule set. You can customize rule severity:

import lintmyai from 'eslint-plugin-lintmyai';

export default [
  lintmyai.configs.recommended,
  {
    rules: {
      // Change severity
      'lintmyai/no-hardcoded-secrets': 'error',
      // Disable a rule
      'lintmyai/no-excessive-comments': 'off',
    },
  },
];

Framework Detection

LintMyAI automatically detects your framework and loads the appropriate rules:

  • React -- Adds hooks rules, component patterns
  • Vue -- Adds Vue-specific linting
  • Express -- Adds server-side patterns
  • Next.js -- Combines React rules with server patterns

No configuration needed. Framework detection happens automatically when you scan.

CI Setup

Add LintMyAI to your GitHub Actions pipeline:

name: Code Quality
on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npx lintmyai --ci .

The --ci flag exits with a non-zero code when issues are found, failing the build.

Output Formats

LintMyAI supports multiple output formats:

  • Text (default) -- Human-readable console output
  • JSON -- Machine-readable format for tooling integration: npx lintmyai --format json .
  • SARIF -- Static Analysis Results Interchange Format for GitHub Code Scanning: npx lintmyai --format sarif .

Category Filtering

Focus on specific issue categories:

# Only check for security issues
npx lintmyai --category security .

# Exclude complexity rules
npx lintmyai --exclude-category complexity .

Available categories: Hallucinated Imports, Security, Dead Code, AI Behavior, Boilerplate, Complexity, Testing, Framework.

Next Steps