open-index/open-npm huggingface dataset:
npm package: @stoly/eslint-plugin-react-hooks
Description: ESLint rules for React Hooks
Latest version: 4.6.0-fix-1.0.0

# `eslint-plugin-react-hooks`

This ESLint plugin enforces the [Rules of Hooks](https://reactjs.org/docs/hooks-rules.html).

It is a part of the [Hooks API](https://reactjs.org/docs/hooks-intro.html) for React.

## Installation

**Note: If you're using Create React App, please use `react-scripts` >= 3 instead of adding it directly.**

Assuming you already have ESLint installed, run:

```sh
# npm
npm install eslint-plugin-react-hooks --save-dev

# yarn
yarn add eslint-plugin-react-hooks --dev
```

Then extend the recommended eslint config:

```js
{
  "extends": [
    // ...
    "plugin:react-hooks/recommended"
  ]
}
```

### Custom Configuration

If you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:

```js
{
  "plugins": [
    // ...
    "react-hooks"
  ],
  "rules": {
    // ...
    "react-hooks/rules-of-hooks": "error",
    "react-hooks/exhaustive-deps": "warn"
  }
}
```


## Advanced Configuration

`exhaustive-deps` can be configured to validate dependencies of custom Hooks with the `additionalHooks` option.
This option accepts a regex to match the names of custom Hooks that have dependencies.

```js
{
  "rules": {
    // ...
    "react-hooks/exhaustive-deps": ["warn", {
      "additionalHooks": "(useMyCustomHook|useMyOtherCustomHook)"
    }]
  }
}
```

We suggest to use this option **very sparingly, if at all**. Generally saying, we recommend most custom Hooks to not use the dependencies argument, and instead provide a higher-level API that is more focused around a specific use case.

## Valid and Invalid Examples

Please refer to the [Rules of Hooks](https://reactjs.org/docs/hooks-rules.html) documentation and the [Hooks FAQ](https://reactjs.org/docs/hooks-faq.html#what-exactly-do-the-lint-rules-enforce) to learn more about this rule.

## License

MIT
npm package: @stoly/react-component-cli
Description: 自用react-component组件生成脚手架
Author: stoly
Latest version: 0.0.1

# 自用项目文件生成脚手架

## 安装

```bash
// npm
npm i -g cr-view-cli

// 或yarn
yarn global add cr-view-cli
```

## 命令 

创建视图 

```bash
crview view <moduleName> <packageName> <viewName>
```

创建一个视图，参数为 required:`moduleName` required:`packageName` required:`viewName`  
具体命令例如：`crview view system role list`

规范：  
moduleName： `只能`是单个英文单词  
packageName： 可以为多个英文单词组合，全小写，单词之间以`-`分割，例如：user-manage、wechat-user-manage  
viewName： 定为表达视图实际意义的英文单词，尽量为单个因为单词，如：list、detail、add、edit 等

执行命令会自动创建如下文件结构：

```
├── src
│   ├── views
│       ├── module-system           // 模块文件夹(存在就不创建)
│           ├── role                // 功能文件夹(存在就不创建)
│               ├── list            // 页面文件夹
│                   ├── index.tsx   // 视图文件
│                   ├── style.ts    // 视图样式文件
│               ├── mobx.ts         // 功能mobx库，功能下面的多个视图共享一个mobx库(存在就不创建)
│           ├── mobx.ts             // 模块mobx文件，只是导出模块下所有mobx(存在就不创建)
```