Changelog - 2026-10-06
A React frontend shares one lint source with its backend
Feature Behavior ChangeIn one line. @venizia/dev-configs exports ReactEslintConfigs: the base preset plus what a React frontend needs.
js
// eslint.config.mjs
import { ReactEslintConfigs } from '@venizia/dev-configs';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import jsxA11y from 'eslint-plugin-jsx-a11y';
export default ReactEslintConfigs.create({ plugins: { react, reactHooks, jsxA11y } });What changed
- Plugins are options.
ReactEslintConfigs.create()takes them, so a backend that never calls it installs nothing new.reactVersiondefaults to'detect'; under ESLint 10, pass it ('19.2'), since eslint-plugin-react 7 cannot detect it there. - Added on top of
eslintConfigs: React correctness rules (jsx-key,no-children-prop,no-deprecatedand 11 more) andjsx-a11ybasics (alt-text,aria-props,aria-roleand 6 more) aserroron.jsx/.tsx;react-hooks/rules-of-hooksaserrorandreact-hooks/exhaustive-depsaswarnon.js,.jsx,.tsand.tsx;@typescript-eslint/consistent-type-importsaserror(prefer: 'type-imports');@typescript-eslint/no-explicit-anyaswarn. - Relaxed on purpose for a UI:
naming-conventionallows PascalCase functions in.jsx/.tsx;no-floating-promises,no-void,no-invalid-thisandno-use-before-defineareoff;no-shadowandno-unused-varsarewarn(_-prefixed names ignored). - The base, for every consumer:
@typescript-eslint/ban-ts-commentgoes fromofftoerror(@ts-expect-errorwith a description is still allowed), and@typescript-eslint/no-namespacegoes fromofftoerror.
Who is affected
- A React frontend. Replace a second base preset, or per-package React rules, with
ReactEslintConfigs.create(). Keep only your house rules on top. - Code with
@ts-ignore,@ts-nocheck, or a bare@ts-expect-error. It now fails lint. Use@ts-expect-errorwith a reason. - Code with a
namespace. It now fails lint. Use modules.