<commit_before># babel-plugin-transform-react-jsx-source

> Adds source file and line number to JSX elements.

## Example

### In

```
<sometag />
```

### Out

```
<sometag __source={{fileName: 'this/file.js', lineNumber: 10}}/>
```

## Installation

```sh
npm install --save-dev babel-plugin-transform-react-jsx-source
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["transform-react-jsx-source"]
}
```

### Via CLI

```sh
babel --plugins transform-react-jsx-source script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["transform-react-jsx-source"]
});
```
<commit_msg>Tweak example in transform-jsx-source README [skip ci] (#4925)<commit_after># babel-plugin-transform-react-jsx-source

> Adds source file and line number to JSX elements.

## Example

### In

```
<sometag />
```

### Out

```
<sometag __source={ { fileName: 'this/file.js', lineNumber: 10 } } />
```

## Installation

```sh
npm install --save-dev babel-plugin-transform-react-jsx-source
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["transform-react-jsx-source"]
}
```

### Via CLI

```sh
babel --plugins transform-react-jsx-source script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["transform-react-jsx-source"]
});
```

{'fraction_non_alphanumeric': 0.21532846715328466, 'fraction_numerical': 0.00583941605839416, 'mean_word_length': 4.212927756653992, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6984889', 'n_tokens_mistral': 543, 'n_tokens_neox': 491, 'n_words': 104}