@hmcts/cmc-validators
Advanced tools
Comparing version 0.0.1 to 0.1.0
{ | ||
"name": "@hmcts/cmc-validators", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"author": "HMCTS", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
# cmc-validators | ||
This is validator library, containing frontend validators used in CMC frontend applications. | ||
This is a validator library, containing frontend validators used in CMC frontend applications. | ||
i.e [cmc-citizen-frontend](https://github.com/hmcts/cmc-citizen-frontend) and [cmc-legal-rep-frontend](https://github.com/hmcts/cmc-legal-rep-frontend) | ||
## Developing | ||
## Getting started | ||
### Code style | ||
### How to use it? | ||
#### Installation | ||
To add library to the project dependencies run: | ||
```bash | ||
$ yarn add @hmcts/cmc-validators | ||
``` | ||
or | ||
```bash | ||
$ npm install @hmcts/cmc-validators | ||
``` | ||
#### Dependencies | ||
Install dependencies by executing the following command: | ||
@@ -14,12 +31,19 @@ | ||
``` | ||
We use [TSLint](https://palantir.github.io/tslint/) with [StandardJS](http://standardjs.com/index.html) rules alongside [sass-lint](https://github.com/sasstools/sass-lint) | ||
Running the linting: | ||
`yarn lint` | ||
#### Code style | ||
### Running the tests | ||
We use [TSLint](https://palantir.github.io/tslint/) with [StandardJS](http://standardjs.com/index.html) rules | ||
Mocha is used for writing tests. | ||
Run the linting: | ||
```bash | ||
$ yarn lint | ||
``` | ||
Linting will also run automatically prior to committing changes. | ||
#### Running the tests | ||
[Mocha](https://mochajs.org) is used for writing tests. | ||
Run them with: | ||
@@ -31,8 +55,7 @@ | ||
## Install | ||
For test coverage run: | ||
Run: | ||
```bash | ||
$ yarn test:coverage | ||
``` | ||
$ yarn add @hmcts/cmc-validators | ||
``` | ||
@@ -39,0 +62,0 @@ ## License |
127519
19
315
63