# @moka-fe/eslint-plugin

> Eslint Plugin of Moka

Latest version **1.0.1** (published 2020-12-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install @moka-fe/eslint-plugin
pnpm add @moka-fe/eslint-plugin
yarn add @moka-fe/eslint-plugin
bun add @moka-fe/eslint-plugin
```

## 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 | 2020-12-21 |
| First published | 2020-12-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Unpacked size | 18.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | moka-fe |
| Maintainers | lishunyang, wyuanhpp |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/@moka-fe/eslint-plugin
- npm.io page: https://npm.io/package/@moka-fe/eslint-plugin

## Dependencies (1)

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

## Recent versions

- 1.0.1 (latest) — 2020-12-21
- 1.0.0 — 2020-12-05

## README

# eslint-plugin-moka

Eslint Plugin of Moka

## Installation

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

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

Next, install `eslint-plugin-moka`:

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

**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-moka` globally.

## Usage

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

```json
{
    "plugins": [
        "moka"
    ]
}
```


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

```json
{
    "rules": {
        "moka/rule-name": 2
    }
}
```

## Supported Rules

* promise-return - Remind you to return something defined when the next promise chain needs parameters.

  ```js
  .then(() => {
    // not allowed (forget to return a value)
  })
  .then((result)) => {
  })
  ```

* no-jsx-spread-attribute - Forbid spread attribute in jsx element for better static anslysis.

  ```js
  <MyComponent {...this.props}/> // not allowed (using spread attribute)
  ```

* lingui-mark - Non-i18n string detector

  ```js
  const message = '你好世界' // Non-i18n string is detected
  ```

* no-global-assign - Forbid assigning variable to window/global.

  ```js
  window.userId = 123; // You may not want to assign variable to window/global
  ```

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