Skip to content
PluginStats

eslint-plugin-react-google-translate weekly downloads statistics

By alistair-coup · npm · ESLint plugins

ESLint plugin to highlight code patterns in React applications which can lead to browser exceptions while the Google Translate browser extension is in use.

View on npm Fresh · Oct 18, 2026

eslint-plugin-react-google-translate has 96,097 recorded weekly downloads on npm, a decrease of 24.8% over the past 30 days, ranking #477 of 2,322 tracked listings.

Weekly downloads
96,097
Official API · Oct 18, 2026
7-day growth
-48.6%
-90.9K weekly downloads
30-day growth
-24.8%
-31.6K weekly downloads
90-day growth
-23.5%
-29.5K weekly downloads
Rank
#477
Among tracked npm listings

About eslint-plugin-react-google-translate

eslint-plugin-react-google-translate

ESLint plugin to highlight code patterns in React applications which can lead to browser exceptions while the Google Translate browser extension is in use. This is a common problem for React applications and a known issue to both React and Google.

When active on a page, the Google Translate browser extension is very liberal with its DOM manipulation, notably, replacing text nodes with font tags. This can be a problem for React applications as it can cause exceptions to be thrown when conditionally rendering text nodes with siblings within JSX expressions.

Whilst many proposals have been suggested to avoid browser issues, this ESLint plugin aims to solve the problem far earlier in the development process by highlighting certain code patterns to the developer which can cause a browser exception to be thrown where Google Translate is in use.

Examples of code that can throw:

function SomeComponent({ val }) {
  return (
    <div>
      <p>
        // ❌ foo & bar must be wrapped
        {val ? 'foo' : 'bar'} <span>hello world</span>
      </p>
      <p>
        // ❌ static text nodes must be wrapped when they are preceded by a
        conditional expression
        {val ? <span>foo</span> : <span>bar</span>} hello world
      </p>
      // ❌ all text must be wrapped in spans ('foo', 'bar' & 'hello world')
      <p>{val ? 'foo' : 'bar'} hello world</p>
      <p>
        // ❌ `val.toLocaleString()` returns a text node and should be wrapped
        {val ? val.toLocaleString() : <span>bar</span>} <span>hello world</span>
      </p>
      <p>
        // ❌ object properties rendering a text node should be wrapped
        {val ? obj.a : <span>bar</span>} <span>hello</span>
      </p>
      <p>
        // ❌ 'foo' needs to be wrapped in a span (expression has a sibling)
        {val && 'foo'}
        <span>hello world</span>
      </p>
      // ✅ conditionally rendered text nodes with no siblings won't throw
      <p>{val || 'bar'}</p>
      // ✅ conditionally rendered text nodes with no siblings won't throw
      <p>{val ? 'foo' : 'bar'}</p>
      // ✅ conditional expression follows the static text node and won't throw
      <p>hello world {val ? <span>foo</span> : <span>bar</span>}</p>
    </div>
  );
}

The safe way to write this code, avoiding browser exceptions, is to wrap each of the conditionally rendered text nodes (with siblings) in an element (for example, a <span>). Static text nodes with preceding conditionally rendered siblings must also be wrapped:

function SomeComponent({ val }) {
  return (
    <div>
      // ✅ all text nodes are wrapped
      <p>
        {val ? <span>foo</span> : <span>bar</span>}
        <span>hello world</span>
      </p>
      <p>
        // ✅ `val.toLocaleString()` is wrapped
        {val ? <span>{val.toLocaleString()}</span> : <span>bar</span>}
        <span>hello world</span>
      </p>
      <p>
        // ✅ object properties rendering a text node are wrapped
        {val ? <span>{obj.a}</span> : <span>bar</span>} <span>hello</span>
      </p>
      <p>
        // ✅ 'foo' is wrapped (expression has a sibling)
        {val && <span>foo</span>} <span>hello world</span>
      </p>
      // ✅ conditionally rendered text, but no siblings
      <p>{val || 'bar'}</p>
      // ✅ conditionally rendered text, but no siblings
      <p>{val ? 'foo' : 'bar'}</p>
    </div>
  );
}

