added eslint

This commit is contained in:
Arwed Mett 2018-02-08 21:50:08 +01:00
parent 8b389b41e6
commit 50e554f178
9 changed files with 173 additions and 26 deletions

View File

@ -8,7 +8,8 @@
}
},
"env": {
"node": true
"node": true,
"browser": true
},
"plugins": [
"react",

146
package-lock.json generated
View File

@ -4,6 +4,132 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.0.0-beta.36",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.36.tgz",
"integrity": "sha512-sW77BFwJ48YvQp3Gzz5xtAUiXuYOL2aMJKDwiaY3OcvdqBFurtYfOpSa4QrNyDxmOGRFSYzUpabU2m9QrlWE7w==",
"requires": {
"chalk": "2.3.0",
"esutils": "2.0.2",
"js-tokens": "3.0.2"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
"integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==",
"requires": {
"color-convert": "1.9.1"
}
},
"chalk": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz",
"integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==",
"requires": {
"ansi-styles": "3.2.0",
"escape-string-regexp": "1.0.5",
"supports-color": "4.5.0"
}
},
"supports-color": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
"integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
"requires": {
"has-flag": "2.0.0"
}
}
}
},
"@babel/helper-function-name": {
"version": "7.0.0-beta.36",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.36.tgz",
"integrity": "sha512-/SGPOyifPf20iTrMN+WdlY2MbKa7/o4j7B/4IAsdOusASp2icT+Wcdjf4tjJHaXNX8Pe9bpgVxLNxhRvcf8E5w==",
"requires": {
"@babel/helper-get-function-arity": "7.0.0-beta.36",
"@babel/template": "7.0.0-beta.36",
"@babel/types": "7.0.0-beta.36"
}
},
"@babel/helper-get-function-arity": {
"version": "7.0.0-beta.36",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.36.tgz",
"integrity": "sha512-vPPcx2vsSoDbcyWr9S3nd0FM3B4hEXnt0p1oKpwa08GwK0fSRxa98MyaRGf8suk8frdQlG1P3mDrz5p/Rr3pbA==",
"requires": {
"@babel/types": "7.0.0-beta.36"
}
},
"@babel/template": {
"version": "7.0.0-beta.36",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.36.tgz",
"integrity": "sha512-mUBi90WRyZ9iVvlWLEdeo8gn/tROyJdjKNC4W5xJTSZL+9MS89rTJSqiaJKXIkxk/YRDL/g/8snrG/O0xl33uA==",
"requires": {
"@babel/code-frame": "7.0.0-beta.36",
"@babel/types": "7.0.0-beta.36",
"babylon": "7.0.0-beta.36",
"lodash": "4.17.4"
},
"dependencies": {
"babylon": {
"version": "7.0.0-beta.36",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.36.tgz",
"integrity": "sha512-rw4YdadGwajAMMRl6a5swhQ0JCOOFyaYCfJ0AsmNBD8uBD/r4J8mux7wBaqavvFKqUKQYWOzA1Speams4YDzsQ=="
}
}
},
"@babel/traverse": {
"version": "7.0.0-beta.36",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.36.tgz",
"integrity": "sha512-OTUb6iSKVR/98dGThRJ1BiyfwbuX10BVnkz89IpaerjTPRhDfMBfLsqmzxz5MiywUOW4M0Clta0o7rSxkfcuzw==",
"requires": {
"@babel/code-frame": "7.0.0-beta.36",
"@babel/helper-function-name": "7.0.0-beta.36",
"@babel/types": "7.0.0-beta.36",
"babylon": "7.0.0-beta.36",
"debug": "3.1.0",
"globals": "11.3.0",
"invariant": "2.2.2",
"lodash": "4.17.4"
},
"dependencies": {
"babylon": {
"version": "7.0.0-beta.36",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.36.tgz",
"integrity": "sha512-rw4YdadGwajAMMRl6a5swhQ0JCOOFyaYCfJ0AsmNBD8uBD/r4J8mux7wBaqavvFKqUKQYWOzA1Speams4YDzsQ=="
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"globals": {
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz",
"integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw=="
}
}
},
"@babel/types": {
"version": "7.0.0-beta.36",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.36.tgz",
"integrity": "sha512-PyAORDO9um9tfnrddXgmWN9e6Sq9qxraQIt5ynqBOSXKA5qvK1kUr+Q3nSzKFdzorsiK+oqcUnAFvEoKxv9D+Q==",
"requires": {
"esutils": "2.0.2",
"lodash": "4.17.4",
"to-fast-properties": "2.0.0"
},
"dependencies": {
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
}
}
},
"@fortawesome/fontawesome": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome/-/fontawesome-1.1.2.tgz",
@ -312,6 +438,26 @@
"source-map": "0.5.7"
}
},
"babel-eslint": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.1.tgz",
"integrity": "sha512-RzdVOyWKQRUnLXhwLk+eKb4oyW+BykZSkpYwFhM4tnfzAG5OWfvG0w/uyzMp5XKEU0jN82+JefHr39bG2+KhRQ==",
"requires": {
"@babel/code-frame": "7.0.0-beta.36",
"@babel/traverse": "7.0.0-beta.36",
"@babel/types": "7.0.0-beta.36",
"babylon": "7.0.0-beta.36",
"eslint-scope": "3.7.1",
"eslint-visitor-keys": "1.0.0"
},
"dependencies": {
"babylon": {
"version": "7.0.0-beta.36",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.36.tgz",
"integrity": "sha512-rw4YdadGwajAMMRl6a5swhQ0JCOOFyaYCfJ0AsmNBD8uBD/r4J8mux7wBaqavvFKqUKQYWOzA1Speams4YDzsQ=="
}
}
},
"babel-generator": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz",

