Opinionated modern ESLint configuration for React projects, built on top of
@dephub/eslint-ts.
- ⚛️ Extends
@dephub/eslint-tsfor full TS + React support - 🧠 React and React Hooks best practices
- 🟦 Strict TypeScript rules included
- 🔀 Import sorting and unused import handling
- 🧹 Prettier-compatible formatting rules
- npm:
npm install -D eslint @dephub/eslint-react - pnpm:
pnpm add -D eslint @dephub/eslint-react - yarn:
yarn add -D eslint @dephub/eslint-react - bun:
bun add -D eslint @dephub/eslint-react
Since this config extends
@dephub/eslint-ts, make sure your project is configured for TypeScript.
Create an eslint.config.mjs file:
import { defineConfig } from 'eslint/config';
import reactConfig from '@dephub/eslint-react';
export default defineConfig(reactConfig);You don’t need to manually include @dephub/eslint-ts — it’s already extended internally.
import { defineConfig } from 'eslint/config';
import reactConfig from '@dephub/eslint-react';
export default defineConfig([
...reactConfig,
{
rules: {
'react/react-in-jsx-scope': 'off',
},
},
]);Then run ESLint normally:
npx eslint .MIT License – see LICENSE for details.
Author: Estarlin R (estarlincito.com)