Skip to content

Commit

Permalink
Merge pull request #78 from nolleto/feature/add-conventional-commits
Browse files Browse the repository at this point in the history
[Feature] Add conventional commits
  • Loading branch information
nolleto committed Dec 30, 2020
2 parents 88d76a7 + 3ddaf45 commit ce9758f
Show file tree
Hide file tree
Showing 7 changed files with 985 additions and 17 deletions.
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"

yarn commitlint --edit
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"eslint.enable": true,
"eslint.autoFixOnSave": true
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build Status](https://travis-ci.org/bayesjs/bayesjs-editor.svg?branch=master)](https://travis-ci.org/bayesjs/bayesjs-editor)
[![Coverage Status](https://coveralls.io/repos/github/bayesjs/bayesjs-editor/badge.svg)](https://coveralls.io/github/bayesjs/bayesjs-editor)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

# BayesJs Editor

Expand All @@ -19,10 +20,9 @@ Bayes' Theorem is Mathematically stated as the following equation:

where A and B are events and P(B)!= 0

* P(A | B) is a [conditional probability](https://en.wikipedia.org/wiki/Conditional_probability): the likelihood of event A occurring given that B is true.
* P(B | A) is also a conditional probability: the likelihood of event B occurring given that A is true.
* P(A) and P(B) are the probabilities of observing A and B independently of each other; this is known as the [marginal probability](https://en.wikipedia.org/wiki/Marginal_distribution).

- P(A | B) is a [conditional probability](https://en.wikipedia.org/wiki/Conditional_probability): the likelihood of event A occurring given that B is true.
- P(B | A) is also a conditional probability: the likelihood of event B occurring given that A is true.
- P(A) and P(B) are the probabilities of observing A and B independently of each other; this is known as the [marginal probability](https://en.wikipedia.org/wiki/Marginal_distribution).

## How to setup

Expand All @@ -35,16 +35,19 @@ yarn // or npm install
## How to test

To execute the unit test you can run:

```
yarn run test:unit
```

And to execute the integration test you can run when the project not running:

```
yarn run test:e2e
```

or, in case you wanna open the cypress while the project is running, in another terminal run:

```
yarn run cypress open
```
Expand Down
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'],
};
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"test:e2e": "start-server-and-test start http-get://localhost:8080 cypress:run",
"cypress:run": "cypress run",
"cypress:open": "cypress open",
"coveralls": "yarn test:unit -- --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
"coveralls": "yarn test:unit -- --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
"commit": "cz",
"postinstall": "is-ci || husky install"
},
"dependencies": {
"@cypress/webpack-preprocessor": "^4.0.3",
Expand Down Expand Up @@ -73,6 +75,8 @@
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@testing-library/react": "^9.1.4",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.6",
Expand All @@ -81,6 +85,7 @@
"coveralls": "^3.0.3",
"css-loader": "^2.1.1",
"cypress": "^3.2.0",
"cz-conventional-changelog": "3.3.0",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
"enzyme-to-json": "^3.3.5",
Expand All @@ -92,6 +97,8 @@
"eslint-plugin-react": "^7.12.4",
"file-loader": "^3.0.1",
"gh-pages": "^2.0.1",
"husky": "^5.0.6",
"is-ci": "^2.0.0",
"jest": "^24.8.0",
"jest-css-modules": "^2.0.0",
"json-loader": "^0.5.7",
Expand All @@ -105,5 +112,10 @@
"url-loader": "^1.1.2",
"webpack-cli": "^3.3.2",
"webpack-dev-server": "^3.4.1"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit ce9758f

Please sign in to comment.