Skip to content

Getting Started

Welcome to ESLint Intl! This guide will help you get started quickly.

What is ESLint Intl?

ESLint Intl is a VS Code extension that uses AI to translate ESLint error messages into your preferred language in real-time. Simply hover over an ESLint error and instantly see the translation with fix suggestions.

Key Features

  • 🌍 Support for 10 Languages - Choose from your preferred language easily
  • 💡 Smart Fix Suggestions - Not only translates errors but also provides solutions
  • 💾 Smart Cache - Avoids duplicate requests to improve performance
  • 🔧 Flexible Configuration - Support for any OpenAI-compatible API
  • Instant Response - No waiting, translations appear immediately
  • 🎨 Beautiful UI - Native VS Code styling integration

Prerequisites

Before installing ESLint Intl, make sure:

  1. ✅ ESLint is configured in your project
  2. ESLint extension is installed

⚠️ Important: ESLint Intl depends on the ESLint extension for diagnostic information. The plugin will not work without the ESLint extension installed.

Installation

Via VS Code Marketplace

  1. Open VS Code Extensions Marketplace
  2. Search for "ESLint Intl"
  3. Click the "Install" button
  4. VS Code will automatically install the ESLint extension if not already installed

Manual Installation

  1. Download the latest .vsix file from GitHub Releases
  2. Open VS Code and press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac)
  3. Click the ... menu in the top right and select "Install from VSIX..."
  4. Select the downloaded file

Initial Configuration

Step 1: Configure API Key

  1. Open VS Code Settings (Ctrl+,)
  2. Search for "ESLint Intl"
  3. Configure the following items:
    • API Key: Your OpenAI-compatible API key
    • Base URL: API base URL (optional, default is OpenAI)
    • Model: Model name to use (optional)

Step 2: Choose Target Language

In VS Code Settings, find eslintIntl.targetLanguage and select your preferred language:

  • 简体中文 (zh-CN)
  • 繁體中文 (zh-TW)
  • 한국어 (ko)
  • Deutsch (de)
  • Français (fr)
  • Español (es)
  • Русский (ru)
  • Português (pt)
  • Italiano (it)
  • العربية (ar)

Step 3: Enable the Extension

Make sure eslintIntl.enabled is set to true (enabled by default)

Usage

  1. Open any JavaScript/TypeScript file with ESLint errors
  2. Hover your mouse over a red squiggly line indicating an ESLint error
  3. In the hover tooltip, you'll see:
    • ✅ Translated error message
    • 💡 Fix suggestion
    • 🔗 Original error rule link

Common Commands

Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the Command Palette, then type:

  • ESLint Intl: Clear Translation Cache - Clear all cached translations
  • ESLint Intl: Toggle Translation - Quickly toggle translation feature on/off
  • ESLint Intl: Show Output Log - Display debug logs

Example

Example Code

javascript
const x = 1;
// ESLint: 'x' is assigned a value but never used. (no-unused-vars)

Translation Result (English)

Variable 'x' is assigned a value but never used.

💡 Fix Suggestion: Delete the unused variable or use it in your code

Next Steps

Need Help?


Ready to use ESLint Intl? Let's get started and make your coding experience smoother!

Released under the MIT License