# eslint-plugin-intl-mobile

> Intl Mobile ESLint Rules.

Latest version **0.1.3** (published 2020-04-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-intl-mobile
pnpm add eslint-plugin-intl-mobile
yarn add eslint-plugin-intl-mobile
bun add eslint-plugin-intl-mobile
```

Provides the command `eslint-intl-mobile`.

## 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.1.3 |
| Published | 2020-04-22 |
| First published | 2020-04-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 7 |
| Unpacked size | 15.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | nikogu |
| Maintainers | nikogu |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

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

## Dependencies (7)

- [ora](https://npm.io/package/ora.md) ^4.0.3
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [eslint](https://npm.io/package/eslint.md) ~6.8.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [commander](https://npm.io/package/commander.md) ^5.0.0
- [requireindex](https://npm.io/package/requireindex.md) ~1.1.0
- [object.fromentries](https://npm.io/package/object.fromentries.md) ^2.0.1

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2020-04-22
- 0.1.2 — 2020-04-21
- 0.1.1 — 2020-04-21
- 0.1.0 — 2020-04-21

## README

# eslint-plugin-intl-mobile

Intl Mobile ESLint Rules.

## 使用

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

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

### 扫描项目使用

```bash
# 安装
$ npm install eslint-plugin-intl-mobile

# 打分模式【推荐】
$ npx eslint-intl-mobile -r

# 直接运行 eslint 扫描
$ npx eslint-intl-mobile

# 指定 parser
$ npx eslint-intl-mobile -p @typescript/eslint

# 指定扫描目录
$ npx eslint-intl-mobile -d ./src/pages/

# 指定 es6 parserOptions
$ npx eslint-intl-mobile -e

# 筛选只输出 intl-mobile eslint 结果
$ npx eslint-intl-mobile -f
```

#### 如果运行异常可以尝试

```bash
$ npx eslint-intl-mobile2
```

> 区别在于 `eslint-intl-mobile` 会用自己依赖的 `eslint` 执行，`eslint-intl-mobile2` 会用项目的 `eslint` 执行

### 当做插件使用

```
$ npm install eslint-plugin-intl-mobile
```

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

Add `plugin:intl-mobile/all` to the extends section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
    "extends": [
        "plugin:intl-mobile/all"
    ]
}
```

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

.eg

```js
{
  "extends": [
    "plugin:eslint-plugin-intl-mobile/all"
  ],
  "plugins": ["eslint-plugin-intl-mobile"],
  "parser": "@typescript-eslint/parser",
  "rules": {
    "intl-mobile/json-parse-try-catch": 2 // specify error type
  }
}
```

## Supported Rules

#### json-parse-try-catch

- 检测规则：`JSON.parse` 警告需要包裹 `try catch`;

#### rpc-no-number-parameter

- 检测规则：`RPC` 调用警告使用 `number` 类型参数;

#### while-warning

- 检测规则：`while` 使用警告;

#### yen-full-width-detect

- 检测规则：全角符号 `￥` 使用检测警告；

#### typeof-warning

- 检测规则：`typeof` 使用检测警告，如：`typeof a === 'object'`;

#### chain-warning

- 检测规则：链式访问变量使用检测警告，如： `a.b.c`；

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