eslint-plugin-next-intl π
ESLint plugin for next-intl
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-next-intl:
npm install eslint-plugin-next-intl --save-dev
Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-next-intl
globally.
Lastly extend in your eslintrc
{
"extends": ["plugin:next-intl/recommended"]
}
Supported Rules
πΌ Configurations enabled in.
π Set in the all
configuration.
β
Set in the recommended
configuration.
π§ Automatically fixable by the --fix
CLI option.
Name | Description | πΌ | π§ |
---|---|---|---|
no-dynamic-translation-key | Enforce using static strings as keys for translation functions | π β | |
use-next-intl-link-over-next-link | Replace next/link imports with next-intl/link imports | π β | π§ |
use-router-from-next-intl | Use useRouter from next-intl/client instead of next/navigation |
π β | π§ |
Credits
This set of rules was based off great work done in the repos: