feat: 增加提交规范
This commit is contained in:
parent
209699f64d
commit
dc75fa4890
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* feat:新增功能(feature)。表示添加了新的功能或功能的扩展。
|
||||
* fix:修复问题(bug fix)。表示修复了已存在的问题或错误。
|
||||
* docs:文档更新。表示更新了文档,如添加新的文档、改进现有文档等。
|
||||
* chore:杂项任务(chore)。表示对构建过程或辅助工具的修改,不涉及功能或代码的更改。
|
||||
* style:代码风格调整。表示对代码风格、格式的调整,如空格、缩进、命名等。
|
||||
* refactor:重构代码。表示对代码进行重构,旨在改进代码结构、性能或可读性,但不涉及功能更改。
|
||||
* test:测试相关。表示新增或修改了测试代码,如添加新的测试用例、修复现有测试等。
|
||||
* revert:撤销提交。表示撤销先前的提交,用于还原之前的更改。
|
||||
*/
|
||||
// git commit -m "feat: Add new feature"
|
||||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
rules: {
|
||||
// 提交类型(type)必须使用小写字母
|
||||
'type-case': [2, 'always', 'lower-case'],
|
||||
// 提交类型(type)必须符合指定的正则表达式
|
||||
'type-enum': [
|
||||
2,
|
||||
'always',
|
||||
['feat', 'fix', 'docs', 'chore', 'style', 'refactor', 'test', 'revert']
|
||||
],
|
||||
// 提交范围(scope)必须使用小写字母
|
||||
'scope-case': [2, 'always', 'lower-case'],
|
||||
// 提交主题(subject)的长度限制为 50 个字符
|
||||
'subject-max-length': [2, 'always', 50],
|
||||
// 提交主题(subject)的首字母必须大写
|
||||
'subject-case': [2, 'always', 'sentence-case'],
|
||||
// 提交主题(subject)不允许以句号结尾
|
||||
'subject-full-stop': [2, 'never', '.']
|
||||
// 提交主题(subject)必须使用具体、清晰的语句描述更改内容
|
||||
// 'subject-words': [
|
||||
// 2,
|
||||
// 'always',
|
||||
// {
|
||||
// words: ['add', 'update', 'remove', 'refactor', 'fix', 'merge', 'docs']
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
}
|
|
@ -152,4 +152,7 @@ docs/
|
|||
public/
|
||||
/html/
|
||||
|
||||
/plugins/
|
||||
/plugins/
|
||||
|
||||
|
||||
yarn.lock
|
|
@ -1 +1,2 @@
|
|||
npm run lint
|
||||
npm run format
|
|
@ -1,5 +1,8 @@
|
|||
import * as core from 'yunzai/core'
|
||||
import * as utils from 'yunzai/utils'
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default {
|
||||
...core,
|
||||
...utils
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
import { ConfigController } from "yunzai/config";
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default ConfigController
|
|
@ -1,2 +1,5 @@
|
|||
import handler from "../../src/core/plugins/handler.js";
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default handler
|
|
@ -1,2 +1,5 @@
|
|||
import { Messages, Events } from "yunzai/core"
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export { Messages, Events }
|
|
@ -1,2 +1,5 @@
|
|||
import pluginsLoader from "../../src/core/plugins.loader";
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default pluginsLoader
|
|
@ -1,2 +1,5 @@
|
|||
import { Plugin } from "yunzai/core"
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default Plugin
|
|
@ -1,2 +1,5 @@
|
|||
import { Runtime } from 'yunzai/core'
|
||||
export default Runtime
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default Runtime
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
import { puppeteer } from 'yunzai/utils'
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default puppeteer
|
|
@ -1,2 +1,5 @@
|
|||
import { renderer } from 'yunzai/utils'
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default renderer
|
|
@ -1,2 +1,5 @@
|
|||
import { Renderer } from 'yunzai/utils'
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default Renderer
|
|
@ -18,6 +18,7 @@
|
|||
"pm2": "pm2",
|
||||
"image": "node image.js",
|
||||
"css": "tailwindcss -i ./src/input.css -o ./public/output.css",
|
||||
"lint": "commitlint --config .commitlint.config.cjs -e -V",
|
||||
"format": "prettier --write .",
|
||||
"prepare": "husky"
|
||||
},
|
||||
|
@ -52,6 +53,8 @@
|
|||
"yaml": "^2.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.2.1",
|
||||
"@commitlint/config-conventional": "^19.1.0",
|
||||
"@rollup/plugin-alias": "^5.1.0",
|
||||
"@rollup/plugin-multi-entry": "^6.0.0",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
|
|
|
@ -7,6 +7,7 @@ import Puppeteer from './lib/puppeteer.js'
|
|||
* @returns renderer.id 渲染器ID,对应renderer中选择的id
|
||||
* @returns renderer.type 渲染类型,保留字段,暂时支持image
|
||||
* @returns renderer.render 渲染入口
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default function (config?: PuppeteerLaunchOptions & {
|
||||
chromiumPath?: string;
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
import { Renderers } from 'yunzai/utils'
|
||||
/**
|
||||
* @deprecated 已废弃
|
||||
*/
|
||||
export default Renderers
|
Loading…
Reference in New Issue