# eslint-plugin-taro

> Taro specific linting plugin for ESLint

Latest version **4.2.1** (published 2026-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-taro
pnpm add eslint-plugin-taro
yarn add eslint-plugin-taro
bun add eslint-plugin-taro
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score; popular repo.

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

## Facts

| | |
|---|---|
| Version | 4.2.1 |
| Published | 2026-07-17 |
| First published | 2018-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 18 |
| Dependencies | 1 |
| Unpacked size | 34.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 37673 |
| Author | O2Team |
| Maintainers | defaultlee, yuche, thewawar |
| Keywords | taro, react, jsx |

## Links

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

## Dependencies (1)

- [has](https://npm.io/package/has.md) ^1.0.1

## 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

- 4.2.1 (latest) — 2026-07-17
- 4.2.2-beta.5 (beta) — 2026-09-14
- 4.2.2-alpha.2 (alpha) — 2026-09-01
- 2.2.22 (2.x) — 2024-01-09
- 3.3.0-alpha.0 (next) — 2021-04-12
- 3.0.29 (3.0) — 2021-03-09
- 3.2.0-canary.9 (canary) — 2021-02-24
- 1.3.46 (1.x) — 2020-10-21
- 0.0.0-experimental.2 (experimental) — 2020-04-27
- 4.2.2-beta.4 — 2026-09-08
- 4.2.2-beta.3 — 2026-09-08
- 4.2.2-beta.1 — 2026-09-02
- 4.2.2-alpha.1 — 2026-08-24
- 4.2.2-beta.0 — 2026-08-17
- 4.1.12-beta.71 — 2026-08-11
- … 563 more at https://npm.io/package/eslint-plugin-taro/versions

## README

# eslint-plugin-taro

Taro ESLint 插件，只有当 ESLint 规则全部都通过时，Taro 小程序端才可能正常运行。

## 安装/设置

通过 NPM 安装：

```bash
$ npm install eslint-plugin-taro --save-dev
```

在 `.eslintrc` 中设置：

```json
"extends": [
  "plugin:taro/all"
]
```

或者使用 `taro-cli` 创建模板自动设置。

## 规则

* [taro/custom-component-children](./docs/custom-component-children.md)
* [taro/if-statement-in-map-loop](./docs/if-statement-in-map-loop.md)
* [taro/manipulate-jsx-as-array](./docs/manipulate-jsx-as-array.md)
* [taro/no-anonymous-function-in-props](./docs/no-anonymous-function-in-props.md)
* [taro/no-jsx-in-class-method](./docs/no-jsx-in-class-method.md)
* [taro/no-jsx-in-props](./docs/no-jsx-in-props.md)
* [taro/no-ref](./docs/no-ref.md)
* [taro/no-spread-in-props](./docs/no-ref.md)
* [taro/no-stateless-component](./docs/no-stateless-component.md)

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