forked from iod/cpnode-front
chore: setup commitlint and commitizen
This commit is contained in:
parent
cd3ad4ef78
commit
6e4869dae1
25
.commitlintrc.js
Normal file
25
.commitlintrc.js
Normal file
@ -0,0 +1,25 @@
|
||||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
ignores: [(message) => message.startsWith('WIP: ')],
|
||||
rules: {
|
||||
'type-case': [0],
|
||||
'type-enum': [
|
||||
2,
|
||||
'always',
|
||||
[
|
||||
'build',
|
||||
'chore',
|
||||
'ci',
|
||||
'docs',
|
||||
'feat',
|
||||
'fix',
|
||||
'perf',
|
||||
'refactor',
|
||||
'revert',
|
||||
'style',
|
||||
'test',
|
||||
'WIP',
|
||||
],
|
||||
],
|
||||
},
|
||||
}
|
4
.husky/commit-msg
Normal file
4
.husky/commit-msg
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no -- commitlint --edit $1
|
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@ -1,9 +1,11 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"christian-kohler.npm-intellisense",
|
||||
"coenraads.bracket-pair-colorizer-2",
|
||||
"davidanson.vscode-markdownlint",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"editorconfig.editorconfig",
|
||||
"joshbolduc.commitlint",
|
||||
"oderwat.indent-rainbow",
|
||||
"shardulm94.trailing-spaces",
|
||||
"misterj.vue-volar-extention-pack"
|
||||
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"commitlint.config.file": "./.commitlintrc.js"
|
||||
}
|
16
README.md
16
README.md
@ -2,6 +2,22 @@
|
||||
|
||||
Upstream template: [@daotl/fes-starter](https://github.com/daotl/fes-starter).
|
||||
|
||||
## Commit changes
|
||||
|
||||
Setup VS Code as the Git editor:
|
||||
|
||||
```shell
|
||||
git config --global core.editor "code --wait"
|
||||
```
|
||||
|
||||
Commit with [Commitizen](https://commitizen.github.io/cz-cli/):
|
||||
|
||||
```shell
|
||||
npx cz
|
||||
```
|
||||
|
||||
Or still use `git commit` and follow [the Conventional Commits spec](https://www.conventionalcommits.org/en/v1.0.0/#summary), your commits will be linted before accepted.
|
||||
|
||||
## Technology stack
|
||||
|
||||
Basic:
|
||||
|
2895
package-lock.json
generated
2895
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -3,6 +3,7 @@
|
||||
"version": "0.0.0",
|
||||
"description": "Internet of Data control panel frontend",
|
||||
"scripts": {
|
||||
"cz": "npx cz",
|
||||
"build": "fes build",
|
||||
"prod": "cross-env FES_ENV=prod fes build",
|
||||
"analyze": "cross-env ANALYZE=1 fes build",
|
||||
@ -16,6 +17,11 @@
|
||||
"stylelint:fix": "stylelint src/**/*.{css,scss,vue,tsx} --fix",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"prettier": "@daotl/prettier-config",
|
||||
"keywords": [
|
||||
"管理端",
|
||||
@ -35,6 +41,8 @@
|
||||
},
|
||||
"homepage": "https://gitea.internetapi.cn/iod/cpnode-front",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^16.0.0",
|
||||
"@commitlint/config-conventional": "^16.0.0",
|
||||
"@daotl/eslint-config-vue": "0.2.3",
|
||||
"@daotl/prettier-config": "^0.1.2",
|
||||
"@daotl/tsconfig": "^0.0.4",
|
||||
@ -42,7 +50,9 @@
|
||||
"@fesjs/plugin-windicss": "^2.0.4",
|
||||
"@iconify-json/mdi": "^1.0.12",
|
||||
"@vue/compiler-sfc": "^3.2.26",
|
||||
"commitizen": "^4.2.4",
|
||||
"cross-env": "^7.0.3",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"eslint-webpack-plugin": "^3.1.1",
|
||||
"husky": "^7.0.4",
|
||||
"lint-staged": "^12.1.4",
|
||||
|
Loading…
Reference in New Issue
Block a user