open-index/open-npm huggingface dataset:
npm package: @moresec/eslint-config-moresec
Description: custom ESLint rules for MoresecFE
Author: cnjs
Latest version: 1.1.8

<h1 align="center">eslint-config-moresec</h1>

<div align="center">

MoresecFE 团队的 ESLint 规则。基于 `ESLint 6.x` 版本扩展。

[![Build Status](https://www.travis-ci.org/MoresecFE/eslint-config-moresec.svg?branch=master)](https://www.travis-ci.org/MoresecFE/eslint-config-moresec)
[![](https://flat.badgen.net/npm/v/@moresec/eslint-config-moresec)](https://www.npmjs.com/package/@moresec/eslint-config-moresec)
[![NPM downloads](https://flat.badgen.net/npm/dw/@moresec/eslint-config-moresec)](http://npmjs.com/@moresec/eslint-config-moresec)

</div>


## Install

### js

```
yarn add eslint babel-eslint @moresec/eslint-config-moresec -D
// or
npm i eslint babel-eslint @moresec/eslint-config-moresec -D
```

### vue

```
yarn add\
  eslint\
  babel-eslint\
  eslint-plugin-vue\
  vue-eslint-parser\
  @moresec/eslint-config-moresec\
  -D
```

### react

```
yarn add\
  eslint\
  babel-eslint\
  eslint-plugin-react\
  @moresec/eslint-config-moresec\
  -D
```

### typescript

```
yarn add\
  eslint\
  babel-eslint\
  @typescript-eslint/parser\
  @typescript-eslint/eslint-plugin\
  @moresec/eslint-config-moresec\
  -D
```


## Usage

通过 .eslintrc 相关文件里的 `extends` 字段引入。

### js

```
{
  extends: ["@moresec/moresec"]
}
```

### vue

```
{
  extends: ["@moresec/moresec/vue"]
}
```

### react

```
{
  extends: ["@moresec/moresec/react"]
}
```

### typescript

```
{
  extends: ["@moresec/moresec/typescript"]
}
```


## Integrating with Prettier

``` shell
// 1. 安装 Prettier
yarn add prettier --dev --exact
yarn add eslint-plugin-prettier eslint-config-prettier --dev

// 2. 配置 .eslintrc 相关文件
{
  extends: [
    "@moresec/moresec",
    "plugin:prettier/recommended"
  ]
}

// 3. 配置 .prettierrc 相关文件
// semi、singleQuote、trailingComma 这三项规则保持和 eslint 一致
{
  "semi": false,
  "singleQuote": true,
  "trailingComma": "none",
  "arrowParens": "avoid"
}

// 4. 例子：react + typescript 项目

// 安装
yarn add\
  eslint\
  babel-eslint\
  eslint-plugin-react\
  @typescript-eslint/parser\
  @typescript-eslint/eslint-plugin\
  @moresec/eslint-config-moresec\
  eslint-plugin-prettier\
  eslint-config-prettier\
  -D
yarn add prettier --dev --exact

// .eslintrc
{
  "extends": [
    "@moresec/moresec/react",
    "@moresec/moresec/typescript",
    "plugin:prettier/recommended"
  ]
}
```


## Refers

https://eslint.org/

https://github.com/ElemeFE/eslint-config-elemefe

https://github.com/AlloyTeam/eslint-config-alloy

https://github.com/vuejs/eslint-plugin-vue

https://github.com/yannickcr/eslint-plugin-react

https://github.com/typescript-eslint/typescript-eslint


## Environment

>  Node.js >= 8
npm package: @moresec/rc-help-tip
Description: --- name: MSHelpTip route: /help-tip order: 1 menu: Components menuOrder: 2 ---
Author: cnjs
Latest version: 1.0.1

---
name: MSHelpTip
route: /help-tip
order: 1
menu: Components
menuOrder: 2
---

import { Playground } from 'docz'
import MSHelpTip from './src'

## MSHelpTip 帮助提示

帮助、提示按钮。支持 antd `Tooltip` 默认的功能外，`title` 支持字符串显示和用数组换行自定义显示；支持 `label` 附加文字功能。

## Props

| 参数    |	说明    | 类型    |	默认值    | 版本    |
| ------ | ------ | ------  | ------   | ------ |
| __title?__  | 提示文字 | string \| string[] \| React.ReactNode \| RenderFunction | '' | v0.1.0 |
| __label?__ | 图标的前置附加文字 | string \| React.ReactNode |  | v0.1.0 |

## 基础示例

<Playground>
  <MSHelpTip title="帮助说明" />
</Playground>

## 高级示例

<Playground>
  <MSHelpTip label="帮助" title={['帮助说明', '帮助说明']} />
</Playground>
npm package: @moresec/rc-table
Description: --- name: MSTable route: /table order: 2 menu: Components menuOrder: 2 ---
Latest version: 1.0.0

---
name: MSTable
route: /table
order: 2
menu: Components
menuOrder: 2
---

import { Playground } from 'docz'
import MSTable from './src'

## MSTable 表格组件

本组件是在 antd 的 `Table` 组件基础上进行封装，把常见的功能集成起来，让开发者更少的关心内部繁多的属性设置。包括：`dataSource` 和 `pagination` 属性由 `data` 代替；分页功能默认集成跳转、总数目等功能，并暴露出可选数目项；`rowKey` 默认使用 id ，强制统一为字符串类型；集成可选择功能，开发者只用关心当前选择项即可等等。此外，完全保留 antd `Table` 的其他 props ，并优先此组件的设置。

## Props

> 除下面表格外，其他 props 和 antd 的 `Table` 保持一致，如必传的 `columns`。具体使用方法请参考示例。

| 参数    |	说明    | 类型    |	默认值    | 版本    |
| ------ | ------ | ------  | ------   | ------ |
| __data__  | 包括表格数据 `list` 和分页数据 `pagination` | { data: T[]; pagination?: PaginationConfig \| false } | { data: [], pagination: { pageSize: 10 } } | v0.0.1 |
| __rowKey?__ | 表格行 `key` 的取值，可以是字符串或一个函数 | string \| ((record: T, index: number) => string) | 'id' | v0.0.1 |
| __onSelectEvent?__ | antd 中 `onSelectChange` 的额外回调，可供外界操作表格内选中的数据 | (selectedRowKeys: string[], checkedAll: boolean, selectedRows: any[]) => void |  | v0.0.1 |
| __onCheckboxProps?__ | 针对 Checkbox 单独做判断，比如某条数据要求当前选择框为禁用状态，和 antd 的 `getCheckboxProps` 保持一致 | (record: T) => Object |  | v0.0.1 |

## 基础表格

<Playground>
  {() => {
    const tableData = {
      list: [
        { id: 1, name: 'apple', color: 'red' },
        { id: 2, name: 'banana', color: 'yellow' },
        { id: 3, name: 'watermelon', color: 'green' }
      ]
    }
    const columns = [
      { title: '名称', dataIndex: 'name' },
      { title: '颜色', dataIndex: 'color' }
    ]
    return (
      <MSTable data={tableData} columns={columns} />
    )
  }}
</Playground>

## 复杂表格

<Playground>
  {() => {
    const list = []
    for (let i = 1; i < 12; i++) {
      list.push({ fruit_id: i, name: `apple${i}`, color: 'red' })
    }
    const columns = [
      { title: '名称', dataIndex: 'name' },
      { title: '颜色', dataIndex: 'color' }
    ]

    const handleSelectEvent = (selectedRowKeys, selectedRows) => {
      console.log('selectedRowKeys: ', selectedRowKeys)
      console.log('selectedRows: ', selectedRows)
    }

    const handleCheckboxProps = (record) => ({
      disabled: record.fruit_id <= 4
    })

    const handleTableChange = ({ current }) => console.log(`第${current}页`)

    return (
      <MSTable
        data={{ list }}
        columns={columns}
        rowKey="fruit_id"
        onSelectEvent={handleSelectEvent}
        onCheckboxProps={handleCheckboxProps}
        onChange={handleTableChange}
      />
    )
  }}
</Playground>
npm package: @moresec/rc-tooltip
Description: --- name: MSTooltip route: /tooltip order: 3 menu: Components menuOrder: 2 ---
Latest version: 1.0.2

---
name: MSTooltip
route: /tooltip
order: 3
menu: Components
menuOrder: 2
---

import { Playground } from "docz"
import MSTooltip from './src'

## MSTooltip

支持 antd 的 `Tooltip` 组件的全部功能外，适用于折叠显示多个数据的情形，具体使用方法见示例。

## Props

> antd 的 `title` 和 `overlay` 都可不填，组件内部默认写了 `title` 的值，其他保持一致。

| 参数    |	说明    | 类型    |	默认值    | 版本    |
| ------ | ------ | ------  | ------   | ------ |
| __data__  | 数据源 | string[] | [] | v0.1.0 |
| __limit?__ | 限制显示数据的个数 | number | 0 | v0.1.0 |
| __connector?__ | 数据连接符 | string | ', ' | v0.1.0 |
| __empty?__ | 数据源为空时的展示 | React.ReactNode | '-' | v0.1.0 |

### 示例1

<Playground>
  <MSTooltip data={['192.168.1.1', '192.168.1.2', '192.168.1.3', '192.168.1.4']} limit={3} />
</Playground>

### 示例2

<Playground>
  <MSTooltip data={[]} empty="暂无数据" />
</Playground>

### 示例3

<Playground>
  {() => {
    const data = ['foo', 'bar']
    const len = data.length
    return (
      <MSTooltip data={data}>
        <span>{`${data.slice(0, 1)}...等${len}类`}</span>
      </MSTooltip>
    )
  }}
</Playground>
npm package: @moresec/stylelint-config-moresec
Description: stylelint config for MoresecFE
Latest version: 0.1.3

# stylelint-config-moresec

stylelint-config rules for MoresecFE


## Installation

```shell
yarn add @moresec/stylelint-config-moresec -D
```


## Usage

It is recommended to use with VSCode plugin [stylelint-stzhang](https://marketplace.visualstudio.com/items?itemName=stuartzhang.stylelint-stzhang)

```javascript
{
  extends: ["@moresec/stylelint-config-moresec"],
  rules: {
    // 在这里可以自定义规则。但不推荐，有异议的地方建议提 PR，这样也是维持写此配置文件的初衷。
  }
}
```


## Integrating with Prettier

```shell
// 1. 安装 Prettier
yarn add prettier --dev --exact
yarn add stylelint-prettier stylelint-config-prettier --dev

// 2. 配置 .stylelintrc 相关文件
{
  extends: [
    "@moresec/stylelint-config-moresec",
    "stylelint-prettier/recommended"
  ]
}
// 3. 例子
// 安装
yarn add stylelint stylelint-prettier stylelint-config-prettier -D
yarn add prettier --dev --exact
// .stylelintrc
{
  "extends": [
    "@moresec/stylelint-config-moresec",
    "stylelint-prettier/recommended"
  ]
}
```


## Refers

- [https://stylelint.io/](https://stylelint.io/)
- [http://stylelint.cn/user-guide/rules/](http://stylelint.cn/user-guide/rules/)


## Environment

> Node.js >= 8

> stylelint >= 12
npm package: @moresec/utils
Description: MoresecFE's javascript utils
Author: cnjs
Latest version: 1.0.0

# utils

utils 工具集。


## 安装与使用

```shell
// 安装
yarn add @moresec/utils

// 使用
import { downloadFiles, ... } from '@moresec/utils'
```


## 工具集列表

+ arraySort ---------------- 数组排序
+ computedNextPage --------- 表格中删除一定数据后，计算下次请求的页码数
+ debounce ----------------- 防抖函数
+ delay -------------------- 延迟执行函数，休眠函数
+ downloadFileByFetch ------ 通过 fetch 请求下载文件
+ downloadFiles ------------ 文件下载
+ flattenArray ------------- 数组扁平化
+ getObjectKeys ------------ 获取对象的 key，同 Object.keys
+ includeScripts ----------- 加载外部 `js` `css` 文件，支持串行加载多个文件
+ isEmptyArray ------------- 判断数组是否为空；每一项之和是否为 0；每一项的某键的值之和是否为 0
+ isInSameNetworkSegment --- 判断两个 ip 是否在同一网段
+ isNumber ----------------- 是否为数字数据类型
+ isObject ----------------- 是否为对象。格式为 `{}` | `() => {}` | `function () {}`
+ numFormatW --------------- number格式化W
+ patterns ----------------- 常用正则表达式：`email`, `phone`, `ip`, `port`, `url` 等
+ playAudio ---------------- 播放音频
+ qs ----------------------- 模拟 qs 插件写的方法, 提供 `stringifyQuery`, `parseQuery` 方法
+ secondFormatDays --------- 秒格式化天、时、分
+ throttle ----------------- 节流函数
+ typeOf ------------------- 验证数据类型
+ uniqueArray -------------- 数组去重
+ validatePassword --------- 密码校验, 可以校验大写字母, 小写字母, 数字, 特殊字符或其中的特定几项, 也可以校验长度


## 兼容性

> IE >= 10
npm package: @moresec/vue-components
Description: 基于element-ui对组件进行二次封装, 也可以自定义组件
Author: YJH
Latest version: 1.2.0

# vue-components

基于element-ui对组件进行二次封装, 也可以自定义组件

文档:  https://moresecfe.github.io/vue-components/
项目搭建插件: https://vue-styleguidist.github.io/
npm package: @moretall/react-flow-nns
Description: [![react-flow](https://user-images.githubusercontent.com/2857535/95224198-b2540000-07fa-11eb-832d-361d72d60345.jpg)](https://reactflow.dev)
Latest version: 0.0.1

[![react-flow](https://user-images.githubusercontent.com/2857535/95224198-b2540000-07fa-11eb-832d-361d72d60345.jpg)](https://reactflow.dev)

React Flow is a library for building node-based graphs. You can easily implement custom node types and it comes with components like a mini-map and graph controls. Feel free to check out the [examples](https://reactflow.dev/) or read the [blog post](https://webkid.io/blog/react-flow-node-based-graph-library/) to get started.

- **Website:** https://reactflow.dev
- **Documentation:** https://reactflow.dev/docs
- **Examples:** https://reactflow.dev/examples
- **Website/Docs Repository:** https://github.com/wbkd/react-flow-docs
- **Community:** https://discord.gg/Bqt6xrs

React Flow was initially created for [datablocks](https://datablocks.pro). A node-based editor for transforming, analyzing and visualizing data.


## Installation

```
npm install react-flow-renderer
```

## Quick Start

This is a very basic example of how to use React Flow. You can find more advanced examples on the [website](https://reactflow.dev/examples).

```js
import React from 'react';
import ReactFlow from 'react-flow-renderer';

const elements = [
  { id: '1', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
  // you can also pass a React component as a label
  { id: '2', data: { label: <div>Node 2</div> }, position: { x: 100, y: 100 } },
  { id: 'e1-2', source: '1', target: '2', animated: true },
];

const BasicFlow = () => <ReactFlow elements={elements} />;
```

## Development

Before you start you need to install the React Flow dependencies via `npm install` and the ones of the examples `cd example && npm install`.

If you want to contribute or develop custom features the easiest way is to start the dev server:

```sh
npm start
```

and the example app via:

```sh
cd example && npm start 
```

The example app serves the content of the `example` folder and watches changes inside the `src` folder. The examples are using the source of the `src` folder.

## Testing

Testing is done with cypress. You can find the tests in the [`integration/flow`](/cypress/integration/flow) folder. In order to run the tests do:

```sh
npm run test
```

## Maintainer

Moritz Klack • [Twitter](https://twitter.com/moklick) • [Github](https://github.com/moklick)

## Support

If you need custom support or features for your application we are [happy to hear from you](https://webkid.io/contact).


### Thanks!

Special thanks to [Andy Lindemann](https://github.com/AndyLnd) for a lot of helpful contributions!

---

React Flow is maintained by [webkid](https://webkid.io), a data visualization agency from Berlin. If you need help or want to develop react-based tools or data visualizations, [get in touch](https://webkid.io/contact)!
npm package: @moretime/cli
Description: ```bash pnpm add @moretime/npm-sh -D npm install @moretime/npm-sh -D yarn add @moretime/npm-sh -D
Author: moretime
Latest version: 0.2.205

# 闲暇·npm脚本

## 安装
```bash
pnpm add @moretime/npm-sh -D
npm install @moretime/npm-sh -D
yarn add @moretime/npm-sh -D

```

## 使用
```sh
# 规范化提交git，添加提交类型，集成修改版本信息
npx git-push

# 映射应用，从配置文件中提取仓库与本地目录的映射关系，并自动映射
# 需要注意的是，这里不能使用相对路径，只能使用/开头，/指向项目根目录
npx app-mapping /repo.mapping.json

# 集成npm发布，接受路径传参
# 路径传参时，应这样编写命令 npx npm-publish ./dist; 此操作将会仅发布dist目录下的内容，在此之前，至少应把package.json复制至提交目录之下，保证发布能够完成。
npx npm-publish
```

## License

MIT