# General Translation Changelog: @generaltranslation/react-core-linter 0.1.0: ESLint rules for React Core
URL: https://generaltranslation.com/en-GB/blog/react-core-linter_v0_1_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Ernest McCarter
Published: 2026-01-26

## Overview

**@generaltranslation/react-core-linter 0.1.0** introduces ESLint rules for General Translation React Core integration.

This plugin catches common implementation errors that we have seen in the wild.

import Video from '@/components/Video';

<Video src="https://assets.gtx.dev/docs/react-core-linter/web-0.1.0.mp4" />


## Installation

```bash copy
npm install @generaltranslation/react-core-linter --save-dev
```

Two rules are included in this initial release:

* [`static-jsx`](/docs/react/reference/lint-rules#static-jsx) - Enforces proper variable wrapping in [`<T>`](/docs/react/reference/components/t) components
* [`static-string`](/docs/react/reference/lint-rules#static-string) - Ensures static strings in translation functions

***

## Static JSX Validation

The `static-jsx` rule prevents dynamic content from appearing directly inside [`<T>`](/docs/react/reference/components/t) components.
Dynamic content must be wrapped in [variable components](/docs/react/guides/formatting-variables).

```jsx copy
// ❌ Wrong
<T>Hello {userName}!</T>

// ✅ Correct  
<T>Hello <Var>{userName}</Var>!</T>
```

***

## Static String Enforcement

The `static-string` rule ensures translation functions only accept fixed strings.

```jsx copy
const gt = useGT();

// ❌ Wrong
gt(`Hello ${name}`)
gt('Hello ' + name)

// ✅ Correct
gt('Hello {name}!', { name })
```

***


## Configuration

Add to your ESLint config:

```javascript copy title="eslint.config.js"
import { defineConfig } from 'eslint/config';
import gtLint from '@generaltranslation/react-core-linter';

export default defineConfig([
  gtLint.configs.recommended,
]);
```

***

This initial release provides foundational linting capabilities for React Core translation patterns.
Future versions will expand rule coverage and add auto-fixing for other common violations.

***

Use [variable components](/docs/react/guides/formatting-variables) for dynamic content and [string translation](/docs/react/guides/translating-strings) for plain text strings.

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
