# eslint-plugin-jsx-fragments

> Ensure that React is imported whenever the fragment syntax is used

Latest version **0.2.0** (published 2020-08-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-jsx-fragments
pnpm add eslint-plugin-jsx-fragments
yarn add eslint-plugin-jsx-fragments
bun add eslint-plugin-jsx-fragments
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2020-08-25 |
| First published | 2020-08-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.10.0 |
| Dependencies | 1 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jaron Heard |
| Maintainers | jaronheard |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-jsx-fragments
- npm.io page: https://npm.io/package/eslint-plugin-jsx-fragments

## Dependencies (1)

- [requireindex](https://npm.io/package/requireindex.md) ~1.1.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2020-08-25
- 0.1.3 — 2020-08-25
- 0.1.2 — 2020-08-25
- 0.1.1 — 2020-08-25
- 0.1.0 — 2020-08-25

## README

# eslint-plugin-jsx-fragments

Ensure that React is imported whenever the fragment syntax is used

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ npm i eslint --save-dev
```

Next, install `eslint-plugin-jsx-fragments`:

```
$ npm install eslint-plugin-jsx-fragments --save-dev
```

## Usage

Add `jsx-fragments` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
  "plugins": ["jsx-fragments"]
}
```

### Recommended configuration

The `recommended` configuration can be used in conjunction with [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react).

```json
{
  "extends": ["plugin:react/recommended", "plugin:jsx-fragments/recommended"]
}
```

It applies these rules.

```json
{
  "rules": {
    "jsx-fragments/react-in-fragment-scope": "error",
    "jsx-fragments/fragment-uses-react": "error"
  }
}
```

### Manual rule setup

You can also use the rule manually.

```json
{
  "rules": {
    "jsx-fragments/react-in-fragment-scope": 2,
    "jsx-fragments/react-in-fragment-scope": 1
  }
}
```

## Supported Rules

- [jsx-fragments/react-in-fragment-scope](https://github.com/jaronheard/eslint-plugin-jsx-fragments/blob/master/docs/rules/react-in-fragment-scope.md): Similar to [react/react-in-jsx-scope](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md) but it ignores custom pragmas and only checks files that contain fragments.

```

```

---
_Source: https://npm.io/package/eslint-plugin-jsx-fragments · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
