ESLint plugin providing linting rules for gettext internationalization API usage. Version 1.2.0 (latest stable) released in 2023. It enforces best practices such as preventing non-literal arguments in gettext calls and ensuring positional markers for multiple variables. Unlike generic i18n linting, this plugin targets gettext specifically, supporting both Jed and Django JS Catalog integrations. Designed for Node.js >=6.0.0, it requires ESLint as a peer dependency and is maintained by App Annie.
npm install eslint-plugin-gettextVerified import paths — ran on the pinned version, not inferred.
Configures ESLint with gettext plugin and enables two rules to catch invalid gettext calls.
Always use static string literals: gettext('static string').Run 'npm install eslint --save-dev' alongside this plugin.
Ensure strings with multiple variables use positional markers like %1$s %2$d.
If using a different function name, manually alias or wrap calls.
Run 'npm install eslint-plugin-gettext --save-dev' and ensure node_modules is correct.
Add 'plugins: ["gettext"]' to ESLint config and use the full rule name 'gettext/no-variable-string'.
Run 'npm install eslint-plugin-gettext --save-dev' and check peer dependency eslint.
No dependency data recorded yet.