An additional problem identified is React components returning text nodes directly (or numerical values which will be rendered as text). When a React component returns values other than JSX / null, Google Translate can continue to display stale values after state changes, without any error being thrown. Since this is very hard to debug it is better to avoid it altogether.

export function SomeComponent({ input }) {
  if (!input) {
    return null; // ✅ not a problem
  }

  if (input === 'a') {
    return 'A'; // ❌ the browser can display the stale value when state changes
  } else if (input === 'b') {
    return 2; // ❌ numerical values which are rendered as strings can also experience this
  } else if (input === 'c') {
    return `Template Litera${1}`; // ❌ template literals are displayed as strings and can also experience this
  } else {
    return <span>I am fine</span>; // ✅ returning JSX prevents the problem
  }
}

Installation

npm install eslint-plugin-react-google-translate --save-dev

Usage (ESLint 9+, flat config)

Use the recommended config to enable all rules:

// eslint.config.js
import reactGoogleTranslate from 'eslint-plugin-react-google-translate';

export default [reactGoogleTranslate.configs.recommended];

Or configure the rules individually (Each rule can be treated as a warning if an error is deemed too strict.):

// eslint.config.js
import reactGoogleTranslate from 'eslint-plugin-react-google-translate';

export default [
  {
    plugins: {
      'react-google-translate': reactGoogleTranslate,
    },
    rules: {
      'react-google-translate/no-conditional-text-nodes-with-siblings': 'error',
      'react-google-translate/no-return-text-nodes': 'warn',
    },
  },
];

Usage (ESLint 8, legacy .eslintrc)

The plugin still works with older ESLint versions using the legacy config format. Add react-google-translate to the plugins section of your .eslintrc configuration file:

{
  "plugins": ["react-google-translate"],
  "rules": {
    "react-google-translate/no-conditional-text-nodes-with-siblings": "error",
    "react-google-translate/no-return-text-nodes": "error"
  }
}

TypeScript

The plugin supports TypeScript and will use type information where available. Type-aware checks run in addition to the standard pattern-based checks.…

Description from the npm listing.

  • eslint
  • eslintplugin
  • eslint-plugin
  • google-translate
  • react

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

eslint-plugin-react-google-translate weekly downloads on npm, last 90 days: 96,097 weekly downloads as of Oct 18, 2026, -23.5% over 90 days.eslint-plugin-react-google-translateWeekly downloads on npm · Last 90 days96,097downloads / week-23.5% over 90 days050K100K150K200K250KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
eslint-plugin-react-google-translate weekly downloads on npm, last 90 days: 96,097 weekly downloads as of Oct 18, 2026, -23.5% over 90 days.

7/30/90-day growth

eslint-plugin-react-google-translate weekly downloads growth on npm: -48.6% over 7 days, -24.8% over 30 days, -23.5% over 90 days.eslint-plugin-react-google-translateWeekly downloads growth on npm96,097downloads / week now7-day growth-90,929 weekly downloads-48.6%30-day growth-31,636 weekly downloads-24.8%90-day growth-29,464 weekly downloads-23.5%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
eslint-plugin-react-google-translate weekly downloads growth on npm: -48.6% over 7 days, -24.8% over 30 days, -23.5% over 90 days.

Ranking history

eslint-plugin-react-google-translate npm ranking history: currently #477 (by weekly downloads).eslint-plugin-react-google-translatenpm ranking · by weekly downloads · Last 90 days#477current rank#462#464#466#468#470#472#474#476#478#480Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
eslint-plugin-react-google-translate npm ranking history: currently #477 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 24, #17 (overall #477)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins256 listings · 13 pages · page 6, #5 (overall #105)
ESLint plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (122)
Recent weekly downloads observations for eslint-plugin-react-google-translate
Date (UTC)Weekly downloadsChange vs. previous
96,097+4.9K
91,204-5.5K
96,728+6.7K
90,033-46.8K
136,794-51.2K
188,0320
188,032+1K
187,026+51
186,975-375
187,350+3K
184,335-497
184,832+7.3K
177,555-45.1K
222,606—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/eslint-plugin-react-google-translate. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.