View File

@ -27,6 +27,7 @@
"@fortawesome/react-fontawesome": "0.0.17",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.1",
"babel-loader": "^7.1.2",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",

View File

@ -13,20 +13,20 @@ export default () => <Container>
icon={ <Icon icon={ faGithub } /> }
label="Github"
href="https://github.com/Pfeifenjoy"
/>
/>
<Link
icon={ <Icon icon={ faLinkedin } /> }
label="Linkedin"
href="https://www.linkedin.com/in/arwed-mett-4b5784123/"
/>
/>
<Link
icon={ <Icon icon={ faStackOverflow } /> }
label="Stack Overflow"
href="https://stackoverflow.com/users/4399651/arwed-mett?tab=profile"
/>
/>
<Link
icon={ <Icon icon={ faKey } /> }
label="GPG - Public Key"
href={ pubKey }
/>
/>
</Container>

View File

@ -9,21 +9,21 @@ export default () => <ProjectContainer>
href="https://github.com/Pfeifenjoy/Theseus"
description="Adventure game written in the context of my software engineering lecture."
img="https://github.com/Pfeifenjoy/Theseus/raw/master/theseus.gif"
/>
/>
<Project
title="Chat"
href="https://github.com/Pfeifenjoy/chat"
description="On premise chat application developed during the webengineering lecture."
/>
/>
<Project
title="EduHack"
href="https://github.com/Pfeifenjoy/EduHack"
description="Educational forum based on a real time chat component."
/>
/>
<Project
title="github-chrome-fullname"
href="https://github.com/Pfeifenjoy/github-chrome-fullname"
description="Chrome extension to display full-name(s) instead of SAP D- / I-User in GitHub Enterprise."
img="https://github.com/cgrail/github-chrome-fullname/raw/master/chrome-store-screenshot.png"
/>
/>
</ProjectContainer>

View File

@ -4,7 +4,6 @@ import React from "react"
import type { Node } from "react"
import styled from "styled-components"
import Label from "./label"
import Icon from "./icon"
const Wrapper = styled.a`
color: ${ props => props.theme.textColor };

View File

@ -138,12 +138,12 @@ export default class Project extends Component<ProjectProps, ProjectState> {
const { href, img, title, description } = this.props
const { hover } = this.state
return <Wrapper
title={ title }
href={ href }
target="_blank"
onMouseEnter={ () => this.setState({ hover: true }) }
onMouseLeave={ () => this.setState({ hover: false }) }
>
title={ title }
href={ href }
target="_blank"
onMouseEnter={ () => this.setState({ hover: true }) }
onMouseLeave={ () => this.setState({ hover: false }) }
>
<BackgroundImage src={ img } background={ !hover && !!img } />
<Content background={ hover && !!img }>
<Title>{ title }</Title>

View File

@ -18,7 +18,7 @@ const template = ejs.compile(indexFile)
const content = renderToString(sheet.collectStyles(<App />))
const title = "Arwed Mett"
const style = sheet.getStyleTags()
const fontawesomecss = fontawesome.dom.css();
const fontawesomecss = fontawesome.dom.css()
const indexPage = template({
content,

View File

@ -7,18 +7,18 @@ import ReactDOM from "react-dom"
import App from "./app"
import { ThemeProvider } from "styled-components"
import { Dark } from "./themes"
//import { BrowserRouter, Route } from "react-router-dom"
//
//
//const routes = <ThemeProvider theme={ Dark }>
// <BrowserRouter>
// <Route exact component={ App } />
// </BrowserRouter>
//</ThemeProvider>
import { BrowserRouter, Route } from "react-router-dom"
const routes = <ThemeProvider theme={ Dark }>
<BrowserRouter>
<Route exact component={ App } />
</BrowserRouter>
</ThemeProvider>
const target = document.getElementById("content")
if(target instanceof Element) {
ReactDOM.render(<App />, target)
ReactDOM.render(routes, target)
} else {
throw "Could not find content element to render content."
}