ESLintify Part 2 (#841)

* ESLintify Part 2

* Fix

* Fix tests

* Fix tests

* Fix tests
This commit is contained in:
Yangshun Tay 2018-07-10 21:53:08 -07:00 committed by GitHub
parent 4267337fb0
commit 5ac2cee658
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 188 additions and 190 deletions

View file

@ -13,14 +13,14 @@ class Head extends React.Component {
const links = this.props.config.headerLinks;
const hasBlog = links.some(link => link.blog);
let highlight = {
const highlight = {
version: '9.12.0',
theme: 'default',
...this.props.config.highlight,
};
// Use user-provided themeUrl if it exists, else construct one from version and theme.
let highlightThemeURL = highlight.themeUrl
const highlightThemeURL = highlight.themeUrl
? highlight.themeUrl
: `//cdnjs.cloudflare.com/ajax/libs/highlight.js/${
highlight.version
@ -143,17 +143,13 @@ class Head extends React.Component {
))}
{this.props.config.scrollToTop && (
<script
src={
'https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js'
}
/>
<script src="https://unpkg.com/vanilla-back-to-top@7.1.14/dist/vanilla-back-to-top.min.js" />
)}
{this.props.config.scrollToTop && (
<script
dangerouslySetInnerHTML={{
__html: `
document.addEventListener("DOMContentLoaded", function(){
document.addEventListener('DOMContentLoaded', function() {
addBackToTop(
${JSON.stringify(
Object.assign(