Skip to content

Commit

Permalink
chore: use prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Jun 24, 2018
1 parent b904dc1 commit 1f22344
Show file tree
Hide file tree
Showing 15 changed files with 263 additions and 259 deletions.
Empty file added .prettierrc.yml
Empty file.
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"babel-preset-stage-1": "^6.3.13",
"eslint": "^3.17.1",
"eslint-config-littlebits": "^0.6.2",
"prettier": "^1.7.3",
"husky": "^0.14.3",
"prettier": "^1.13.5",
"pretty-quick": "^1.6.0",
"ramda": "^0.18.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
Expand All @@ -64,5 +66,14 @@
"react",
"stage-1"
]
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"prettier": {
"semi": false,
"trailingComma": "all"
}
}
37 changes: 19 additions & 18 deletions source/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from "react"
import T from "prop-types"
import ReactDOM from "react-dom"
import * as cssVendor from "css-vendor"
import Debug from "debug"
import throttle from "lodash.throttle"
import * as cssVendor from "css-vendor"
import resizeEvent from "./on-resize"
import T from "prop-types"
import React from "react"
import ReactDOM from "react-dom"
import Layout from "./layout"
import resizeEvent from "./on-resize"
import Platform from "./platform"
import Utils from "./utils"
import Tip from "./tip"
import Utils from "./utils"

const log = Debug("react-popover")

Expand Down Expand Up @@ -112,7 +112,7 @@ class Popover extends React.Component {
if (didOpen) this.enter()
else if (didClose) this.exit()
}
componentWillUnmount () {
componentWillUnmount() {
/* If the Popover is unmounted while animating,
clear the animation so no setState occured */
this.animateExitStop()
Expand Down Expand Up @@ -274,9 +274,9 @@ class Popover extends React.Component {
pos.crossLength - dockingEdgeBufferLength - this.props.tipSize * 2
}

this.tipEl.style.transform = `${flowToTipTranslations[
zone.flow
]}(${tipCrossPos}px)`
this.tipEl.style.transform = `${
flowToTipTranslations[zone.flow]
}(${tipCrossPos}px)`
this.tipEl.style[jsprefix("Transform")] = this.tipEl.style.transform
}
checkTargetReposition = () => {
Expand Down Expand Up @@ -326,9 +326,9 @@ class Popover extends React.Component {
this.exitingAnimationTimer2 = setTimeout(() => {
setTimeout(() => {
if (this.containerEl) {
this.containerEl.style.transform = `${flowToPopoverTranslations[
this.zone.flow
]}(${this.zone.order * 50}px)`
this.containerEl.style.transform = `${
flowToPopoverTranslations[this.zone.flow]
}(${this.zone.order * 50}px)`
this.containerEl.style.opacity = "0"
}
}, 0)
Expand All @@ -341,9 +341,9 @@ class Popover extends React.Component {
animateEnter() {
/* Prepare `entering` style so that we can then animate it toward `entered`. */

this.containerEl.style.transform = `${flowToPopoverTranslations[
this.zone.flow
]}(${this.zone.order * 50}px)`
this.containerEl.style.transform = `${
flowToPopoverTranslations[this.zone.flow]
}(${this.zone.order * 50}px)`
this.containerEl.style[
jsprefix("Transform")
] = this.containerEl.style.transform
Expand All @@ -361,8 +361,9 @@ class Popover extends React.Component {
)} 150ms ease-in`
}
this.containerEl.style.transitionProperty = "top, left, opacity, transform"
this.containerEl.style.transitionDuration = `${this.props
.enterExitTransitionDurationMs}ms`
this.containerEl.style.transitionDuration = `${
this.props.enterExitTransitionDurationMs
}ms`
this.containerEl.style.transitionTimingFunction =
"cubic-bezier(0.230, 1.000, 0.320, 1.000)"
this.containerEl.style.opacity = "1"
Expand Down
Loading

0 comments on commit 1f22344

Please sign in to comment.