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 = { module.exports = {
extends: 'airbnb', extends: [
'eslint:recommended',
'plugin:react/recommended',
],
env: { env: {
"browser": true, "browser": true,
"node": true "node": true
}, },
parserOptions: {
"ecmaVersion": 6
},
rules: { rules: {
// prevents stupid complaints a la // prevents stupid complaints a la
// (req) { // (req) {
@ -15,6 +21,7 @@ module.exports = {
'import/no-extraneous-dependencies': [0], 'import/no-extraneous-dependencies': [0],
'prefer-arrow-callback': [0], 'prefer-arrow-callback': [0],
'arrow-body-style': [0], 'arrow-body-style': [0],
'no-return-assign': [2, 'except-parens'],
'no-console': [0], 'no-console': [0],
// i like loops // i like loops
'no-plusplus': [0], 'no-plusplus': [0],
@ -25,6 +32,8 @@ module.exports = {
"react/react-in-jsx-scope": [0], "react/react-in-jsx-scope": [0],
"react/jsx-indent": [2, 4], "react/jsx-indent": [2, 4],
"react/jsx-uses-react": 1, "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": { "devDependencies": {
"parcel": "^1.9.7", "parcel": "^1.9.7",
"jest": "^18.0.0", "jest": "^18.0.0",
"babel-preset-react": "^6.24.1",
"eslint": "^5.6.0", "eslint": "^5.6.0",
"eslint-config-airbnb": "^17.1.0", "babel-preset-react": "^6.24.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "^7.11.1" "eslint-plugin-react": "^7.11.1"
} }
} }

View File

@ -12,7 +12,7 @@ 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>
@ -23,7 +23,12 @@ function renderLogin({ account, submitLogin }) {
</div> </div>
<div className="field"> <div className="field">
<p className="control has-icons-left"> <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"> <span className="icon is-small is-left">
<i className="fas fa-lock" /> <i className="fas fa-lock" />
</span> </span>

View File

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