From 6593668279274189b45e8952487328dde74923e7 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 4 Mar 2017 20:10:12 -0500 Subject: [PATCH] lint: use standard style in readme --- .travis.yml | 2 +- README.md | 6 ++++++ package.json | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fe2b9e2..f9ac4d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ before_install: # Setup Node.js version-specific dependencies - "test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev istanbul" - "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" script: # Run test script, depending on istanbul install - "test ! -z $(npm -ps ls istanbul) || npm test" diff --git a/README.md b/README.md index d2b63e5..1c1c680 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ $ npm install fresh ## API + + ```js var fresh = require('fresh') ``` @@ -55,6 +57,8 @@ links to further reading on this Safari bug. ### API usage + + ```js var reqHeaders = { 'if-none-match': '"foo"' } var resHeaders = { 'etag': '"bar"' } @@ -85,6 +89,8 @@ var server = http.createServer(function (req, res) { } // send the resource + res.statusCode = 200 + res.end('hello, world!') }) function isFresh (req, res) { diff --git a/package.json b/package.json index a0bdeed..a732935 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "devDependencies": { "eslint": "3.17.0", "eslint-config-standard": "7.0.0", + "eslint-plugin-markdown": "1.0.0-beta.4", "eslint-plugin-promise": "3.5.0", "eslint-plugin-standard": "2.1.1", "istanbul": "0.4.5", @@ -32,7 +33,7 @@ "node": ">= 0.6" }, "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/"