Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: pre-commit hooks for code style and commit message quality #66

Merged
merged 6 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
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"

npx lint-staged
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

---

# v8.2.9 (Tue Jun 29 2021)
# v8.2.10 (Tue Jun 29 2021)

:tada: This release contains work from new contributors! :tada:

Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
17 changes: 16 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"test": "jest",
"styleguide": "styleguidist server",
"styleguide:build": "styleguidist build",
"release": "yarn build && auto shipit"
"release": "yarn build && auto shipit",
"prepare": "husky install"
},
"author": "Elijah Meeks <[email protected]>",
"repository": "https://github.com/nteract/data-explorer",
Expand Down Expand Up @@ -52,6 +53,8 @@
"@babel/core": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@babel/preset-react": "^7.7.4",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@nteract/outputs": "^3.0.0",
"@types/d3-array": "^2.0.0",
"@types/d3-collection": "^1.0.7",
Expand All @@ -71,8 +74,11 @@
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"enzyme-to-json": "^3.4.3",
"husky": "^6.0.0",
"jest": "^24.9.0",
"lint-staged": ">=10",
"numeral": "^2.0.6",
"prettier": "^2.3.2",
"prop-types": "^15.7.2",
"react": "^16.14.0",
"react-docgen-typescript": "^1.16.2",
Expand All @@ -89,5 +95,14 @@
"typescript-tslint-plugin": "^0.5.5",
"webpack": "^4.41.5",
"webpack-dev-server": "^3.10.1"
},
"lint-staged": {
"*.tsx,*.ts,*.js,!*js.snap": [
"prettier --write"
],
"*.json,!package.json": [
"prettier --write"
],
"*.{js,jsx,ts,tsx}": "eslint --cache --fix"
}
}
Loading