eslint-plugin-i18n

raw JSON →
2.4.0 verified Sat Apr 25 auth: no javascript

ESLint plugin providing lint rules to prevent usage of non-Latin characters (Chinese, Greek, Japanese, Korean, Russian, Thai) in source code, helping enforce internationalization best practices. Current stable version is 2.4.0. Release cadence is irregular. Key differentiators: simple targeted rules for specific character sets, supports JSX, template literals, and configurable exclusions for identifiers, comments, function arguments, and module imports.

error ESLint couldn't find the plugin "eslint-plugin-i18n".
cause Plugin not installed or missing from node_modules.
fix
Run 'npm install --save-dev eslint-plugin-i18n'.
error Error: Failed to load plugin 'i18n': Cannot find module 'eslint-plugin-i18n'
cause Plugin not installed or ESLint can't resolve it.
fix
Ensure eslint-plugin-i18n is installed in the same project as ESLint.
breaking v2.0.0 dropped support for Node < 10
fix Upgrade Node.js to version 10 or higher.
deprecated Using numeric severity (0,1,2) in ESLint rules is deprecated in ESLint >= 9
fix Use string severity: 'off', 'warn', 'error'.
gotcha Rule options may differ between rules; check each rule's documentation for available options.
fix Refer to docs/rules/<rule-name>.md for exact option names.
npm install eslint-plugin-i18n
yarn add eslint-plugin-i18n
pnpm add eslint-plugin-i18n

Shows how to install and configure eslint-plugin-i18n to prevent Chinese and Russian characters in source code.

// Install: npm install --save-dev eslint eslint-plugin-i18n
// .eslintrc.json
{
  "plugins": ["i18n"],
  "rules": {
    "i18n/no-chinese-character": "error",
    "i18n/no-russian-character": "warn"
  }
}

// test.js
const greeting = '你好'; // ESLint will error: no-chinese-character