# forbid-foreign-prop-types

Rule `react/forbid-foreign-prop-types`. Disallow using another component's propTypes

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

## Linters

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

## Code examples

### Incorrect: the rule reports this

```js
import SomeComponent from './SomeComponent';
SomeComponent.propTypes;

var { propTypes } = SomeComponent;

SomeComponent['propTypes'];
```

### Correct: the rule accepts this

```js
import SomeComponent, {propTypes as someComponentPropTypes} from './SomeComponent';
```

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-foreign-prop-types": "error",
    },
  },
];
```

## Presets that enable it

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

## Related rules

- [react/no-typos](https://lintradar.dev/rules/react/no-typos.md): Disallow common typos
- [react/style-prop-object](https://lintradar.dev/rules/react/style-prop-object.md): Enforce style prop value is an object
- [react/jsx-pascal-case](https://lintradar.dev/rules/react/jsx-pascal-case.md): Enforce PascalCase for user-defined JSX components
- [react/self-closing-comp](https://lintradar.dev/rules/react/self-closing-comp.md): Disallow extra closing tags for components without children
- [react/jsx-fragments](https://lintradar.dev/rules/react/jsx-fragments.md): Enforce shorthand or standard form for React fragments
- [react/jsx-no-bind](https://lintradar.dev/rules/react/jsx-no-bind.md): Disallow `.bind()` or arrow functions in JSX props

---

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