npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

frontend-ai-review

v2.3.1

Published

AI-powered code review tool for frontend developers

Readme

Frontend AI Review 🤖


✨ 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