Permalink
Browse files

Use strict mode; centralise JSLint option.

  • Loading branch information...
1 parent 19e1713 commit 31b1a48ec2eca08c804c09301b5343c39d7fe4ea @mfncooper committed Dec 2, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 mockery.js
View
@@ -32,6 +32,10 @@
* 'require' can be mocked out.
*/
+/*jslint nomen: true */
+
+"use strict";
+
var m = require('module'),
registeredMocks = {},
registeredSubstitutes = {},
@@ -47,7 +51,6 @@ var m = require('module'),
* for an array and pull the filename from that if necessary.
*/
function resolveFilename(request, parent) {
- /*jslint nomen: true */
var filename = m._resolveFilename(request, parent);
if (Array.isArray(filename)) {
filename = filename[1];
@@ -111,7 +114,6 @@ function enable() {
// Already hooked
return;
}
- /*jslint nomen: true */
originalLoader = m._load;
m._load = hookedLoader;
}
@@ -126,7 +128,6 @@ function disable() {
// Not hooked
return;
}
- /*jslint nomen: true */
m._load = originalLoader;
originalLoader = null;
}
@@ -226,7 +227,6 @@ function deregisterAllowable(mod) {
var allow = registeredAllowables[mod];
if (allow.unhook) {
allow.paths.forEach(function (p) {
- /*jslint nomen: true */
delete m._cache[p];
});
}
@@ -255,7 +255,6 @@ function deregisterAll() {
var allow = registeredAllowables[mod];
if (allow.unhook) {
allow.paths.forEach(function (p) {
- /*jslint nomen: true */
delete m._cache[p];
});
}

0 comments on commit 31b1a48

Please sign in to comment.