Skip to content
Browse files

Lint sources

Remove unused variables
  • Loading branch information...
1 parent e8fdd7d commit 1f7c17fb9a2665d71c1dbe2e641f272be962d851 @ixti ixti committed
View
9 examples/single.js
@@ -1,9 +1,10 @@
-var inspect = require('util').inspect,
- jsyaml = require(__dirname + '/../lib/js-yaml'),
- doc;
+var inspect = require('util').inspect;
+
+// just require jsyaml
+require(__dirname + '/../lib/js-yaml');
try {
- doc = require(__dirname + '/single.yml');
+ var doc = require(__dirname + '/single.yml');
console.log(inspect(doc, false, 10, true));
} catch (e) {
console.log(e.stack || e.toString());
View
2 lib/js-yaml/composer.js
@@ -79,7 +79,7 @@ Composer.prototype.composeDocument = function composeDocument() {
return node;
};
-Composer.prototype.composeNode = function composeNode(parent, index) {
+Composer.prototype.composeNode = function composeNode() {
var node = null, event, anchor;
if (this.checkEvent(_events.AliasEvent)) {
View
4 lib/js-yaml/constructor.js
@@ -303,7 +303,7 @@ SafeConstructor.prototype.flattenMapping = function flattenMapping(node) {
}
};
-SafeConstructor.prototype.constructMapping = function constructMapping(node, deep) {
+SafeConstructor.prototype.constructMapping = function constructMapping(node) {
if ($$.isInstanceOf(node, _nodes.MappingNode)) {
this.flattenMapping(node);
}
@@ -617,7 +617,7 @@ Constructor.prototype.constructJavascriptRegExp = function constructJavascriptRe
return new RegExp(regexp, modifiers);
};
-Constructor.prototype.constructJavascriptUndefined = function constructJavascriptUndefined(node) {
+Constructor.prototype.constructJavascriptUndefined = function constructJavascriptUndefined() {
var undef;
return undef;
};
View
2 lib/js-yaml/parser.js
@@ -81,7 +81,7 @@ var DEFAULT_TAGS = {
};
-function Parser(self) {
+function Parser() {
this.currentEvent = null;
this.yamlVersion = null;
this.tagHandles = {};
View
1 lib/js-yaml/reader.js
@@ -1,7 +1,6 @@
'use strict';
-var fs = require('fs');
var $$ = require('./common');
var _errors = require('./errors');
View
2 lib/js-yaml/scanner.js
@@ -1685,7 +1685,7 @@ Scanner.prototype.scanPlain = function scanPlain() {
return new _tokens.ScalarToken(chunks.join(''), true, startMark, endMark);
};
-Scanner.prototype.scanPlainSpaces = function scanPlainSpaces(indent, startMark) {
+Scanner.prototype.scanPlainSpaces = function scanPlainSpaces() {
var chunks, length, whitespaces, ch, prefix, breaks, lineBreak;
// See the specification for details.
View
1 test/functional/functional-structure.js
@@ -3,7 +3,6 @@
var Assert = require('assert');
var Fs = require('fs');
-var JsYaml = require('../../lib/js-yaml');
var Loader = require('../../lib/js-yaml/loader');
var Events = require('../../lib/js-yaml/events');
var Helper = require('../helper');
View
4 test/issues/issue-17.js
@@ -1,8 +1,10 @@
'use strict';
+require('../../lib/js-yaml');
+
+
var Assert = require('assert');
-var JsYaml = require('../../lib/js-yaml');
var source = __dirname + '/data/issue-17.yml';
View
4 test/issues/issue-19.js
@@ -1,8 +1,10 @@
'use strict';
+require('../../lib/js-yaml');
+
+
var Assert = require('assert');
-var JsYaml = require('../../lib/js-yaml');
var source = __dirname + '/data/issue-19.yml';
View
4 test/issues/issue-26.js
@@ -1,8 +1,10 @@
'use strict';
+require('../../lib/js-yaml');
+
+
var Assert = require('assert');
-var JsYaml = require('../../lib/js-yaml');
var source = __dirname + '/data/issue-26.yml';
View
4 test/issues/issue-33.js
@@ -1,8 +1,10 @@
'use strict';
+require('../../lib/js-yaml');
+
+
var Assert = require('assert');
-var JsYaml = require('../../lib/js-yaml');
var source = __dirname + '/data/issue-33.yml';
View
5 test/issues/issue-46.js
@@ -1,7 +1,10 @@
'use strict';
+
+require('../../lib/js-yaml');
+
+
var Assert = require('assert');
-var JsYaml = require('../../lib/js-yaml');
var source = __dirname + '/data/issue-46.yml';
View
5 test/issues/issue-54.js
@@ -1,7 +1,10 @@
'use strict';
+
+require('../../lib/js-yaml');
+
+
var Assert = require('assert');
-var JsYaml = require('../../lib/js-yaml');
var source = __dirname + '/data/issue-54.yml';
View
4 test/issues/issue-8.js
@@ -1,8 +1,10 @@
'use strict';
+require('../../lib/js-yaml');
+
+
var Assert = require('assert');
-var JsYaml = require('../../lib/js-yaml');
var source = __dirname + '/data/issue-8.yml';

0 comments on commit 1f7c17f

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