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:
- ✅ ESLint is configured in your project
- ✅ 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
- Open VS Code Extensions Marketplace
- Search for "ESLint Intl"
- Click the "Install" button
- VS Code will automatically install the ESLint extension if not already installed
Manual Installation
- Download the latest
.vsixfile from GitHub Releases - Open VS Code and press
Ctrl+Shift+X(Windows/Linux) orCmd+Shift+X(Mac) - Click the
...menu in the top right and select "Install from VSIX..." - Select the downloaded file
Initial Configuration
Step 1: Configure API Key
- Open VS Code Settings (
Ctrl+,) - Search for "ESLint Intl"
- 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
- Open any JavaScript/TypeScript file with ESLint errors
- Hover your mouse over a red squiggly line indicating an ESLint error
- 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
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 codeNext Steps
- 📖 Learn more about Configuration
- 🌐 View Supported Languages
- ❓ Check FAQ
- 🚀 Read Developer Guide
Need Help?
- 📱 Check FAQ
- 🐛 Submit an Issue
- 💬 Join the Discussion
Ready to use ESLint Intl? Let's get started and make your coding experience smoother!