frontend-ai-review

AI-powered code review tool for frontend developers
2,319
Install
npm install frontend-ai-review
Latest Version:2.3.1
License:MIT
Last Updated:Mar 19, 2026
Links: GitHub  ·  npm
Maintainer: yulingsong

Frontend AI Review ๐Ÿค–

Version License Node Version NPM Downloads

AI-powered code review tool for frontend developers


โœจ Features

Feature Description
๐Ÿ” Multi-Framework React, Vue, Next.js, Nuxt.js, Svelte
โšก High Performance Parallel analysis, incremental caching
๐Ÿ“Š 47+ Rules React, Vue, TypeScript, Security, Performance, Best Practices
๐Ÿค– Multi AI Support OpenAI, Anthropic, Google Gemini, Azure, Cohere, Mistral, Qwen
๐Ÿ”ง Auto-Fix Automatically fix fixable issues
โš™๏ธ CLI Options Flexible configuration
๐Ÿ“„ Config File Supports .fairrc.json
๐Ÿ“‘ Multiple Outputs Text/JSON/GitHub/SARIF format
๐Ÿš€ CI/CD Integration GitHub Actions, GitLab CI, Jenkins
๐Ÿงช Test Support Built-in unit tests
๐ŸŒ i18n English, Chinese, Japanese, Spanish, French, German

๐Ÿš€ Quick Start

Installation

# Install globally with npm
npm install -g frontend-ai-review

# Or use npx
npx frontend-ai-review /path/to/project

Local Usage

# Clone the project
git clone https://github.com/Yulingsong/frontend-ai-review.git
cd frontend-ai-review

# Install dependencies
npm install

# Build
npm run build

# Run
node dist/index.js /path/to/project

๐Ÿ“– CLI Options

Option Description Default Example
-o, --output Output format text -o json
-s, --severity Minimum severity suggestion -s warning
-c, --category Categories all -c react,vue
-e, --exclude Exclude files - -e "node_modules/**"
-r, --rules Specific rules all -r react/exhaustive-deps
--ai Enable AI analysis false --ai
--ai-model AI model gpt-4o-mini --ai-model gpt-4
--ai-provider AI provider openai --ai-provider anthropic
--fix Auto-fix issues false --fix
--parallel Parallel analysis false --parallel
--cache Enable caching false --cache
--git Git incremental false --git --staged
-i, --interactive Interactive mode false -i
--init Create config - --init
-h Show help - -h

๐Ÿ“„ Configuration File

Create .fairrc.json in your project root:

{
  "severity": "warning",
  "output": "text",
  "exclude": [
    "node_modules/**",
    "dist/**",
    "build/**",
    ".next/**"
  ],
  "category": [
    "react",
    "vue",
    "typescript",
    "security"
  ],
  "ai": false,
  "aiModel": "gpt-4o-mini",
  "aiProvider": "openai"
}

๐Ÿค– AI Analysis

Supports multiple AI providers:

# OpenAI (default)
export OPENAI_API_KEY=sk-your-key
fair /path/to/project --ai

# Anthropic Claude
export ANTHROPIC_API_KEY=sk-ant-your-key
fair /path/to/project --ai --ai-provider anthropic

# Google Gemini
export GEMINI_API_KEY=your-gemini-key
fair /path/to/project --ai --ai-provider gemini

# Azure OpenAI
export AZURE_OPENAI_API_KEY=your-key
fair /path/to/project --ai --ai-provider azure --azure-endpoint https://your-resource.openai.azure.com

# Cohere
export COHERE_API_KEY=your-key
fair /path/to/project --ai --ai-provider cohere

# Mistral
export MISTRAL_API_KEY=your-key
fair /path/to/project --ai --ai-provider mistral

# Alibaba Qwen
export QWEN_API_KEY=your-key
fair /path/to/project --ai --ai-provider qwen

๐Ÿ”ง Auto-Fix

Automatically fix fixable issues:

fair /path/to/project --fix

Supported Rules

