linting stuff

This commit is contained in:
ntr 2018-09-23 12:52:54 +10:00
parent ac614030aa
commit 80ad711cde
4 changed files with 21 additions and 10 deletions

View File

@ -1,9 +1,15 @@
module.exports = {
extends: 'airbnb',
extends: [
'eslint:recommended',
'plugin:react/recommended',
],
env: {
"browser": true,
"node": true
},
parserOptions: {
"ecmaVersion": 6
},
rules: {
// prevents stupid complaints a la
// (req) {
@ -15,6 +21,7 @@ module.exports = {
'import/no-extraneous-dependencies': [0],
'prefer-arrow-callback': [0],
'arrow-body-style': [0],
'no-return-assign': [2, 'except-parens'],
'no-console': [0],
// i like loops
'no-plusplus': [0],
@ -25,6 +32,8 @@ module.exports = {
"react/react-in-jsx-scope": [0],
"react/jsx-indent": [2, 4],
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1
"react/jsx-uses-vars": 1,
"react/prefer-stateless-function": 1,
"react/prop-types": 0
},
};

View File

@ -21,11 +21,8 @@
"devDependencies": {
"parcel": "^1.9.7",
"jest": "^18.0.0",
"babel-preset-react": "^6.24.1",
"eslint": "^5.6.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"babel-preset-react": "^6.24.1",
"eslint-plugin-react": "^7.11.1"
}
}

View File

@ -12,7 +12,7 @@ function renderLogin({ account, submitLogin }) {
<div>
<div className="field">
<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">
<i className="fas fa-user" />
</span>
@ -23,7 +23,12 @@ function renderLogin({ account, submitLogin }) {
</div>
<div className="field">
<p className="control has-icons-left">
<input className="input" type="password" placeholder="Password" onChange={e => details.password = e.target.value} />
<input
className="input"
type="password"
placeholder="Password"
onChange={e => (details.password = e.target.value)}
/>
<span className="icon is-small is-left">
<i className="fas fa-lock" />
</span>

View File

@ -37,8 +37,8 @@ jdenticon.config = {
const Cryps = () => (
<section>
<Navbar />
<div id="fizzytext" />
<LoginContainer />
<div id="fizzytext" />
<CrypContainer />
</section>
);
@ -51,4 +51,4 @@ const Main = () => (
preact.render(<Main />, document.body);
fizzyText('cryps.gg');
// fizzyText('cryps.gg');