diff --git a/.eslintrc.json b/.eslintrc.json index 6d780b5..67510c9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,6 +11,7 @@ "rules": { "no-unused-vars": ["warn", { "vars": "all", "args": "after-used" }], "no-console": ["off", { "allow": ["warn", "error"] } ], + "no-empty": ["error", { "allowEmptyCatch": true }], "indent": [ "warn", 2 ], "linebreak-style": [ "error", "unix" ], "quotes": [ "warn", "single" ], diff --git a/src/components/d-abstract.js b/src/components/d-abstract.js index ceebeef..96f8f66 100644 --- a/src/components/d-abstract.js +++ b/src/components/d-abstract.js @@ -1,7 +1,7 @@ -import { Template } from "../mixins/template"; -import { body } from "../helpers/layout"; +import { Template } from '../mixins/template'; +import { body } from '../helpers/layout'; -const T = Template("d-abstract", ` +const T = Template('d-abstract', ` `, false); diff --git a/src/components/d-acknowledgements.js b/src/components/d-acknowledgements.js index 4ef2d4b..842e652 100644 --- a/src/components/d-acknowledgements.js +++ b/src/components/d-acknowledgements.js @@ -1,4 +1,4 @@ -import { Template } from "../mixins/template"; +import { Template } from '../mixins/template'; const T = Template('d-acknowledgements', ` diff --git a/src/components/d-article.js b/src/components/d-article.js index ba33623..6a76da3 100644 --- a/src/components/d-article.js +++ b/src/components/d-article.js @@ -18,7 +18,7 @@ export class Article extends T(HTMLElement) { if (typeof callback === 'function') { document.addEventListener(functionName, callback); } else { - console.error('Controller listeners need to be functions!') + console.error('Controller listeners need to be functions!'); } } } diff --git a/src/components/d-bibliography.js b/src/components/d-bibliography.js index f7b5611..5fa7e35 100644 --- a/src/components/d-bibliography.js +++ b/src/components/d-bibliography.js @@ -1,8 +1,6 @@ -import { Template } from "../mixins/template"; -import { Mutating } from "../mixins/mutating"; -import { collectCitations } from './d-cite' -import bibtexParse from "bibtex-parse-js"; -import { bibliography_cite } from "../helpers/citation"; +import { Template } from '../mixins/template'; +import bibtexParse from 'bibtex-parse-js'; +import { bibliography_cite } from '../helpers/citation'; const T = Template('d-bibliography', ` diff --git a/src/components/d-toc.js b/src/components/d-toc.js index 513edc3..e3327d5 100644 --- a/src/components/d-toc.js +++ b/src/components/d-toc.js @@ -1,6 +1,6 @@ -import {Template} from "../mixins/template"; +import {Template} from '../mixins/template'; -const T = Template("d-toc", ` +const T = Template('d-toc', ` -` +`; export function appendixTemplate(frontMatter) { return ` @@ -57,7 +57,7 @@ export function appendixTemplate(frontMatter) { export class DistillAppendix extends HTMLElement { - static get is() { return "distill-appendix"; } + static get is() { return 'distill-appendix'; } set frontMatter(frontMatter) { this.innerHTML = appendixTemplate(frontMatter); diff --git a/src/distill-components/distill-header.js b/src/distill-components/distill-header.js index f7d3578..e82ad12 100644 --- a/src/distill-components/distill-header.js +++ b/src/distill-components/distill-header.js @@ -1,9 +1,9 @@ -import {Template} from "../mixins/template"; +import {Template} from '../mixins/template'; // import logo from "./distill-logo.svg"; -var logo = ""; +var logo = ''; -const T = Template("distill-header", ` +const T = Template('distill-header', `