Guardrails for
AI-written React

Jawad SefianiReact Osaka 2026

Guide it. Then verify it.

Slides

Copy the config

ESLint 10 flat config from the talk. 4 layers: React Compiler, modern React rules, "You Might Not Need an Effect", and guard-the-guards.

eslint.config.js
// ESLint 10 flat config. Every rule and message on the slides comes from this file.
import { defineConfig } from 'eslint/config'
import tseslint from 'typescript-eslint'
import reactHooks from 'eslint-plugin-react-hooks'
import eslintReact from '@eslint-react/eslint-plugin'
import noEffect from 'eslint-plugin-react-you-might-not-need-an-effect'
import comments from '@eslint-community/eslint-plugin-eslint-comments/configs'

export default defineConfig({
  files: ['src/**/*.{ts,tsx}'],
  languageOptions: { parserOptions: { projectService: true } },
  extends: [
    tseslint.configs.base,
    reactHooks.configs.flat.recommended,
    eslintReact.configs['recommended-type-checked'],
    noEffect.configs.recommended,
    comments.recommended,
  ],
  rules: {
    '@eslint-community/eslint-comments/require-description': 'error',
    '@eslint-community/eslint-comments/no-restricted-disable': ['error', 'react-hooks/*'],
    '@typescript-eslint/no-explicit-any': 'error',
    '@typescript-eslint/ban-ts-comment': 'error',
  },
})

Packages

eslint-plugin-react-hooks ^7
@eslint-react/eslint-plugin ^5
eslint-plugin-react-you-might-not-need-an-effect
@eslint-community/eslint-plugin-eslint-comments
typescript-eslint

Resources