From: Aleksander Ɓukasz Date: Thu, 26 Sep 2013 15:34:23 +0000 (+0200) Subject: linting X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/8095e9703888ebe28d96a094905e43eebccb6676?hp=422314851c0b7ce1f0a5209ca09960a47856d173 linting --- diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index 865f928..2d0e09f 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -9,20 +9,20 @@ var TEXT_NODE = Node.TEXT_NODE, ELEMENT_NODE = Node.ELEMENT_NODE; var parseXML = function(xml) { return $(xml)[0]; -} +}; var Document = function(nativeNode) { var $document = $(nativeNode); - Object.defineProperty(this, 'root', {get: function() { return new ElementNode($document[0])}}); -} + Object.defineProperty(this, 'root', {get: function() { return new ElementNode($document[0]);}}); +}; var DocumentNode = function(nativeNode) { this.nativeNode = nativeNode; this._$ = $(nativeNode); -} +}; $.extend(DocumentNode.prototype, { detach: function() { this._$.detach(); }, @@ -30,7 +30,7 @@ $.extend(DocumentNode.prototype, { sameNode: function(otherNode) { return this.nativeNode === otherNode.nativeNode; } -}) +}); var ElementNode = function(nativeNode) { DocumentNode.apply(this, arguments); @@ -118,7 +118,7 @@ $.extend(ElementNode.prototype, DocumentNode.prototype, { var TextNode = function(nativeNode) { DocumentNode.apply(this, arguments); -} +}; $.extend(TextNode.prototype, DocumentNode.prototype, { nodeType: Node.TEXT_NODE, @@ -134,7 +134,7 @@ $.extend(TextNode.prototype, DocumentNode.prototype, { prependText: function(text) { this.nativeNode.data = text + this.nativeNode.data; } -}) +}); return { diff --git a/src/smartxml/smartxml.test.js b/src/smartxml/smartxml.test.js index 2198795..b758a23 100644 --- a/src/smartxml/smartxml.test.js +++ b/src/smartxml/smartxml.test.js @@ -11,15 +11,15 @@ var expect = chai.expect; var getDocumentFromXML = function(xml) { return smartxml.documentFromXML(xml); -} +}; var elementNodeFromParams = function(params) { return smartxml.elementNodeFromXML('<' + params.tag + '>'); -} +}; var elementNodeFromXML = function(xml) { return smartxml.elementNodeFromXML(xml); -} +}; describe.only('smartxml', function() { @@ -41,7 +41,7 @@ describe.only('smartxml', function() { expect(contents[1].nodeType).to.equal(Node.ELEMENT_NODE, 'element node 1'); expect(contents[2].nodeType).to.equal(Node.TEXT_NODE, 'text node 2'); }); - }) + }); describe('Manipulations', function() {