Skip to content
Browse files

Lint with JShint 1.0.0

  • Loading branch information...
1 parent 4afbd24 commit cde7e4015e08cd29508b8bb3149cecd0a674b34b @dervus dervus committed Feb 26, 2013
View
2 lib/js-yaml/dumper.js
@@ -120,7 +120,7 @@ function encodeHex(character) {
} else {
throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');
}
-
+
return '\\' + handle + common.repeat('0', length - string.length) + string;
}
View
2 lib/js-yaml/exception.js
@@ -11,7 +11,7 @@ function YAMLException(reason, mark) {
YAMLException.prototype.toString = function toString(compact) {
var result;
-
+
result = 'JS-YAML: ' + (this.reason || '(unknown reason)');
if (!compact && this.mark) {
View
30 lib/js-yaml/loader.js
@@ -127,14 +127,14 @@ function loadAll(input, output, options) {
directiveHandlers = {},
implicitTypes = schema.compiledImplicit,
typeMap = schema.compiledTypeMap,
-
+
length = input.length,
position = 0,
line = 0,
lineStart = 0,
lineIndent = 0,
character = input.charCodeAt(position),
-
+
version,
checkLineBreaks,
tagMap,
@@ -251,7 +251,7 @@ function loadAll(input, output, options) {
}
sourceKeys = Object.keys(source);
-
+
for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
key = sourceKeys[index];
@@ -281,7 +281,7 @@ function loadAll(input, output, options) {
} else {
_result[keyNode] = valueNode;
}
-
+
return _result;
}
@@ -341,7 +341,7 @@ function loadAll(input, output, options) {
function testDocumentSeparator() {
var _position, _character;
-
+
if (position === lineStart &&
(CHAR_MINUS === character || CHAR_DOT === character) &&
input.charCodeAt(position + 1) === character &&
@@ -431,7 +431,7 @@ function loadAll(input, output, options) {
while (position < length) {
if (CHAR_COLON === character) {
following = input.charCodeAt(position + 1);
-
+
if (CHAR_SPACE === following ||
CHAR_TAB === following ||
CHAR_LINE_FEED === following ||
@@ -454,7 +454,7 @@ function loadAll(input, output, options) {
CHAR_CARRIAGE_RETURN === preceding) {
break;
}
-
+
} else if ((position === lineStart && testDocumentSeparator()) ||
withinFlowCollection &&
(CHAR_COMMA === character ||
@@ -551,7 +551,7 @@ function loadAll(input, output, options) {
throwError('unexpected end of the stream within a single quoted scalar');
}
-
+
function readDoubleQuotedScalar(nodeIndent) {
var captureStart,
captureEnd,
@@ -615,7 +615,7 @@ function loadAll(input, output, options) {
} else {
throwError('unknown escape sequence');
}
-
+
captureStart = captureEnd = position;
} else if (CHAR_LINE_FEED === character ||
@@ -798,7 +798,7 @@ function loadAll(input, output, options) {
CHAR_CARRIAGE_RETURN !== character);
}
}
-
+
while (position < length) {
readLineBreak();
lineIndent = 0;
@@ -1062,7 +1062,7 @@ function loadAll(input, output, options) {
isNamed = false,
tagHandle,
tagName;
-
+
if (CHAR_EXCLAMATION !== character) {
return false;
}
@@ -1145,7 +1145,7 @@ function loadAll(input, output, options) {
} else if ('!!' === tagHandle) {
tag = 'tag:yaml.org,2002:' + tagName;
-
+
} else {
throwError('undeclared tag handle "' + tagHandle + '"');
}
@@ -1259,7 +1259,7 @@ function loadAll(input, output, options) {
} else if (lineIndent > parentIndent) {
isIndented = true;
-
+
} else {
return false;
}
@@ -1319,10 +1319,10 @@ function loadAll(input, output, options) {
if (null !== tag || null !== anchor) {
throwError('alias node should not have any properties');
}
-
+
} else if (readPlainScalar(flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
hasContent = true;
-
+
if (null === tag) {
tag = '?';
}
View
2 lib/js-yaml/schema.js
@@ -19,7 +19,7 @@ function compileList(schema, name, result) {
exclude.push(previousIndex);
}
});
-
+
result.push(currentType);
});
View
2 lib/js-yaml/type/js/function.js
@@ -8,7 +8,7 @@ var Type = require('../../type');
function resolveJavascriptFunction(object /*, explicit*/) {
/*jslint evil:true*/
var func;
-
+
try {
func = new Function('return ' + object);
return func();
View
4 test/support/assert-paranoid-equal/inspectors.js
@@ -16,13 +16,13 @@ function ensureEqual(context, actual, expected) {
if (ownUtils.isObject(actual) &&
ownUtils.isObject(expected)) {
-
+
ensureEqualValues(
context,
Object.getPrototypeOf(actual),
Object.getPrototypeOf(expected),
'prototypes');
-
+
if (ownUtils.isInstanceOf(Date, actual, expected)) {
ensureEqualDates(context, actual, expected);
View
2 test/units/mark.js
@@ -32,7 +32,7 @@ it('Mark', function () {
snippet = mark.getSnippet(2, 79);
assert(typeof snippet, 'string');
-
+
temp = snippet.split('\n');
assert.strictEqual(temp.length, 2);

0 comments on commit cde7e40

Please sign in to comment.
Something went wrong with that request. Please try again.