# eslint-plugin-hfe

> eslint additional rules for hfe

Latest version **0.0.4** (published 2016-06-23) · MIT license · 0 weekly downloads

## Install

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

## 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.0.4 |
| Published | 2016-06-23 |
| First published | 2016-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 薛定谔的猫 |
| Maintainers | zhaoshengdong |
| Keywords | eslint, eslintplugin, eslint-plugin, hfe |

## Links

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

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

- 0.0.4 (latest) — 2016-06-23
- 0.0.3 — 2016-06-08
- 0.0.2 — 2016-06-01
- 0.0.1 — 2016-05-29

## README

# eslint-plugin-hfe

## 安装

1.安装eslint [ESLint](http://eslint.org):

```
$ npm install eslint --save-dev
```

2.安装eslint-plugin-hfe  `eslint-plugin-hfe`:

```
$ npm install eslint-plugin-hfe --save-dev
```

**Note:** 如果eslint是全局安装(-g)，eslint-plugin-hfe也应该全局安装(-g)

## 使用

将以下代码加入到`.eslintrc` 配置文件中:

```json
{
  "plugins": [
    "hfe"
  ],
  "rules": {
    "hfe/default-para-last": 2,
    "hfe/for-condition": 2,
    "hfe/for-direction": 2,
    "hfe/no-label-in-switch": 2,
    "hfe/short-circuit-prevent-null-pointer": 2,
    "hfe/new-function": 2
  }
}
```

## Supported Rules

* 0."for" loop incrementers should modify the variable being tested in the loop's stop condition
* 1."new" operators should be used with functions
* 2."switch" statements should not contain non-case labels
* 3.A "for" loop update clause should move the counter in the right direction
* 4.Function parameters with default values should be last,
* 5.Short-circuit logic should be used to prevent null pointer dereferences in conditionals


## 参考文档
+ http://eslint.org/docs/developer-guide/working-with-rules
+ http://sonar.ep.sankuai.com/coding_rules#languages=js

## License

Distributed under the MIT license. See LICENSE for details.

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