Skip to content

Commit 057e730

Browse files
committed
fix linting errors
1 parent 737d09c commit 057e730

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ class API {
3131
this._routes = {}
3232

3333
// Default callback
34-
this._cb = function() { console.log('No callback specified') }
34+
this._cb = function() {
35+
/* eslint-disable no-console */
36+
console.log('No callback specified')
37+
/* eslint-enable no-console */
38+
}
3539

3640
// Middleware stack
3741
this._middleware = []
@@ -172,6 +176,7 @@ class API {
172176

173177
let message
174178

179+
/* eslint-disable no-console */
175180
if (e instanceof Error) {
176181
response.status(this._errorStatus)
177182
message = e.message
@@ -180,6 +185,7 @@ class API {
180185
message = e
181186
!this._test && console.log('API Error:',e)
182187
}
188+
/* eslint-enable no-console */
183189

184190
// If first time through, process error middleware
185191
if (response._state === 'processing') {
@@ -280,7 +286,9 @@ class API {
280286
try {
281287
this._app[namespace] = packages[namespace]
282288
} catch(e) {
289+
/* eslint-disable no-console */
283290
console.error(e.message)
291+
/* eslint-enable no-console */
284292
}
285293
}
286294
} else if (arguments.length === 2 && typeof packages === 'string') {
@@ -317,7 +325,9 @@ class API {
317325
let routes = UTILS.extractRoutes(this._routes)
318326

319327
if (format) {
320-
prettyPrint(routes)
328+
/* eslint-disable no-console */
329+
console.log(prettyPrint(routes))
330+
/* eslint-enable no-console */
321331
} else {
322332
return routes
323333
}

lib/request.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ class REQUEST {
1818
this.app = app
1919

2020
// Init and default the handler
21-
this._handler = function() { console.log('No handler specified') }
21+
this._handler = function() {
22+
/* eslint-disable no-console */
23+
console.log('No handler specified')
24+
/* eslint-enable no-console */
25+
}
2226

2327
// Expose Namespaces
2428
this.namespace = this.ns = app._app

0 commit comments

Comments
 (0)