lint and prettier

main
Mike Fix 6 years ago
parent 81aa1de6fd
commit b12c3f802c

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

@ -350,8 +350,7 @@ class Editor extends React.Component {
getCarbonImage={this.getCarbonImage} getCarbonImage={this.getCarbonImage}
/> />
<div className="buttons"> <div className="buttons">
{this.props.api.tweet && {this.props.api.tweet && online && (
online && (
<Button <Button
className="tweetButton" className="tweetButton"
onClick={this.upload} onClick={this.upload}

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

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

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

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

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

Loading…
Cancel
Save