Skip to main content

ESLint Plugin

Lingui provides an ESLint plugin to help you find common Lingui usage errors in your code.

npm-version npm-downloads main-suite codecov

Installation

You'll first need to install ESLint:

npm install --save-dev eslint

Next, install eslint-plugin-lingui:

npm install --save-dev eslint-plugin-lingui

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-lingui globally.

Usage

Add lingui to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
"plugins": ["lingui"]
}
info

See the official repository for more information on the rules.