eslint-plugin-hooks-limit

1.0.0 • Public • Published

eslint-plugin-hooks-limit

限制项目中hooks调用次数

Installation

首先安装ESLint:

npm i eslint --save-dev

安装插件 eslint-plugin-hooks-limit:

npm install eslint-plugin-hooks-limit --save-dev

使用

将eslint-plugin-hooks-limit插件添加到 .eslintrc配置文件.

{
    "plugins": [
        "hooks-limit"
    ]
}

配置规则.支持同时配置多个规则,如下格式

{
     "rules": {
        "hooks-limit/no-too-many-hooks": [2, { "list": [
            { "name": "useState", "limit": 2 },
            { "name": "useCallback", "limit": 3 }
        ] } ]
  }
}

Readme

Keywords

Package Sidebar

Install

npm i eslint-plugin-hooks-limit

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

4.33 kB

Total Files

5

Last publish

Collaborators

  • icantunderstand