# eslint-plugin-jsx-expressions

> Rules for safe logical expressions in JSX

Latest version **1.3.2** (published 2023-11-18) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.2 |
| Published | 2023-11-18 |
| First published | 2021-10-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 12.x \|\| 14.x \|\| >= 16 |
| Dependencies | 2 |
| Unpacked size | 15.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 100 |
| Author | Heather Luisson |
| Maintainers | hpersson |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-jsx-expressions
- Repository: https://github.com/hluisson/eslint-plugin-jsx-expressions
- Homepage: https://github.com/hluisson/eslint-plugin-jsx-expressions#readme
- Issues: https://github.com/hluisson/eslint-plugin-jsx-expressions/issues
- npm.io page: https://npm.io/package/eslint-plugin-jsx-expressions

## Dependencies (2)

- [tsutils](https://npm.io/package/tsutils.md) ^3.21.0
- [@typescript-eslint/utils](https://npm.io/package/@typescript-eslint/utils.md) ^6.10.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
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.3.2 (latest) — 2023-11-18
- 1.3.1 — 2021-12-19
- 1.3.0 — 2021-12-06
- 1.2.0 — 2021-10-17
- 1.1.0 — 2021-10-16
- 1.0.0 — 2021-10-16

## README

# eslint-plugin-jsx-expressions

Rules for safe logical expressions in JSX

## Installation

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

```sh
npm i eslint --save-dev
```

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

```sh
npm install eslint-plugin-jsx-expressions --save-dev
```

## Usage

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

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

Then configure the rules you want to use under the rules section.

```json
{
  "rules": {
    "jsx-expressions/strict-logical-expressions": "error"
  }
}
```

## Supported Rules

- [jsx-expressions/strict-logical-expressions](https://github.com/hluisson/eslint-plugin-jsx-expressions/blob/master/docs/rules/strict-logical-expressions.md): Enforces logical "&&" expressions do not use potentially falsey numbers or strings.

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