0.0.0 ⢠Published 2 years ago
eslint-plugin-use-next-i18next-not-react-i18next v0.0.0
eslint-plugin-use-next-i18next-not-react-i18next
If you're using Next.js 12, use next-i18next instead of react-i18next.
This plugin is for dummy devs like me who forget to change the import from react-i18next to next-i18next.
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-use-next-i18next-not-react-i18next
:
npm install eslint-plugin-use-next-i18next-not-react-i18next --save-dev
Usage
Add use-next-i18next-not-react-i18next
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["use-next-i18next-not-react-i18next"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"use-next-i18next-not-react-i18next/no-react-i18next": 2
}
}
Rules
š¼ Configurations enabled in.\
ā
Set in the recommended
configuration.\
š§ Automatically fixable by the --fix
CLI option.
Name | Description | š¼ | š§ |
---|---|---|---|
no-react-i18next | Enforce next-i18next usage instead of react-i18next | ā | š§ |
0.0.0
2 years ago