# no-typos

Rule `react/no-typos`. Disallow common typos

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

## Linters

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

## Code examples

### Incorrect: the rule reports this

```js
class MyComponent extends React.Component {
  static PropTypes = {}
}

class MyComponent extends React.Component {
  static proptypes = {}
}

class MyComponent extends React.Component {
  static ContextTypes = {}
}

class MyComponent extends React.Component {
  static contexttypes = {}
}

class MyComponent extends React.Component {
  static ChildContextTypes = {}
}

class MyComponent extends React.Component {
  static childcontexttypes = {}
}

class MyComponent extends React.Component {
  static DefaultProps = {}
}

class MyComponent extends React.Component {
  static defaultprops = {}
}

// …
```

### Correct: the rule accepts this

```js
class MyComponent extends React.Component {
  static propTypes = {}
}

class MyComponent extends React.Component {
  static contextTypes = {}
}

class MyComponent extends React.Component {
  static childContextTypes = {}
}

class MyComponent extends React.Component {
  static defaultProps = {}
}

class MyComponent extends React.Component {
  componentWillMount() {}
}

class MyComponent extends React.Component {
  componentWillReceiveProps() {}
}

class MyComponent extends React.Component {
  componentDidUpdate() {}
}

class MyComponent extends React.Component {
  static propTypes = {
    a: PropTypes.bool.isRequired
  }
// …
```

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-typos": "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% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [nextjs/no-typos](https://lintradar.dev/rules/nextjs/no-typos.md): Prevent common typos in Next.js data fetching functions.
- [react/style-prop-object](https://lintradar.dev/rules/react/style-prop-object.md): Enforce style prop value is an object
- [react/forbid-foreign-prop-types](https://lintradar.dev/rules/react/forbid-foreign-prop-types.md): Disallow using another component's propTypes
- [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

---

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