-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add the ESLint plugin info (#1756)
- Loading branch information
1 parent
316a004
commit 68ff51f
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# ESLint Plugin | ||
|
||
Lingui provides an ESLint plugin to help you find common Lingui usage errors in your code. | ||
|
||
## Installation | ||
|
||
You'll first need to install [ESLint](http://eslint.org): | ||
|
||
```bash npm2yarn | ||
npm install --save-dev eslint | ||
``` | ||
|
||
Next, install `eslint-plugin-lingui`: | ||
|
||
```bash npm2yarn | ||
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: | ||
|
||
```json | ||
{ | ||
"plugins": ["lingui"] | ||
} | ||
``` | ||
|
||
:::info | ||
See the [official repository](https:/lingui/eslint-plugin#usage) for more information on the rules. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68ff51f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
js-lingui – ./
js-lingui-git-main-lingui.vercel.app
js-lingui-lingui.vercel.app
js-lingui.vercel.app
lingui.dev
lingui.js.org