Skip to content

Commit d4be534

Browse files
committed
Feature: add support for commitlint
1 parent 922daf7 commit d4be534

File tree

4 files changed

+440
-397
lines changed

4 files changed

+440
-397
lines changed

.commitlintrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extends: ['armour']

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,28 @@
2424
## Stack
2525

2626
* [x] [yarn](https://github.com/yarnpkg/yarn) - dependency manager
27-
* [x] [express](http://expressjs.com/) - node.js framework for backend
27+
* [x] [express](http://expressjs.com/) - node.js web framework for backend
2828
* [x] [materialize](http://materializecss.com/) - a modern responsive front-end framework based on Material Design
2929
* [x] [sass](https://github.com/sass/sass) - CSS pre-processors
3030
* [x] [postcss](https://github.com/postcss/postcss) - CSS post-processor
3131
* [x] [webpack 4](https://github.com/webpack/webpack) - module bundler
3232
* [x] [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) - offers a dev middleware for webpack, which arguments a live bundle to a directory
3333
* [x] [webpack-hot-middleware](https://github.com/glenjamin/webpack-hot-middleware) - add hot reloading into an existing server without [webpack-dev-server](https://github.com/webpack/webpack-dev-server)
3434
* [x] followed [ES6 standard](https://github.com/lukehoban/es6features)
35-
* [x] [babel](https://babeljs.io/) - compile ES6 to ES5
36-
* [x] [react](https://facebook.github.io/react/) - building user interfaces
35+
* [x] [babel](https://babeljs.io/) - a JavaScript compiler that compile ES6 to ES5
36+
* [x] [react](https://facebook.github.io/react/) - a JavaScript library for building user interfaces
3737
* [x] [react-hot-loader 4](https://github.com/gaearon/react-hot-loader) - hot module reload!
38-
* [x] [react-router 4](https://github.com/ReactTraining/react-router) - routing
39-
* [x] [react-redux](https://github.com/reactjs/react-redux) - the official react bindings for [redux](https://github.com/reactjs/redux) (a predictable state container for js apps)
40-
* [x] [connected-react-router](https://github.com/supasate/connected-react-router) - a redux binding for react-router 4, currently a replacement for [react-router-redux v5](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux)
38+
* [x] [react-router 4](https://github.com/ReactTraining/react-router) - declarative routing for React
39+
* [x] [react-redux](https://github.com/reactjs/react-redux) - the official react bindings for [redux 4](https://github.com/reactjs/redux) (a predictable state container for js apps)
40+
* [x] [connected-react-router](https://github.com/supasate/connected-react-router) - a redux binding for react-router 4, the replacement for [react-router-redux v5](https://github.com/ReactTraining/react-router/tree/master/packages/react-router-redux)
4141
* [x] [immutable.js](https://github.com/facebook/immutable-js/) - persistent Immutable data structures for react redux state management
4242
* [x] [Typescript](https://github.com/Microsoft/TypeScript) - a typed superset of javascript that scales
4343
* [x] [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) - high quality TypeScript type definitions
4444
* [x] [editorconfig](http://editorconfig.org/) - maintain consistent coding styles between different editors and IDEs
4545
* [x] [eslint](http://eslint.org/) - lint javascript files (.js, .jsx)
4646
* [x] [tslint](https://palantir.github.io/tslint/) - lint typescript files (.ts, .tsx)
4747
* [x] [stylelint](https://stylelint.io/) - lint style files (.css, .scss)
48+
* [x] [commitlint](https://github.com/marionebl/commitlint) - lint git commit messages
4849
* [x] [postgresql](https://www.postgresql.org/) - advanced open source database
4950
* [x] [prismjs](https://github.com/PrismJS/prism) - code syntax highlight
5051
* [x] [jest](https://facebook.github.io/jest/) - painless javascript testing
@@ -129,7 +130,7 @@ yarn test
129130
## Code coverage
130131

131132
```bash
132-
yarn coveralls
133+
yarn coverage
133134
```
134135

135136
## Deployment

package.json

+14-7
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@
2121
"clean": "rm -rf frontend/dist .awcache coverage",
2222
"test": "jest --no-cache --coverage",
2323
"coverage": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls",
24-
"deploy": "heroku container:push web",
25-
"precommit": "yarn lint",
26-
"prepush": "yarn test && yarn coverage"
24+
"deploy": "heroku container:push web"
25+
},
26+
"husky": {
27+
"hooks": {
28+
"pre-commit": "yarn lint",
29+
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS",
30+
"pre-push": "yarn test && yarn coverage"
31+
}
2732
},
2833
"dependencies": {
2934
"@types/jest": "23.1.4",
@@ -44,14 +49,16 @@
4449
"awesome-typescript-loader": "5.2.0",
4550
"babel-cli": "6.26.0",
4651
"babel-core": "6.26.3",
47-
"babel-loader": "7.1.4",
52+
"babel-loader": "7.1.5",
4853
"babel-plugin-transform-runtime": "6.23.0",
4954
"babel-preset-env": "1.7.0",
5055
"babel-preset-react": "6.24.1",
5156
"babel-preset-stage-0": "6.24.1",
5257
"babel-register": "6.26.0",
5358
"body-parser": "1.18.3",
5459
"colors": "1.3.0",
60+
"commitlint": "7.0.0",
61+
"commitlint-config-armour": "1.0.4",
5562
"compression": "1.7.2",
5663
"connect-redis": "3.3.3",
5764
"connected-react-router": "4.3.0",
@@ -72,15 +79,15 @@
7279
"helmet": "3.12.1",
7380
"history": "4.7.2",
7481
"html-webpack-plugin": "3.2.0",
75-
"husky": "0.14.3",
82+
"husky": "1.0.0-rc.12",
7683
"image-webpack-loader": "4.3.1",
7784
"immutable": "4.0.0-rc.9",
7885
"jest": "23.3.0",
7986
"material-design-icons": "3.0.1",
8087
"materialize-css": "1.0.0-rc.2",
8188
"mini-css-extract-plugin": "0.4.1",
8289
"morgan": "1.9.0",
83-
"node-sass": "4.9.0",
90+
"node-sass": "4.9.1",
8491
"nodemon": "1.17.5",
8592
"offline-plugin": "5.0.5",
8693
"optimize-css-assets-webpack-plugin": "4.0.3",
@@ -117,7 +124,7 @@
117124
"uglifyjs-webpack-plugin": "1.2.7",
118125
"url-loader": "1.0.1",
119126
"uuid": "3.3.2",
120-
"webpack": "4.15.0",
127+
"webpack": "4.15.1",
121128
"webpack-bundle-analyzer": "2.13.1",
122129
"webpack-cli": "3.0.8",
123130
"webpack-dev-middleware": "3.1.3",

0 commit comments

Comments
 (0)