# forbid-prop-types

Rule `react/forbid-prop-types`. Disallow certain propTypes

- Source: react
- Technologies: React
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 3.4M weekly downloads of presets that enable it
- Trend: +2.3% last quarter
- Rank: #1435 by reach, #1571 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `react/forbid-prop-types` | no | no | package `eslint-plugin-react` | [docs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-prop-types.md) |

## Code examples

### Incorrect: the rule reports this

```jsx
var Component = createReactClass({
  propTypes: {
    a: PropTypes.any,
    r: PropTypes.array,
    o: PropTypes.object
  },
...
});

class Component extends React.Component {
  ...
}
Component.propTypes = {
  a: PropTypes.any,
  r: PropTypes.array,
  o: PropTypes.object
};

class Component extends React.Component {
  static propTypes = {
    a: PropTypes.any,
    r: PropTypes.array,
    o: PropTypes.object
  }
  render() {
    return <div />;
  }
}
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { react },
    rules: {
      "react/forbid-prop-types": "error",
    },
  },
];
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |

## Related rules

- [react/destructuring-assignment](https://lintradar.dev/rules/react/destructuring-assignment.md): Enforce consistent usage of destructuring assignment of props, state, and context
- [react/jsx-closing-bracket-location](https://lintradar.dev/rules/react/jsx-closing-bracket-location.md): Enforce closing bracket location in JSX
- [react/default-props-match-prop-types](https://lintradar.dev/rules/react/default-props-match-prop-types.md): Enforce all defaultProps have a corresponding non-required PropType
- [react/jsx-closing-tag-location](https://lintradar.dev/rules/react/jsx-closing-tag-location.md): Enforce closing tag location for multiline JSX
- [react/jsx-curly-newline](https://lintradar.dev/rules/react/jsx-curly-newline.md): Enforce consistent linebreaks in curly braces in JSX attributes and expressions
- [react/state-in-constructor](https://lintradar.dev/rules/react/state-in-constructor.md): Enforce class component state initialization style

---

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