Rule Fix
perf/console-log Delete console.log line
best-practice/no-var Replace var with let
best-practice/prefer-const Replace let with const

โšก Performance

# Parallel analysis - recommended for large projects
fair /path/to/project --parallel

# Incremental caching - skip unchanged files
fair /path/to/project --cache

# Git-based incremental analysis
fair /path/to/project --git --staged
fair /path/to/project --git --branch main
fair /path/to/project --git --since HEAD~3

๐Ÿš€ CI/CD Integration

GitHub Actions

name: Frontend AI Code Review
on: [push, pull_request]
jobs:
  code-review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - name: Run Code Review
        run: npx fair . -s warning -o github
        env:
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

GitLab CI

See .gitlab-ci/.gitlab-ci.yml

Jenkins

See .jenkins/Jenkinsfile


๐Ÿ“Š Output Example

๐Ÿค– Frontend AI Review v2.2.0
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Framework: react
Severity: suggestion
Rules: 47 enabled

Found 25 files to analyze

๐Ÿ“ src/App.tsx
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐ŸŸก react/exhaustive-deps line 23
   useEffect dependency array may be incomplete

๐Ÿ”ด security/hardcoded-credentials line 5
   Hardcoded credentials detected

๐Ÿ”ต perf/console-log line 10 ๐Ÿ’ก Fixable: Delete this line

๐Ÿ“Š Summary
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Files: 25 | Analyzed: 25 | Issues: 8
   Errors: 2
   Warnings: 8
   Suggestions: 5

๐Ÿ“ˆ By Category
   security: 2
   react: 3
   best-practice: 3

๐Ÿ“ฆ Built-in Rules (47+)

๐Ÿ”ด React (10)

Rule ID Description Severity
react/exhaustive-deps useEffect dependency incomplete warning
react/no-array-index-key No array index as key warning
react/hooks-rule-of-hooks Hooks must be at top level error
react/no-direct-mutation-state No direct state mutation error
react/button-has-type Button type required suggestion
react/prop-types Prop types required warning

๐Ÿ’š Vue (6)

Rule ID Description Severity
vue/v-for-key v-for needs key warning
vue/v-if-with-v-for v-if with v-for error

๐Ÿ’™ TypeScript (6)

Rule ID Description Severity
typescript/no-any No any type warning
typescript/no-unused-vars No unused vars warning

๐Ÿ”’ Security (8)

Rule ID Description Severity
security/eval No eval error
security/hardcoded-credentials No credentials error
security/sql-injection SQL injection error
security/command-injection Command injection error

โšก Performance (7)

Rule ID Description Severity
perf/console-log Remove console.log suggestion
perf/anonymous-function No anonymous functions suggestion

๐Ÿ“ Best Practice (10)

Rule ID Description Severity
best-practice/no-magic-numbers No magic numbers suggestion
best-practice/import-order Import order suggestion

๐Ÿ› ๏ธ Development

# Clone
git clone https://github.com/Yulingsong/frontend-ai-review.git
cd frontend-ai-review

# Install
npm install

# Dev mode
npm run dev

# Build
npm run build

# Test
npm run test

๐Ÿค Contributing

Issues and Pull Requests are welcome!


๐Ÿ“ License

MIT License


๐Ÿ† Credits

Related Packages

design-warden

CI check for design-system drift in frontend pull requests, built for UI written...

556
@langgraph-js/sdk

The UI SDK for LangGraph - seamlessly integrate your AI agents with frontend int...

333,667 6
@huyooo/ai-chat-frontend-vue

AI Chat Frontend - Vue components with adapter pattern

12,303
stellify-framework

Frontend framework built for AI code generation

2,744
@ashwindojo/codeatlas-vite-plugin

Vite plugin for CodeAtlas โ€” real-time annotation parsing and live MCP HTTP serve...

1,356

Version History

Version Released License
2.3.1 MIT
2.3.0 MIT
2.2.0 MIT
2.0.6 MIT
2.0.5 MIT