Skip to content

Commit

Permalink
lint: apply standard style to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Sep 2, 2018
1 parent aadafaf commit e5c5e0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ Assert with status codes. Like ctx.throw() in Koa, but with a guard.

## Example
```js
var assert = require('http-assert');
var ok = require('assert');
var assert = require('http-assert')
var ok = require('assert')

var username = 'foobar' // username from request

try {
assert(username == 'fjodor', 401, 'authentication failed');
assert(username === 'fjodor', 401, 'authentication failed')
} catch (err) {
ok(err.status == 401);
ok(err.message == 'authentication failed');
ok(err.expose);
ok(err.status === 401)
ok(err.message === 'authentication failed')
ok(err.expose)
}
```

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"eslint": "5.5.0",
"eslint-config-standard": "12.0.0",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "7.0.1",
"eslint-plugin-promise": "4.0.0",
"eslint-plugin-standard": "4.0.0",
Expand All @@ -30,7 +31,7 @@
"node": ">= 0.8"
},
"scripts": {
"lint": "eslint .",
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
Expand Down

0 comments on commit e5c5e0b

Please sign in to comment.