An ilib-lint plugin for linting React files for internationalization (i18n) problems. Current stable version is 2.0.4, released as part of the ilib-mono monorepo. It provides parsers for JavaScript, JSX, TypeScript TSX, Flow, and properties files, along with rules like no-hard-coded-strings and no-nested-messages for react-intl. It is ESM-only, requires Node.js >=12, and is designed for integration with the ilib-lint framework. Key differentiators include deep i18n-aware linting for React apps, support for both JSX and TSX, and a plugin-based architecture.
npm install ilib-lint-reactNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configuration for ilib-lint to use the react plugin with parsers for JSX and JS files.
Use import syntax or dynamic import() in Node.js >=12.
Update your code to avoid using FormattedCompMessage; the rule will flag it.
Set parser to 'jsx' in configuration for files that may contain JSX.
Upgrade Node.js to at least version 12.
Add "react" to the plugins list in your ilib-lint configuration.
Use named imports: import { JSParser } from 'ilib-lint-react';Switch to import syntax or use dynamic import().
Import from the top-level package: import { JSXParser } from 'ilib-lint-react';Ensure plugin is in 'plugins' list and ruleset 'react' is used. The rule name is 'ban-formattedcompmessage'.