linting stuff

This commit is contained in:
ntr 2018-09-23 12:57:24 +10:00
parent 80ad711cde
commit 3478d98c82
3 changed files with 14 additions and 4 deletions

View File

@ -5,6 +5,7 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"start": "parcel index.html --port 40080", "start": "parcel index.html --port 40080",
"lint": "eslint --fix src/",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": "", "author": "",

View File

@ -4,7 +4,7 @@ const InvStats = require('./invstats');
// Add the incident from state as a property // Add the incident from state as a property
const addState = connect( const addState = connect(
state => ({ cryp: state.cryp }), state => ({ cryp: state.cryp })
); );
module.exports = addState(InvStats); module.exports = addState(InvStats);

View File

@ -1,3 +1,4 @@
// eslint-disable-next-line
const preact = require('preact'); const preact = require('preact');
function renderLogin({ account, submitLogin }) { function renderLogin({ account, submitLogin }) {
@ -12,7 +13,12 @@ function renderLogin({ account, submitLogin }) {
<div> <div>
<div className="field"> <div className="field">
<p className="control has-icons-left has-icons-right"> <p className="control has-icons-left has-icons-right">
<input className="input" type="email" placeholder="Email" onChange={e => (details.name = e.target.value)} /> <input
className="input"
type="email"
placeholder="Email"
onChange={e => (details.name = e.target.value)}
/>
<span className="icon is-small is-left"> <span className="icon is-small is-left">
<i className="fas fa-user" /> <i className="fas fa-user" />
</span> </span>
@ -36,7 +42,10 @@ function renderLogin({ account, submitLogin }) {
</div> </div>
<div className="field"> <div className="field">
<p className="control"> <p className="control">
<button className="button is-success" type="submit" onClick={() => submitLogin(details.name, details.password)}> <button
className="button is-success"
type="submit"
onClick={() => submitLogin(details.name, details.password)}>
Login Login
</button> </button>
</p> </p>