# qy-norm

> 个人项目规范

Latest version **2.4.0** (published 2022-01-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install qy-norm
pnpm add qy-norm
yarn add qy-norm
bun add qy-norm
```

Provides the commands `qy-cz`, `qy-norm`, `qy-release`, `qy-codelint`, `qy-commitlint`.

## 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 | 2.4.0 |
| Published | 2022-01-16 |
| First published | 2021-07-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 17 |
| Unpacked size | 27.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | qianyin925 |

## Links

- npm: https://www.npmjs.com/package/qy-norm
- Repository: https://github.com/qianyin925/qy-norm
- Homepage: https://github.com/qianyin925/qy-norm#readme
- Issues: https://github.com/qianyin925/qy-norm/issues
- npm.io page: https://npm.io/package/qy-norm

## Dependencies (17)

- [zx](https://npm.io/package/zx.md) ^4.2.0
- [husky](https://npm.io/package/husky.md) ^7.0.1
- [eslint](https://npm.io/package/eslint.md) ^7.32.0
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.0
- [commander](https://npm.io/package/commander.md) ^8.1.0
- [stylelint](https://npm.io/package/stylelint.md) ^13.13.1
- [lint-staged](https://npm.io/package/lint-staged.md) ^12.1.7
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^10.1.0
- [@commitlint/cli](https://npm.io/package/@commitlint/cli.md) ^12.1.4
- [standard-version](https://npm.io/package/standard-version.md) ^9.3.1
- [eslint-plugin-jsdoc](https://npm.io/package/eslint-plugin-jsdoc.md) ^36.0.6
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.24.0
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.23.4
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ^4.2.0
- [stylelint-config-standard](https://npm.io/package/stylelint-config-standard.md) ^22.0.0
- [@commitlint/config-conventional](https://npm.io/package/@commitlint/config-conventional.md) ^13.1.0
- [stylelint-config-sass-guidelines](https://npm.io/package/stylelint-config-sass-guidelines.md) ^8.0.0

## Recent versions

- 2.4.0 (latest) — 2022-01-16
- 2.1.0 — 2022-01-16
- 2.0.0 — 2022-01-16
- 1.4.9 — 2021-09-19
- 1.4.8 — 2021-09-19
- 1.4.7 — 2021-09-19
- 1.4.6 — 2021-09-19
- 1.4.5 — 2021-09-19
- 1.4.3 — 2021-09-19
- 1.4.2 — 2021-09-19
- 1.4.1 — 2021-09-19
- 1.4.0 — 2021-08-13
- 1.2.0 — 2021-08-13
- 1.0.13 — 2021-08-13
- 1.0.12 — 2021-07-29
- … 9 more at https://npm.io/package/qy-norm/versions

## README

# qy-norm

个人项目规范

校验 commit-msg 前也会先校验 eslint、stylelint
cz 也会事先校验 code

release 脚本自动生成 changelog tag, 并允许自动发布

## 初始化

1. 1 执行 `npx qy-norm` 并选择要配置内容

## 使用

### 1. eslint

```js
const path = require("path");

module.exports = {
  globals: {
    $console: true,
    GLOBAL_SERVICER: true,
    WS_SERVICER: true,
    PUBLICKEY: true,
  },
  extends: [path.resolve(__dirname, "./node_modules/qy-norm/.eslintrc.js")],
};
```

### 2. stylelintrc

```js
const path = require("path");

module.exports = {
  extends: [path.resolve(__dirname, "./node_modules/qy-norm/.stylelintrc.js")],
};
```

### 3. .vscode/setting.json 自动格式化配置

```json
{
  // -----------统一配置--------------
  "editor.codeActionsOnSave": { // 代码自动格式配置
    "source.fixAll.eslint": true, // 根据 eslint 配置进行格式化, 需要安装 eslint 插件
    "source.fixAll.stylelint": true // 根据 eslint 配置进行格式化, 需要安装 stylelint 插件
  }
}
```

## TODO

[] eslint 所有规则校验、配置过一遍、同时需要验证 vscode 自动修复是否可用
[] eslint jsx 属性格式、引入配置
[] prettier
[] 日志颜色问题

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