Lint 4-space indent

This commit is contained in:
Tom Russell 2019-05-27 16:39:16 +01:00
parent 907afa29f0
commit af9c23d883
25 changed files with 622 additions and 603 deletions

View File

@ -21,7 +21,8 @@
"no-console": "off",
"strict": ["error", "global"],
"curly": "warn",
"quotes": ["warn", "single"]
"quotes": ["warn", "single"],
"indent": ["warn", 4]
},
"plugins": [
"react"

View File

@ -34,25 +34,39 @@ class Header extends React.Component {
<div className={this.state.collapseMenu ? 'collapse navbar-collapse' : 'navbar-collapse'}>
<ul className="navbar-nav ml-auto">
<li className="nav-item">
<a className="nav-link" href="https://pages.colouring.london">Hello</a>
<a className="nav-link" href="https://pages.colouring.london">
Hello
</a>
</li>
<li className="nav-item">
<a className="nav-link" href="https://pages.colouring.london/buildingcategories">Data Categories</a>
<a className="nav-link" href="https://pages.colouring.london/buildingcategories">
Data Categories
</a>
</li>
<li className="nav-item">
<NavLink to="/view/age.html" className="nav-link">View Maps</NavLink>
<NavLink to="/view/age.html" className="nav-link">
View Maps
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/edit/age.html" className="nav-link">Add/Edit Data</NavLink>
<NavLink to="/edit/age.html" className="nav-link">
Add/Edit Data
</NavLink>
</li>
<li className="nav-item">
<a className="nav-link" href="https://pages.colouring.london/about">More about</a>
<a className="nav-link" href="https://pages.colouring.london/about">
More about
</a>
</li>
<li className="nav-item">
<a className="nav-link" href="https://pages.colouring.london/whoisinvolved">Who&rsquo;s Involved?</a>
<a className="nav-link" href="https://pages.colouring.london/whoisinvolved">
Who&rsquo;s Involved?
</a>
</li>
<li className="nav-item">
<a className="nav-link" href="https://discuss.colouring.london">Discuss</a>
<a className="nav-link" href="https://discuss.colouring.london">
Discuss
</a>
</li>
{
this.props.user?
@ -66,10 +80,14 @@ class Header extends React.Component {
(
<Fragment>
<li className="nav-item">
<NavLink to="/login.html" className="nav-link">Log in</NavLink>
<NavLink to="/login.html" className="nav-link">
Log in
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/sign-up.html" className="nav-link">Sign up</NavLink>
<NavLink to="/sign-up.html" className="nav-link">
Sign up
</NavLink>
</li>
</Fragment>
)

View File

@ -144,12 +144,12 @@ function renderHTML(context, data, req, res) {
assets.client.css
? `<link rel="stylesheet" href="${assets.client.css}">`
: ''
}
}
${
process.env.NODE_ENV === 'production'
? `<script src="${assets.client.js}" defer></script>`
: `<script src="${assets.client.js}" defer crossorigin></script>`
}
}
</head>
<body>
<div id="root">${markup}</div>