Skip to content

Commit

Permalink
chore: commitlint and husky
Browse files Browse the repository at this point in the history
  • Loading branch information
jacques-trixta committed Sep 17, 2021
1 parent 15046bc commit 0fd1689
Show file tree
Hide file tree
Showing 12 changed files with 28,897 additions and 126 deletions.
12 changes: 9 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
node_modules/
coverage/
static/
types/
dist/
build/
lib/
flow-typed/
*.d.ts
types/**
.eslintrc.js
__stories__/
stories/
serviceWorker.ts
*.config.js
scripts/

coverage/
config/
6 changes: 3 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=none
* text=none eol=lf

# Source code
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.coffee text
*.css text eol=lf
*.htm text diff=html
*.html text diff=html
*.htm text diff=html eol=lf
*.html text diff=html eol=lf
*.inc text
*.ini text
*.js text eol=lf
Expand Down
2 changes: 2 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[commit]
template = ~/.gitmessage
10 changes: 5 additions & 5 deletions .gitmessage
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@

# Description: commit description up to 50 chars

# Body:
# Explain what was done or fixed, why this change is being made.
# Body:
# Explain what was done or fixed, why this change is being made.
# Provide links or keys to any relevant issues (#WR-23), tickets, articles or other resources

# Footer:
# The footer is optional lines that mention consequences which stems from the change -
# The footer is optional lines that mention consequences which stems from the change -
# such as announcing a breaking change, linking closed issues, mentioning contributors and so on.

# Example:
# fix(core): removed deprecated apis
#
# These apis have been deprecated in v3, so they should stick around till v5,
# These apis have been deprecated in v3, so they should stick around till v5,
# but since they are defunct we are removing them early so that they don't take up payload size.
#
# #WR-53
# BREAKING CHANGE: this fix changes the core functionality
# BREAKING CHANGE: this fix changes the core functionality
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
Loading

0 comments on commit 0fd1689

Please sign in to comment.