<commit_before># exhaustive-prop-types

Extend React PropTypes to check undocumented props at runtime.

[PropTypes](https://www.npmjs.com/package/prop-types) checks at runtime the type and the requirement of some props.
Some static checking tools (such as [eslint-strict-react](https://www.npmjs.com/package/eslint-plugin-react) with the
[prop-types rule](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md)) allows to
verify that you define in your PropTypes the props that you use. However they don't check if you are
providing props to your component which aren't defined in your PropTypes.

`exhaustive-prop-types` checks at runtime that all received props are defined in your PropTypes. It catches potentially
extraneous or undocumented props. It helps refactoring and catching over-connected props from Redux.


## Installation

```shell
npm install --save exhaustive-prop-types
```


## Usage

Let's start with a simple component.

```jsx
import React from 'react';

class MyComponent extends React.Component {
  render() {
    return (
      <div>
        My name is {this.props.name}.
      </div>
    )
  }<commit_msg>Reword and simplify README introduction<commit_after># exhaustive-prop-types

Extend PropTypes to check undocumented props at runtime.

[PropTypes](https://www.npmjs.com/package/prop-types) checks at runtime the values of the described props.
Some static checking tools (such as [eslint-strict-react](https://www.npmjs.com/package/eslint-plugin-react) with the
[prop-types rule](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md)) can
verify that component aren't using props not define in `propTypes`. However nothing checks if the component is given
props not defined defined in `propTypes`.

`exhaustive-prop-types` checks at runtime that all received props are defined in your `propTypes`. It catches
potentially extraneous or undocumented props. It helps refactoring and catching over-connected props from Redux.


## Installation

```shell
npm install --save exhaustive-prop-types
```


## Usage

Let's start with a simple component.

```jsx
import React from 'react';

class MyComponent extends React.Component {
  render() {
    return (
      <div>
        My name is {this.props.name}.
      </div>
    )
  }
{'fraction_non_alphanumeric': 0.09624514458351316, 'fraction_numerical': 0.0, 'mean_word_length': 4.116997792494481, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3968662', 'n_tokens_mistral': 675, 'n_tokens_neox': 636, 'n_words': 244}