# esformatter-jsx-indent

> esformatter plugin for jsx indent

Latest version **1.0.1** (published 2017-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install esformatter-jsx-indent
pnpm add esformatter-jsx-indent
yarn add esformatter-jsx-indent
bun add esformatter-jsx-indent
```

## 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.0.1 |
| Published | 2017-05-08 |
| First published | 2017-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Wenjun Xiao |
| Maintainers | wenjunxiao |
| Keywords | esformatter, jsx, indent, ReturnStatement |

## Links

- npm: https://www.npmjs.com/package/esformatter-jsx-indent
- Repository: https://github.com/wenjunxiao/esformatter-jsx-indent
- Homepage: https://github.com/wenjunxiao/esformatter-jsx-indent#readme
- Issues: https://github.com/wenjunxiao/esformatter-jsx-indent/issues
- npm.io page: https://npm.io/package/esformatter-jsx-indent

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^2.6.6
- [rocambole-token](https://npm.io/package/rocambole-token.md) ^1.2.1
- [rocambole-indent](https://npm.io/package/rocambole-indent.md) ^2.0.4

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-05-08
- 1.0.0 — 2017-05-07

## README

# esformatter-jsx-indent

[![NPM version](https://img.shields.io/npm/v/esformatter-jsx-indent.svg?style=flat-square)](https://www.npmjs.com/package/esformatter-jsx-indent)
[![Build status](https://img.shields.io/travis/wenjunxiao/esformatter-jsx-indent.svg?style=flat-square)](https://travis-ci.org/wenjunxiao/esformatter-jsx-indent)
[![Test coverage](https://img.shields.io/coveralls/wenjunxiao/esformatter-jsx-indent.svg?style=flat-square)](https://coveralls.io/github/wenjunxiao/esformatter-jsx-indent)
[![Downloads](http://img.shields.io/npm/dm/esformatter-jsx-indent.svg?style=flat-square)](https://npmjs.org/package/esformatter-jsx-indent)

  Esformatter-jsx-indent is a plugin for 
  [esformatter](https://github.com/millermedeiros/esformatter) 
  meant to format jsx files with a correct indent which have `return` or `declare` expression.

  Turn this:
```js
function render(){
  const a = (
  <span></span>
  );
  return (
    <div>{ a }</div>
    );
}
```
  into:
```js
function render(){
  const a = (
    <span></span>
  );
  return (
    <div>{ a }</div>
  );
}
```

## Installation

```bash
$ npm install esformatter-jsx-indent --save-dev
```

## Configuration

  Add to your esformatter config file:
```javascript
{
  "root": true,
  "plugins": [
    "esformatter-jsx-indent"
  ],
  "indent": {
    // By default is 1
    "JSXExpression": 1,
    // By default is 0, recursively indent the sub jsx of the expression
    // set 1 if without `esformatter-jsx`, 
    "JSXExpression.Recursive": 0
  }
}
```

## License

  [MIT](./LICENSE)

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