Created
December 8, 2014 17:39
-
-
Save indexzero/993ddfb8086f1e2fd39b to your computer and use it in GitHub Desktop.
http-server failing lint ... why?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git pull Jinkwon master | |
| remote: Counting objects: 5, done. | |
| remote: Compressing objects: 100% (4/4), done. | |
| remote: Total 5 (delta 0), reused 0 (delta 0) | |
| Unpacking objects: 100% (5/5), done. | |
| From https://github.com/Jinkwon/http-server | |
| * branch master -> FETCH_HEAD | |
| Updating 4407db1..c5839f8 | |
| Fast-forward | |
| .gitignore | 2 ++ | |
| lib/http-server.js | 72 ++++++++++++++++++++++++++++++++---------------------------------------- | |
| 2 files changed, 34 insertions(+), 40 deletions(-) | |
| gh-114 in ~/Git/nodeapps/http-server $ npm test | |
| npm info it worked if it ends with ok | |
| npm info using npm@2.1.9 | |
| npm info using node@v0.10.33 | |
| npm info pretest http-server@0.7.4 | |
| > http-server@0.7.4 pretest /Users/charlie/Git/nodeapps/http-server | |
| > stylezero bin/ lib/ test | |
| Running jshint against bin/, lib/, test/ | |
| lib/http-server.js: line 6, col 27, Expected an assignment or function call and instead saw an expression. | |
| lib/http-server.js: line 7, col 43, Expected an assignment or function call and instead saw an expression. | |
| lib/http-server.js: line 29, col 42, Expected an assignment or function call and instead saw an expression. | |
| 3 errors | |
| Running jscs against bin/, lib/, test/ | |
| Missing space before opening curly brace for block expressions at lib/http-server.js : | |
| 3 | ecstatic = require('ecstatic'); | |
| 4 | | |
| 5 |var HTTPServer = exports.HTTPServer = function (options){ | |
| ---------------------------------------------------------------^ | |
| 6 | options || (options = {}); | |
| 7 | options.headers || (options.headers = {}); | |
| Missing space before opening curly brace at lib/http-server.js : | |
| 3 | ecstatic = require('ecstatic'); | |
| 4 | | |
| 5 |var HTTPServer = exports.HTTPServer = function (options){ | |
| ---------------------------------------------------------------^ | |
| 6 | options || (options = {}); | |
| 7 | options.headers || (options.headers = {}); | |
| Multiple line break at lib/http-server.js : | |
| 19 | this.server = this.create(); | |
| 20 |}; | |
| 21 | | |
| --------^ | |
| 22 | | |
| 23 |HTTPServer.prototype.create = function () { | |
| Multiple line break at lib/http-server.js : | |
| 44 | return union.createServer(serverOptions); | |
| 45 |}; | |
| 46 | | |
| --------^ | |
| 47 | | |
| 48 |HTTPServer.prototype.checkDirExistence = function (dir) { | |
| Keyword `return` should have an empty line above it at lib/http-server.js : | |
| 49 | try { | |
| 50 | fs.lstatSync(dir); | |
| 51 | return true; | |
| ------------^ | |
| 52 | } catch (er) { return false } | |
| 53 |}; | |
| Keyword `catch` should be placed on new line at lib/http-server.js : | |
| 50 | fs.lstatSync(dir); | |
| 51 | return true; | |
| 52 | } catch (er) { return false } | |
| ------------^ | |
| 53 |}; | |
| 54 | | |
| 6 code style errors found. | |
| npm info http-server@0.7.4 Failed to exec pretest script | |
| npm ERR! Test failed. See above for more details. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment