Skip to content

Commit

Permalink
docs: add the ESLint plugin info (#1756)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar authored Sep 4, 2023
1 parent 316a004 commit 68ff51f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
33 changes: 33 additions & 0 deletions website/docs/ref/eslint-plugin.md
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.
:::
5 changes: 5 additions & 0 deletions website/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ const sidebar = [
label: "@lingui/vite-plugin",
id: "ref/vite-plugin",
},
{
type: "doc",
label: "ESLint Plugin",
id: "ref/eslint-plugin",
},
],
},
{
Expand Down

1 comment on commit 68ff51f

@vercel
Copy link

@vercel vercel bot commented on 68ff51f Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.