lint and prettier

main
Mike Fix 6 years ago
parent 81aa1de6fd
commit b12c3f802c

@ -23,7 +23,7 @@ module.exports = {
},
settings: {
react: {
version: '16.5'
version: '16.7'
}
}
}

@ -350,16 +350,15 @@ class Editor extends React.Component {
getCarbonImage={this.getCarbonImage}
/>
<div className="buttons">
{this.props.api.tweet &&
online && (
<Button
className="tweetButton"
onClick={this.upload}
title={uploading ? 'Loading...' : 'Tweet'}
color="#57b5f9"
style={tweetButtonStyle}
/>
)}
{this.props.api.tweet && online && (
<Button
className="tweetButton"
onClick={this.upload}
title={uploading ? 'Loading...' : 'Tweet'}
color="#57b5f9"
style={tweetButtonStyle}
/>
)}
<ExportMenu
onChange={this.updateSetting}
export={this.export}

@ -296,19 +296,23 @@ const Presets = React.memo(
</div>
{show ? (
<div className="settings-presets-content" ref={contentRef}>
{presets.filter(p => p.custom).map(preset => (
<Preset
key={preset.id}
remove={remove}
apply={apply}
preset={preset}
selected={selected}
/>
))}
{presets
.filter(p => p.custom)
.map(preset => (
<Preset
key={preset.id}
remove={remove}
apply={apply}
preset={preset}
selected={selected}
/>
))}
{customPresetsLength > 0 ? <div className="settings-presets-divider" /> : null}
{presets.filter(p => !p.custom).map(preset => (
<Preset key={preset.id} apply={apply} preset={preset} selected={selected} />
))}
{presets
.filter(p => !p.custom)
.map(preset => (
<Preset key={preset.id} apply={apply} preset={preset} selected={selected} />
))}
</div>
) : null}
{show && applied ? (

@ -3,6 +3,8 @@
* https://css-tricks.com/font-display-masses/#article-header-id-2
* for `font-display` information
*/
import React from 'react'
export default () => (
<style jsx global>
{`

@ -1,3 +1,4 @@
import React from 'react'
import { COLORS } from '../../lib/constants'
export default () => (

@ -1,3 +1,5 @@
import React from 'react'
export default () => (
<style jsx global>
{`

@ -11,7 +11,7 @@
"test": "npm run cy:run --",
"deploy": "now",
"prettier": "prettier --config .prettierrc --write {.,components,lib,pages}/*.js {components,lib,pages,packages}/**/*.js",
"lint": "eslint components/*.js lib/*.js pages/*.js",
"lint": "eslint .",
"contrib:add": "all-contributors add",
"contrib:build": "all-contributors generate",
"cy:run": "cypress run",
@ -67,7 +67,7 @@
"lint-staged": {
"*.js": [
"npm run lint",
"prettier --write",
"prettier --config .prettierrc --write",
"git add"
]
},

Loading…
Cancel
Save