New
Introducing React Doctor for Enterprise

react/no-unknown-property

Disallow unknown or mis-cased DOM attributes in JSX, like class instead of className.

Validation prompt

Use this to decide whether a fired diagnostic is real or a false positive.

Fires when a lowercase JSX tag (treated as a DOM element) carries an attribute that isn't a recognized HTML/SVG property, uses the HTML spelling instead of React's camelCased form (class vs className, for vs htmlFor, tabindex vs tabIndex), or is an invalid aria-* typo. Hyphenated custom web components and uppercase React components are ignored. False positive: library-injected props such as emotion's css or framer-motion's animation props — allowlist them via the rule's ignore option.

Fix prompt

Use this once validation confirms the diagnostic is real.

Rename to React's camelCased equivalent: class to className, for to htmlFor, tabindex to tabIndex, contenteditable to contentEditable, spellcheck to spellCheck, autofocus to autoFocus. Fix typos in aria-* against the ARIA spec. For library props like emotion's css or framer-motion's transition, allowlist via { ignore: ['css', 'transition'] } in the rule config. See https://oxc.rs/docs/guide/usage/linter/rules/react/no-unknown-property.html and https://react.dev/reference/react-dom/components/common

More Correctness rules from the rules reference:

  • react/require-render-return: Require class component render() methods to return a value — a missing return renders nothing.
  • react/rules-of-hooks: Enforce the Rules of Hooks: call hooks only at the top level of components and custom hooks, never in conditions or loops.
  • deslop/commonjs-in-esm: Flag CommonJS constructs (require/module.exports/exports.x) inside an ESM module.
  • deslop/lazy-import-at-top-level: Flag a dynamic import() at module top level that is awaited or .then/.catch/.finally-ed during load (no laziness benefit); prefer a static import.
  • deslop/simplifiable-expression: Disallow expressions that collapse to a simpler equivalent, e.g. !!x → Boolean(x).