Skip to content

Commit 239d002

Browse files
committed
lint: use standard style in readme
1 parent 6f8fa07 commit 239d002

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ before_install:
1919
# Setup Node.js version-specific dependencies
2020
- "test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev istanbul"
2121
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
22-
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint eslint-config-standard eslint-plugin-promise eslint-plugin-standard"
22+
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint eslint-config-standard eslint-plugin-markdown eslint-plugin-promise eslint-plugin-standard"
2323
# Update Node.js modules
2424
- "test ! -d node_modules || npm prune"
2525
- "test ! -d node_modules || npm rebuild"

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ $ npm install basic-auth
2020

2121
## API
2222

23+
<!-- eslint-disable no-unused-vars -->
24+
2325
```js
2426
var auth = require('basic-auth')
2527
```
@@ -41,15 +43,19 @@ Pass a node request or koa Context object to the module exported. If
4143
parsing fails `undefined` is returned, otherwise an object with
4244
`.name` and `.pass`.
4345

46+
<!-- eslint-disable no-unused-vars, no-undef -->
47+
4448
```js
45-
var auth = require('basic-auth');
46-
var user = auth(req);
49+
var auth = require('basic-auth')
50+
var user = auth(req)
4751
// => { name: 'something', pass: 'whatever' }
4852
```
4953

5054
A header string from any other location can also be parsed with
5155
`auth.parse`, for example a `Proxy-Authorization` header:
5256

57+
<!-- eslint-disable no-unused-vars, no-undef -->
58+
5359
```js
5460
var auth = require('basic-auth')
5561
var user = auth.parse(req.getHeader('Proxy-Authorization'))

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"devDependencies": {
1414
"eslint": "3.10.2",
1515
"eslint-config-standard": "6.2.1",
16+
"eslint-plugin-markdown": "1.0.0-beta.3",
1617
"eslint-plugin-promise": "3.4.0",
1718
"eslint-plugin-standard": "2.0.1",
1819
"istanbul": "0.4.5",
@@ -27,7 +28,7 @@
2728
"node": ">= 0.6"
2829
},
2930
"scripts": {
30-
"lint": "eslint .",
31+
"lint": "eslint --plugin markdown --ext js,md .",
3132
"test": "mocha --check-leaks --reporter spec --bail",
3233
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
3334
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"

0 commit comments

Comments
 (0)