Skip to content

Commit

Permalink
style(lint): fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jspaine committed Aug 4, 2017
1 parent a22666e commit 509fe46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions _test/html-ast-transform.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {expect} from "chai";
import "mocha";
import * as parse5 from "parse5";

import {transform, getAttr, h, hasClass} from "../src";
import {getAttr, h, hasClass, transform} from "../src";

describe("Html transform", function() {
it("does nothing", function() {
Expand Down Expand Up @@ -83,18 +83,18 @@ describe("Html transform", function() {
});

it("whole document", function() {
const input = '<!DOCTYPE html><html><head><title>foo</title></head><body><div>foo</div></body></html>'
const input = "<!DOCTYPE html><html><head><title>foo</title></head><body><div>foo</div></body></html>";

const res = transform(input, {fragment: false})
expect(res).to.equal(input)
})
const res = transform(input, {fragment: false});
expect(res).to.equal(input);
});

it("example 1", function() {
const input = "<div><p class=\"text-center\">Some text</p></div>";
const output = "<div><tr><td class=\"text-center\">Some text</td></tr></div>";
const res = transform(input, {
replaceTags: {
p: node => h("tr", [], [
p: (node) => h("tr", [], [
h("td", node.attrs, node.childNodes)
])
}
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export {default as transform} from './html-ast-transform'
export {default as transform} from "./html-ast-transform";

export {
getAttr,
h,
hasClass,
withAttr,
withClass
} from './helpers'
} from "./helpers";

0 comments on commit 509fe46

Please sign in to comment.