# @t3n/eslint-config-react

> ESLint config for t3n react projects

Latest version **7.0.1** (published 2026-09-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install @t3n/eslint-config-react
pnpm add @t3n/eslint-config-react
yarn add @t3n/eslint-config-react
bun add @t3n/eslint-config-react
```

## Health

**Score 55/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 7.0.1 |
| Published | 2026-09-15 |
| First published | 2020-07-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | itscursedphil, t3n-devops |

## Links

- npm: https://www.npmjs.com/package/@t3n/eslint-config-react
- Repository: https://github.com/t3n/js-frontend
- Homepage: https://github.com/t3n/js-frontend#readme
- Issues: https://github.com/t3n/js-frontend/issues
- npm.io page: https://npm.io/package/@t3n/eslint-config-react

## Recent versions

- 7.0.1 (latest) — 2026-09-15
- 7.0.0 — 2025-10-21
- 6.2.4 — 2025-09-22
- 6.2.3 — 2025-02-03
- 6.2.2 — 2024-11-11
- 6.2.1 — 2024-09-03
- 6.2.0 — 2024-03-07
- 6.1.0 — 2023-03-28
- 6.0.3 — 2022-09-20
- 6.0.2 — 2022-02-21
- 6.0.1 — 2022-02-18
- 5.3.1 — 2021-11-03
- 5.3.0 — 2021-04-29
- 5.2.1 — 2021-03-08
- 5.2.0 — 2020-12-30
- … 3 more at https://npm.io/package/@t3n/eslint-config-react/versions

## README

# @t3n/eslint-config-react

This package provides an extensible ESLint configuration for React development in (not exclusively) the t3n.de domain.

**Note:** This package uses ESLint v9's flat config format. Make sure you're using ESLint v9 or later.

## Installation

```bash
npm install --save-dev @t3n/eslint-config @t3n/eslint-config-react
```

## Usage

In your project's `eslint.config.js`, add the following:

```js
import baseConfig from '@t3n/eslint-config';
import reactConfig from '@t3n/eslint-config-react';
import { defineConfig } from 'eslint/config';

export default defineConfig([baseConfig, reactConfig]);
```

## ESM Projects and Import Extensions

When using this configuration in ESM projects (projects with `"type": "module"` in package.json), you may encounter ESLint errors about file extensions in import statements:

```
error  Unexpected use of file extension "js" for "./path/to/file.js"  import/extensions
```

This happens because Node.js ESM requires explicit file extensions (`.js`, `.mjs`) for relative imports, but the default `import/extensions` rule enforces omitting them.

### Solution

To resolve this in your project's `eslint.config.js`, override the rule to allow `.js` extensions:

```js
import baseConfig from '@t3n/eslint-config';
import reactConfig from '@t3n/eslint-config-react';
import { defineConfig } from 'eslint/config';

export default defineConfig([
  baseConfig,
  reactConfig,
  {
    rules: {
      'import/extensions': [
        'error',
        'ignorePackages',
        {
          js: 'always', // or 'ignorePackages' to allow .js extensions
          mjs: 'never',
          jsx: 'never',
          ts: 'never',
          tsx: 'never',
        },
      ],
    },
  },
]);
```

Alternatively, you can disable the rule entirely for your project:

```js
import baseConfig from '@t3n/eslint-config';
import reactConfig from '@t3n/eslint-config-react';
import { defineConfig } from 'eslint/config';

export default defineConfig([
  baseConfig,
  reactConfig,
  {
    rules: {
      'import/extensions': 'off',
    },
  },
]);
```

---
_Source: https://npm.io/package/@t3n/eslint-config-react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
