Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributing updates #1019

Merged
merged 2 commits into from Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 22 additions & 4 deletions CONTRIBUTING.md
Expand Up @@ -86,21 +86,39 @@ you have several options:

# Code Style

We're using Prettier, ESlint and the Airbnb preset.
We're using Prettier, ESlint and the Airbnb preset. To fix errors which are automatically fixable, run:

## Verifying linting style
```
npm run format
```

To run the linter, run:

```
npm run lint
```

# Testing

There are a few test scripts, depending on what type of testing you want to run.

**Unit tests**

To run unit tests only:

```
npm run test:unit
```

**Watch mode**

To run all tests in watch mode (this skips `npm install`):

```
npm test
npm run test:watch
```

# Test coverage
**Test coverage**

```
npm run test:cov
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"build": "rimraf dist && babel src --ignore \"**/__tests__/**/*\" --out-dir dist && copyfiles -u 1 \"src/**/*.{vm,py,rb}\" dist",
"lint": "eslint .",
"format": "eslint . --fix",
"list-contributors": "echo 'clone https://github.com/mgechev/github-contributors-list.git first, then run npm install' && cd ../github-contributors-list && node bin/githubcontrib --owner dherault --repo serverless-offline --sortBy contributions --showlogin true --sortOrder desc > contributors.md",
"prepare": "npm run build",
"prepublishOnly": "npm run lint && npm run build",
Expand Down