Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
chore(commitizen): add commitizen & commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
regalius authored Jan 28, 2019
1 parent 8620866 commit 7a0f0b1
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 76 deletions.
30 changes: 30 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"rules": {
"body-leading-blank": [1, "always"],
"footer-leading-blank": [1, "always"],
"header-max-length": [2, "always", 72],
"scope-case": [2, "always", "lower-case"],
"subject-case": [2, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]],
"subject-empty": [2, "never"],
"subject-full-stop": [2, "never", "."],
"type-case": [2, "always", "lower-case"],
"type-empty": [2, "never"],
"type-enum": [
2,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test"
]
]
}
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Change Log

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

<a name="0.1.1"></a>
## 0.1.1 (2019-01-28)
2 changes: 2 additions & 0 deletions docusaurus/docs/contributing/how-to-contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,7 @@ yarn link treats

We also require all your changes to contain unit tests, so we won't accidentally break your codes on future changes.

Treats follow (conventional commits)[https://www.conventionalcommits.org/en/v1.0.0-beta.2/] standard, commitlint would be ran along with the automated sanity checks to make sure your commit messages following the standard. To make crafting your commit message easier, please use commitizen with `git cz` or `yarn commit` instead of `git commit` to commit your codes.

## License
By contributing to Treats, you agree that your contributions will be licensed under its Apache 2.0 license.
168 changes: 92 additions & 76 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,95 @@
{
"name": "treats-repo",
"version": "0.1.1",
"description": "Tokopedia React Development Kits Repository",
"author": "Tokopedia Engineering",
"license": "Apache-2.0",
"scripts": {
"bootstrap": "lerna bootstrap --hoist",
"clean": "lerna clean",
"ls": "lerna ls",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"eslint": "eslint --config ./.eslintrc ./packages",
"stylelint": "stylelint ./packages/**/*.css",
"lint": "yarn eslint && yarn stylelint",
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate",
"contributors:check": "all-contributors check",
"publish": "lerna publish",
"prettier": "prettier ./packages/**/*.js",
"lint-staged": "lint-staged",
"postinstall": "yarn bootstrap",
"precommit": "lint-staged"
},
"devDependencies": {
"all-contributors-cli": "5.4.1",
"babel-core": "6.26.3",
"babel-eslint": "8.2.3",
"babel-jest": "23.6.0",
"babel-plugin-css-modules-transform": "1.6.1",
"babel-plugin-react-intl": "2.4.0",
"babel-plugin-transform-object-assign": "6.22.0",
"babel-plugin-transform-require-ignore": "0.1.1",
"babel-plugin-universal-import": "1.5.3",
"babel-plugin-webpack-alias": "2.1.2",
"babel-preset-env": "1.7.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-flow": "6.23.0",
"babel-preset-react": "6.24.1",
"babel-preset-stage-1": "6.24.1",
"babel-preset-stage-2": "6.24.1",
"cross-env": "5.2.0",
"enhanced-resolve": "3.4.1",
"enzyme": "3.3.0",
"enzyme-adapter-react-16": "1.1.1",
"enzyme-to-json": "3.3.4",
"eslint": "4.19.1",
"eslint-config-airbnb": "16.1.0",
"eslint-config-prettier": "2.9.0",
"eslint-import-resolver-webpack": "0.8.4",
"eslint-plugin-flowtype": "2.49.3",
"eslint-plugin-graphql": "2.1.1",
"eslint-plugin-import": "2.12.0",
"eslint-plugin-jsx-a11y": "6.0.3",
"eslint-plugin-prettier": "3.0.0",
"eslint-plugin-react": "7.9.1",
"flow-bin": "0.67.1",
"flow-coverage-report": "0.5.0",
"flow-typed": "2.5.1",
"husky": "0.14.3",
"identity-obj-proxy": "3.0.0",
"jest": "23.6.0",
"jest-transform-graphql": "2.1.0",
"lerna": "2.11.0",
"lint-staged": "7.2.2",
"markdown-loader-jest": "0.1.1",
"prettier": "1.13.4",
"react": "16.4.2",
"react-addons-test-utils": "15.6.2",
"react-dom": "16.4.2",
"react-hot-loader": "4.3.4",
"react-test-renderer": "16.4.2",
"stylelint": "8.4.0",
"stylelint-config-css-modules": "1.2.0",
"stylelint-config-prettier": "1.0.2",
"stylelint-config-standard": "17.0.0"
"name": "treats-repo",
"version": "0.1.1",
"description": "Tokopedia React Development Kits Repository",
"author": "Tokopedia Engineering",
"license": "Apache-2.0",
"scripts": {
"bootstrap": "lerna bootstrap --hoist",
"clean": "lerna clean",
"ls": "lerna ls",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"eslint": "eslint --config ./.eslintrc ./packages",
"stylelint": "stylelint ./packages/**/*.css",
"lint": "yarn eslint && yarn stylelint",
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate",
"contributors:check": "all-contributors check",
"publish": "lerna publish",
"prettier": "prettier ./packages/**/*.js",
"lint-staged": "lint-staged",
"postinstall": "yarn bootstrap",
"commit" : "npx git cz",
"release": "standard-version"
},
"devDependencies": {
"@commitlint/cli": "^7.4.0",
"@commitlint/config-conventional": "^7.3.1",
"all-contributors-cli": "5.4.1",
"babel-core": "6.26.3",
"babel-eslint": "8.2.3",
"babel-jest": "23.6.0",
"babel-plugin-css-modules-transform": "1.6.1",
"babel-plugin-react-intl": "2.4.0",
"babel-plugin-transform-object-assign": "6.22.0",
"babel-plugin-transform-require-ignore": "0.1.1",
"babel-plugin-universal-import": "1.5.3",
"babel-plugin-webpack-alias": "2.1.2",
"babel-preset-env": "1.7.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-flow": "6.23.0",
"babel-preset-react": "6.24.1",
"babel-preset-stage-1": "6.24.1",
"babel-preset-stage-2": "6.24.1",
"cross-env": "5.2.0",
"cz-conventional-changelog": "2.1.0",
"enhanced-resolve": "3.4.1",
"enzyme": "3.3.0",
"enzyme-adapter-react-16": "1.1.1",
"enzyme-to-json": "3.3.4",
"eslint": "4.19.1",
"eslint-config-airbnb": "16.1.0",
"eslint-config-prettier": "2.9.0",
"eslint-import-resolver-webpack": "0.8.4",
"eslint-plugin-flowtype": "2.49.3",
"eslint-plugin-graphql": "2.1.1",
"eslint-plugin-import": "2.12.0",
"eslint-plugin-jsx-a11y": "6.0.3",
"eslint-plugin-prettier": "3.0.0",
"eslint-plugin-react": "7.9.1",
"flow-bin": "0.67.1",
"flow-coverage-report": "0.5.0",
"flow-typed": "2.5.1",
"husky": "1.3.1",
"identity-obj-proxy": "3.0.0",
"jest": "23.6.0",
"jest-transform-graphql": "2.1.0",
"lerna": "2.11.0",
"lint-staged": "7.2.2",
"markdown-loader-jest": "0.1.1",
"prettier": "1.13.4",
"react": "16.4.2",
"react-addons-test-utils": "15.6.2",
"react-dom": "16.4.2",
"react-hot-loader": "4.3.4",
"react-test-renderer": "16.4.2",
"standard-version": "^4.4.0",
"stylelint": "8.4.0",
"stylelint-config-css-modules": "1.2.0",
"stylelint-config-prettier": "1.0.2",
"stylelint-config-standard": "17.0.0"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}

0 comments on commit 7a0f0b1

Please sign in to comment.