Skip to content

Commit e2c355d

Browse files
author
微信公众号:储凡
authored
Merge pull request #99 from mmdapl/feat/ci-lint
2 parents 7e01a77 + 1733b29 commit e2c355d

File tree

11 files changed

+37
-12
lines changed

11 files changed

+37
-12
lines changed

.eslintignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ docs/manuscripts
33
.github
44
.idea
55
.dockerignore
6-
.gitignore
7-
6+
.gitignore

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ logs
55
.vscode/*
66
*/.DS_Store
77
.DS_Store
8-
*/.vscode
98
.idea
109
# Coverage directory used by tools like istanbul
1110
coverage
@@ -36,4 +35,3 @@ docs/.vuepress/.temp/
3635
docs/.vuepress/dist/
3736
# TernJS port file
3837
.tern-port
39-
/.husky/

.husky/commit-msg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
## 校验commit信息
5+
npx --no -- commitlint --edit "$1"

.husky/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
5+
## 代码、文档校验
6+
npx lint-staged

.lintstagedrc.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
// 参考: https://www.npmjs.com/package/lint-staged#configuration
2-
// 对add的内容格式化后再commit
1+
/**
2+
* 对add的内容格式化后再commit
3+
* 参考: https://www.npmjs.com/package/lint-staged#configuration
4+
*/
35
module.exports = {
46
"*.{js,ts,md}":[
57
"./scripts/lint --fix",

.markdownlint.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// 参考:<https://github.com/updownpress/markdown-lint/tree/master/rules>
1+
/**
2+
* markdownlint-cli格式化markdown文档
3+
* 规则参考:https://github.com/updownpress/markdown-lint/tree/master/rules
4+
*/
25
module.exports = {
36
"default": true,
47
"MD001": false,

.versionrc.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
// commit-and-tag-version 配置,参考:https://github.com/conventional-changelog/standard-version
2-
// 配置参考:https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.2.0/README.md
1+
/**
2+
*
3+
* commit-and-tag-version 模块配置提交、标签功能
4+
* - 使用:https://github.com/conventional-changelog/standard-version
5+
* - 配置:https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.2.0/README.md
6+
*/
37
module.exports = {
48
header: '# Release history\n\nAll notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n<!-- #region recent-alpha -->\n',
59
releaseCommitMessageFormat: 'chore(release): publish v{{currentTag}}',

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ RUN if [ "$CONTAINER_BUILD" = "true" ]; then \
2323

2424
FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.23.0-alpine
2525

26+
27+
## 自定义镜像的Label信息
2628
ARG APP_NAME
2729
ARG APP_VERSION
2830
ARG AUTHOR

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Chu·Fan
3+
Copyright (c) 2020 142vip.cn 储凡
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

commitlint.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
module.exports = { extends: ['@commitlint/config-conventional'] }
1+
/**
2+
* 校验Git Commit信息格式
3+
* 参考:https://commitlint.js.org
4+
*/
5+
module.exports = {
6+
extends: ['@commitlint/config-conventional']
7+
}

0 commit comments

Comments
 (0)