run linting on travis, document code style

This commit is contained in:
Matthias Kretschmann 2019-06-20 01:35:36 +02:00 committed by Pedro Gutiérrez
parent b61822e30c
commit afcb9f3625
2 changed files with 14 additions and 0 deletions

View File

@ -27,6 +27,7 @@ before_script:
- cd ..
script:
- npm run lint
- export ETH_PORT=18545; npm run test:cover
- npm run build
- npm run doc

View File

@ -25,6 +25,7 @@
- [Testing](#Testing)
- [Unit Tests](#Unit-Tests)
- [Integration Tests](#Integration-Tests)
- [Code Style](#Code-Style)
- [Production build](#Production-build)
- [Releases](#Releases)
- [License](#License)
@ -157,6 +158,18 @@ to generate code coverage information during test, run:
npm run integration:cover
```
## Code Style
Project follows [eslint-config-oceanprotocol](https://github.com/oceanprotocol/eslint-config-oceanprotocol). For linting and auto-formatting you can use:
```bash
# lint all ts with eslint
npm run lint
# auto format all ts with prettier, taking all configs into account
npm run format
```
## Production build
To create a production build: