Skip to content

Commit

Permalink
Merge pull request #12 from al/core/branch-name-lint
Browse files Browse the repository at this point in the history
core: Add branch-name-lint
  • Loading branch information
al authored Jul 23, 2024
2 parents 0a6af11 + 9515b96 commit 8f6fd1d
Show file tree
Hide file tree
Showing 4 changed files with 332 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .branch-name-lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"branchNameLinter": {
"banned": ["bak", "tmp", "wip"],
"disallowed": ["develop", "gh-pages", "main", "master", "staging"],
"msgBranchBanned": "Branches with the name \"%s\" are not allowed.",
"msgBranchDisallowed": "Pushing to \"%s\" is not allowed, use git-flow.",
"msgDoesNotMatchRegex": "Branch \"%s\" does not conform to the naming pattern: \"%s\"",
"msgPrefixNotAllowed": "Branch prefix \"%s\" is not allowed.",
"msgPrefixSuggestion": "Instead of \"%s\" try \"%s\".",
"msgseparatorRequired": "Branch name \"%s\" must contain a separator \"%s\".",
"prefixes": [
"chore",
"ci",
"core",
"doc",
"experiment",
"feat",
"fix",
"hotfix",
"release",
"test"
],
"regex": "^[a-z]+/[a-z][a-z0-9.-]*$",
"regexOptions": "i",
"separator": "/",
"skip": [],
"suggestions": {
"backup": "bak",
"build": "ci",
"docs": "doc",
"feat": "feature",
"features": "feature",
"releases": "release",
"spec": "test",
"temp": "tmp",
"tests": "test",
"wip": "experiment"
}
}
}
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm run lint:branch
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dependencies": {
"@gtm-support/vue-gtm": "^3.0.1",
"@headlessui/vue": "^1.7.22",
"@heroicons/vue": "^2.1.3",
"@gtm-support/vue-gtm": "^3.0.1",
"@unhead/vue": "^1.9.14",
"@vueuse/core": "^10.11.0",
"dotenv": "^16.4.5",
Expand All @@ -18,6 +18,7 @@
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
"autoprefixer": "^10.4.19",
"branch-name-lint": "al/branch-name-lint#integration/error-handling-issues",
"cspell": "^8.12.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -27,8 +28,8 @@
"eslint-plugin-stylelint": "^0.1.1",
"eslint-plugin-vue": "^9.23.0",
"eslint-plugin-yml": "^1.14.0",
"globals": "^15.8.0",
"gh-pages": "^6.1.1",
"globals": "^15.8.0",
"husky": "^9.1.1",
"lint-staged": "^15.2.7",
"postcss": "^8.4.38",
Expand All @@ -53,6 +54,7 @@
"dev": "vite",
"format": "prettier --check --ignore-unknown .",
"format:fix": "prettier --ignore-unknown --write .",
"lint:branch": "branch-name-lint .branch-name-lint.json",
"lint:css": "stylelint --allow-empty-input --formatter verbose src/**/*.{css,scss,vue}",
"lint:css:fix": "stylelint --allow-empty-input --fix src/**/*.{css,scss,vue}",
"lint:js": "eslint .",
Expand Down
Loading

0 comments on commit 8f6fd1d

Please sign in to comment.