Skip to content

Commit

Permalink
chore: add commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamOfIce committed Mar 30, 2023
1 parent 1c5e1f7 commit e5b3d02
Show file tree
Hide file tree
Showing 6 changed files with 1,921 additions and 2,147 deletions.
2 changes: 2 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extends:
- "@commitlint/config-conventional"
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm exec commitlint --edit ${1}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ I18n plugin for [Vuepress v2](https://github.com/vuepress/vuepress-next)
- [x] Fill non-existent pages in translation directories
- [x] Translation obsolescence alert (based on git data)
- [ ] HMR support
- [ ] Development guide

## Usage

Expand Down Expand Up @@ -107,7 +108,7 @@ interface I18nPluginLocaleData {
* @param guideLink links to translation guides (ignore the relevant section when empty)
* @returns localised text
*/
content: (linkRenderer: typeof RenderLink, guideLink?: string) => string;
content: (linkRenderer: LinkRenderer, guideLink?: string) => string;
};
outdated: {
/**
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
],
"scripts": {
"build": "vite build",
"lint": "pnpm lint:prettier && pnpm lint:eslint",
"lint": "pnpm run /^lint:.*/",
"lint:eslint": "eslint --ext .ts --fix ./src",
"lint:prettier": "prettier --write .",
"prepare": "husky install",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "冰雪殇璃陌梦 <[email protected]> (https://www.dreamofice.cn)",
Expand All @@ -38,6 +39,7 @@
"url": "https://github.com/DreamOfIce/vuepress-plugin-i18n/issues"
},
"homepage": "https://github.com/DreamOfIce/vuepress-plugin-i18n#readme",
"packageManager": "[email protected]",
"dependencies": {
"@vuepress/client": "2.0.0-beta.61",
"@vuepress/core": "2.0.0-beta.61",
Expand All @@ -46,6 +48,8 @@
"vue": "^3.2.47"
},
"devDependencies": {
"@commitlint/cli": "^17.5.1",
"@commitlint/config-conventional": "^17.4.4",
"@tsconfig/node-lts-strictest-esm": "^18.12.1",
"@types/node": "^18.15.3",
"@typescript-eslint/eslint-plugin": "^5.48.0",
Expand Down
Loading

0 comments on commit e5b3d02

Please sign in to comment.