eslint-plugin-use-next-i18next-not-react-i18next
v0.0.0
Published
If you're using Next.js 12, use next-i18next instead of react-i18next.
Maintainers
Readme
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-devNext, install eslint-plugin-use-next-i18next-not-react-i18next:
npm install eslint-plugin-use-next-i18next-not-react-i18next --save-devUsage
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 | ✅ | 🔧 |
