ESLintify Part 3 (#846)

* ESLintify Part 3

* ESLintify Part 3

* ESLintify Part 3
This commit is contained in:
Yangshun Tay 2018-07-11 03:21:31 -07:00 committed by Endilie Yacop Sucipto
parent 5ac2cee658
commit a7a214fb3a
54 changed files with 435 additions and 497 deletions

View file

@ -11,7 +11,7 @@ const fs = require('fs');
const HeaderNav = require('./nav/HeaderNav.js');
const Head = require('./Head.js');
const Footer = require(process.cwd() + '/core/Footer.js');
const Footer = require(`${process.cwd()}/core/Footer.js`);
const translation = require('../server/translation.js');
const constants = require('./constants');
@ -24,9 +24,9 @@ class Site extends React.Component {
? translation[this.props.language]['localized-strings'].tagline
: this.props.config.tagline;
const title = this.props.title
? this.props.title + ' · ' + this.props.config.title
? `${this.props.title} · ${this.props.config.title}`
: (!this.props.config.disableTitleTagline &&
this.props.config.title + ' · ' + tagline) ||
`${this.props.config.title} · ${tagline}`) ||
this.props.config.title;
const description = this.props.description || tagline;
const url =
@ -35,8 +35,8 @@ class Site extends React.Component {
(this.props.url || 'index.html');
let docsVersion = this.props.version;
if (!docsVersion && fs.existsSync(CWD + '/versions.json')) {
const latestVersion = require(CWD + '/versions.json')[0];
if (!docsVersion && fs.existsSync(`${CWD}/versions.json`)) {
const latestVersion = require(`${CWD}/versions.json`)[0];
docsVersion = latestVersion;
}