generated from wrappid/wrappid-module
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add branch config for main and development Ref: #4
- Loading branch information
1 parent
172c706
commit 12d01fa
Showing
6 changed files
with
70 additions
and
2 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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
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,18 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
valid_branch_names_regex="^WRPD-(feature|bugfix|release|ci|enhancement|hotfix|refactor|deps|docs|experimental|security)?-[0-9]+$|^main$|^development$" | ||
branch="$(git rev-parse --abbrev-ref HEAD)" | ||
|
||
if [ "$branch" = "main" ] || [ "$branch" = "development" ]; then | ||
echo "Committing on the $branch branch is not allowed." | ||
exit 1 | ||
fi | ||
|
||
if ! [[ $branch =~ $valid_branch_n$branames_regex ]]; then | ||
echo "Invalid branch name: $branch; commit rejected" | ||
echo "Please rename your branch to conform to $valid_branch_names_regex pattern." | ||
exit 1 | ||
fi | ||
# anable after linting config is created. | ||
# npx lint-staged |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"files.eol": "\n", | ||
"[javascript]": { | ||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" | ||
}, | ||
|
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,42 @@ | ||
/** | ||
* List of commit types allowed in commit messages. | ||
* | ||
* @author Ananta Kumar Ghosh <[email protected]> | ||
*/ | ||
const types = [ | ||
"build", | ||
"chore", | ||
"ci", | ||
"docs", | ||
"feat", | ||
"fix", | ||
"perf", | ||
"refactor", | ||
"revert", | ||
"style", | ||
"test" | ||
]; | ||
|
||
/** | ||
* List of commit scopes allowed in commit messages. | ||
*/ | ||
const scopes = ["config", "core", "global", "utils"]; | ||
|
||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
|
||
parserPreset: { parserOpts: { issuePrefixes: ["#"] } }, | ||
|
||
rules: { | ||
"body-leading-blank" : [2, "always"], | ||
"body-max-line-length": [2, "always", 250], | ||
"footer-empty" : [2, "never"], | ||
"footer-leading-blank": [2, "always"], | ||
"references-empty" : [2, "never"], | ||
"scope-case" : [2, "always", "camel-case"], | ||
"scope-empty" : [0, "always"], | ||
"scope-enum" : [2, "always", scopes], | ||
"type-enum" : [2, "always", types], | ||
}, | ||
}; |
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 @@ | ||
module.exports = { "**/*.{js,jsx,ts,tsx}": ["npx eslint --ignore-path .gitignore ./app"] }; |
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