diff --git a/.travis.yml b/.travis.yml index 973bd575..3dc5777c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ cache: before_install: # Setup Node.js version-specific dependencies - "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul" - - "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint eslint-config-standard eslint-plugin-promise eslint-plugin-standard" + - "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" # Update Node.js modules - "test ! -d node_modules || npm prune" diff --git a/README.md b/README.md index 4ceef896..b68f2836 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,8 @@ $ npm install body-parser ## API + + ```js var bodyParser = require('body-parser') ``` @@ -383,6 +385,11 @@ All the parsers accept a `type` option which allows you to change the `Content-Type` that the middleware will parse. ```js +var express = require('express') +var bodyParser = require('body-parser') + +var app = express() + // parse various different custom JSON types as JSON app.use(bodyParser.json({ type: 'application/*+json' })) diff --git a/package.json b/package.json index bd551d39..9f4af448 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "devDependencies": { "eslint": "3.13.1", "eslint-config-standard": "6.2.1", + "eslint-plugin-markdown": "1.0.0-beta.3", "eslint-plugin-promise": "3.4.0", "eslint-plugin-standard": "2.0.1", "istanbul": "0.4.5", @@ -40,7 +41,7 @@ "node": ">= 0.8" }, "scripts": { - "lint": "eslint .", + "lint": "eslint --plugin markdown --ext js,md .", "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/", "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/", "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/"