ESLint rules for internationalization.
Install ESLint as a dev-dependency:
$ npm install --save-dev eslint
Install eslint-plugin-i18n
as a dev-dependency:
$ npm install --save-dev eslint-plugin-i18n
Add plugins
section to your .eslintrc
and specify eslint-plugin-i18n as a plugin:
{
"plugins": [
"i18n"
]
}
Finally, enable the rules that you would like to use.
{
"rules": {
"i18n/no-chinese-character": 1,
"i18n/no-greek-character": 1,
"i18n/no-japanese-character": 1,
"i18n/no-korean-character": 1,
"i18n/no-russian-character": 1,
"i18n/no-thai-character": 1
}
}
- no-chinese-character: Prevent usage of Chinese characters.
- no-greek-character: Prevent usage of Greek characters.
- no-japanese-character: Prevent usage of Japanese characters.
- no-korean-character: Prevent usage of Korean characters.
- no-russian-character: Prevent usage of Russian characters.
- no-thai-character: Prevent usage of Thai characters.
eslint-plugin-i18n is licensed under the MIT License.
- Added rule options to support identifier linting.
- Dropped the support of node < 12 for development environment (due to lint-staged and mocha)
- Dropped support for node < 10
- Added JSX support