# no-unknown-property

Rule `react/no-unknown-property`. Disallow usage of unknown DOM property

- Source: react
- Technologies: React
- Kind: suspicious
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 84.5M weekly downloads of presets that enable it
- Trend: +32.5% last quarter
- Rank: #209 by reach, #1071 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `react/no-unknown-property` | yes | safe | package `eslint-plugin-react` | [docs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md) |
| Oxlint | `react/no-unknown-property` | no | safe | plugin `react`, category restriction | [docs](https://oxc.rs/docs/guide/usage/linter/rules/react/no-unknown-property.html) |
| Biome | `suspicious/noUnknownAttribute` | no | no | group suspicious, since 2.3.3 | [docs](https://biomejs.dev/linter/rules/no-unknown-attribute/) |

## Code examples

### Incorrect: the rule reports this

```jsx
var React = require('react');

var Hello = <div class="hello">Hello World</div>;
var Alphabet = <div abc="something">Alphabet</div>;

// Invalid aria-* attribute
var IconButton = <div aria-foo="bar" />;
```

### Correct: the rule accepts this

```jsx
var React = require('react');

var Hello = <div className="hello">Hello World</div>;
var Button = <button disabled>Cannot click me</button>;
var Img = <img src={catImage} alt="A cat sleeping on a keyboard" />;

// aria-* attributes
var IconButton = <button aria-label="Close" onClick={this.close}>{closeIcon}</button>;

// data-* attributes
var Data = <div data-index={12}>Some data</div>;

// React components are ignored
var MyComponent = <App class="foo-bar"/>;
var AnotherComponent = <Foo.bar for="bar" />;

// Custom web components are ignored
var MyElem = <div class="foo" is="my-elem"></div>;
var AtomPanel = <atom-panel class="foo"></atom-panel>;
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import react from "eslint-plugin-react";

export default [
  {
    plugins: { react },
    rules: {
      "react/no-unknown-property": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "react"
  ],
  "rules": {
    "react/no-unknown-property": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noUnknownAttribute": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [React recommended](https://lintradar.dev/presets/react-recommended.md) | ESLint | `eslint-plugin-react` | 21 | 81.1M | +34.1% |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [react/react-in-jsx-scope](https://lintradar.dev/rules/react/react-in-jsx-scope.md): Disallow missing React when using JSX
- [react/prop-types](https://lintradar.dev/rules/react/prop-types.md): Disallow missing props validation in a React component definition
- [react/jsx-no-target-blank](https://lintradar.dev/rules/react/jsx-no-target-blank.md): Disallow `target="_blank"` attribute without `rel="noreferrer"`
- [react/display-name](https://lintradar.dev/rules/react/display-name.md): Disallow missing displayName in a React component definition
- [react/no-deprecated](https://lintradar.dev/rules/react/no-deprecated.md): Disallow usage of deprecated methods
- [react/no-unescaped-entities](https://lintradar.dev/rules/react/no-unescaped-entities.md): Disallow unescaped HTML entities from appearing in markup

---

Web page: https://lintradar.dev/rules/react/no-unknown-property. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
