Skip to content

Commit

Permalink
Make linting pass
Browse files Browse the repository at this point in the history
Closes #1326
  • Loading branch information
SimenB committed Apr 28, 2015
1 parent c0fb23a commit 26736e1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .jscsrc
@@ -1,6 +1,13 @@
{ {
"preset": "google", "preset": "google",
"validateIndentation": 4, "validateIndentation": 4,
"disallowSpacesInAnonymousFunctionExpression": null,
"disallowMultipleVarDecl": null,
"maximumLineLength": {
"value": 120,
"allowComments": true,
"allowRegex": true
},
"excludeFiles": [ "excludeFiles": [
"dist/**", "dist/**",
"node_modules/**", "node_modules/**",
Expand Down
5 changes: 2 additions & 3 deletions .travis.yml
@@ -1,5 +1,4 @@
sudo: false
language: node_js language: node_js
node_js: node_js:
- "0.12" - 0.12
- "0.11"
- "0.10"
12 changes: 6 additions & 6 deletions require.js
Expand Up @@ -589,7 +589,7 @@ var requirejs, require, define;
id: mod.map.id, id: mod.map.id,
uri: mod.map.url, uri: mod.map.url,
config: function () { config: function () {
return getOwn(config.config, mod.map.id) || {}; return getOwn(config.config, mod.map.id) || {};
}, },
exports: mod.exports || (mod.exports = {}) exports: mod.exports || (mod.exports = {})
}); });
Expand Down Expand Up @@ -1236,7 +1236,8 @@ var requirejs, require, define;
while (defQueue.length) { while (defQueue.length) {
args = defQueue.shift(); args = defQueue.shift();
if (args[0] === null) { if (args[0] === null) {
return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' +
args[args.length - 1]));
} else { } else {
//args are id, deps, factory. Should be normalized by the //args are id, deps, factory. Should be normalized by the
//define() function. //define() function.
Expand Down Expand Up @@ -1323,7 +1324,7 @@ var requirejs, require, define;
each(cfg.packages, function (pkgObj) { each(cfg.packages, function (pkgObj) {
var location, name; var location, name;


pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj;


name = pkgObj.name; name = pkgObj.name;
location = pkgObj.location; location = pkgObj.location;
Expand Down Expand Up @@ -1497,7 +1498,7 @@ var requirejs, require, define;
//in array so that the splices do not //in array so that the splices do not
//mess up the iteration. //mess up the iteration.
eachReverse(defQueue, function(args, i) { eachReverse(defQueue, function(args, i) {
if(args[0] === id) { if (args[0] === id) {
defQueue.splice(i, 1); defQueue.splice(i, 1);
} }
}); });
Expand Down Expand Up @@ -1984,7 +1985,7 @@ var requirejs, require, define;
//like a module name. //like a module name.
mainScript = mainScript.replace(jsSuffixRegExp, ''); mainScript = mainScript.replace(jsSuffixRegExp, '');


//If mainScript is still a path, fall back to dataMain //If mainScript is still a path, fall back to dataMain
if (req.jsExtRegExp.test(mainScript)) { if (req.jsExtRegExp.test(mainScript)) {
mainScript = dataMain; mainScript = dataMain;
} }
Expand Down Expand Up @@ -2070,7 +2071,6 @@ var requirejs, require, define;
jQuery: true jQuery: true
}; };



/** /**
* Executes the text. Normally just uses eval, but can be modified * Executes the text. Normally just uses eval, but can be modified
* to use a better, environment-specific call. Only used for transpiling * to use a better, environment-specific call. Only used for transpiling
Expand Down
6 changes: 3 additions & 3 deletions testBaseUrl.js
@@ -1,11 +1,11 @@
define([], function() { define([], function() {
doh.register( doh.register(
"testBaseUrl", 'testBaseUrl',
[ [
function testBaseUrl(t){ function testBaseUrl(t) {
t.is(true, true); t.is(true, true);
} }
] ]
); );
doh.run(); doh.run();
}); });

0 comments on commit 26736e1

Please sign in to comment.