generated from skiyee/quick-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 🏡 更换commitlint、eslint的配置文件类型,迁移至非js的配置类型
- Loading branch information
Showing
7 changed files
with
651 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
extends: | ||
- '@commitlint/config-conventional' | ||
rules: | ||
type-enum: | ||
- 2 | ||
- always | ||
- | ||
- feat | ||
- perf | ||
- fix | ||
- refactor | ||
- docs | ||
- build | ||
- types | ||
- chore | ||
- examples | ||
- test | ||
- style | ||
- ci | ||
prompt: | ||
messages: | ||
type: '选择你要提交的类型 :' | ||
scope: '选择一个提交范围 (可选) :' | ||
customScope: '请输入自定义的提交范围 :' | ||
subject: "填写简短精炼的变更描述 :\n" | ||
body: "填写更加详细的变更描述 (可选) 。使用 \"|\" 换行 :\n" | ||
breaking: "列举非兼容性重大的变更 (可选) 。使用 \"|\" 换行 :\n" | ||
footerPrefixesSelect: '设置关联issue前缀 (可选) :' | ||
customFooterPrefix: '输入自定义issue前缀 :' | ||
footer: "列举关联issue (可选) 例如: #1 :\n" | ||
confirmCommit: 是否提交或修改commit ? | ||
types: | ||
- value: feat | ||
name: '🚀 Features: 新功能' | ||
emoji: 🚀 | ||
- value: perf | ||
name: '🔥 Performance: 性能优化' | ||
emoji: 🔥 | ||
- value: fix | ||
name: '🩹 Fixes: 缺陷修复' | ||
emoji: 🩹 | ||
- value: refactor | ||
name: '💅 Refactors: 代码重构' | ||
emoji: 💅 | ||
- value: docs | ||
name: '📖 Documentation: 文档' | ||
emoji: 📖 | ||
- value: build | ||
name: '📦 Build: 构建工具' | ||
emoji: 📦 | ||
- value: types | ||
name: '🌊 Types: 类型定义' | ||
emoji: 🌊 | ||
- value: chore | ||
name: '🏡 Chore: 简修处理' | ||
emoji: 🏡 | ||
- value: examples | ||
name: '🏀 Examples: 例子展示' | ||
emoji: 🏀 | ||
- value: test | ||
name: '✅ Tests: 测试用例' | ||
emoji: ✅ | ||
- value: style | ||
name: '🎨 Styles: 代码风格' | ||
emoji: 🎨 | ||
- value: ci | ||
name: '🤖 CI: 持续集成' | ||
emoji: 🤖 | ||
useEmoji: true | ||
scopes: [] | ||
maxHeaderLength: 72 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,5 +22,8 @@ | |
"yml", | ||
"markdown", | ||
"toml" | ||
] | ||
], | ||
"yaml.schemas": { | ||
"schema\\commitlint.json": ".commitlintrc.yaml" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"type": "object", | ||
"definitions": { | ||
"rule": { | ||
"description": "A rule", | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"description": "Level: 0 disables the rule. For 1 it will be considered a warning, for 2 an error", | ||
"type": "number", | ||
"enum": [0, 1, 2] | ||
}, | ||
{ | ||
"description": "Applicable: always|never: never inverts the rule", | ||
"type": "string", | ||
"enum": ["always", "never"] | ||
}, | ||
{ | ||
"description": "Value: the value for this rule", | ||
"items": { | ||
"description": "The allowed commit types (can be any string)." | ||
} | ||
} | ||
], | ||
"minItems": 1, | ||
"maxItems": 3, | ||
"additionalItems": false | ||
} | ||
}, | ||
"properties": { | ||
"extends": { | ||
"description": "Resolveable ids to commitlint configurations to extend", | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"items": { "type": "string" } | ||
}, | ||
{ "type": "string" } | ||
] | ||
}, | ||
"parserPreset": { | ||
"description": "Resolveable id to conventional-changelog parser preset to import and use", | ||
"oneOf": [ | ||
{ "type": "string" }, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"name": { "type": "string" }, | ||
"path": { "type": "string" }, | ||
"parserOpts": {} | ||
}, | ||
"additionalProperties": true | ||
}, | ||
{ "typeof": "function" } | ||
] | ||
}, | ||
"helpUrl": { | ||
"description": "Custom URL to show upon failure", | ||
"type": "string" | ||
}, | ||
"formatter": { | ||
"description": "Resolveable id to package, from node_modules, which formats the output", | ||
"type": "string" | ||
}, | ||
"rules": { | ||
"description": "Rules to check against", | ||
"type": "object", | ||
"propertyNames": { "type": "string" }, | ||
"additionalProperties": { "$ref": "#/definitions/rule" } | ||
}, | ||
"plugins": { | ||
"description": "Resolveable ids of commitlint plugins from node_modules", | ||
"type": "array", | ||
"items": { | ||
"anyOf": [ | ||
{ "type": "string" }, | ||
{ | ||
"type": "object", | ||
"required": ["rules"], | ||
"properties": { | ||
"rules": { | ||
"type": "object" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"ignores": { | ||
"type": "array", | ||
"items": { "typeof": "function" }, | ||
"description": "Additional commits to ignore, defined by ignore matchers" | ||
}, | ||
"defaultIgnores": { | ||
"description": "Whether commitlint uses the default ignore rules", | ||
"type": "boolean" | ||
} | ||
} | ||
} |
Oops, something went wrong.