Fix prettier related ESLint issues (#1493)

* add quotes

* add prettier dev-dep

* run prettier on src

* add eslint-prettier-plugin to install
This commit is contained in:
Severiano Badajoz
2020-05-26 09:33:59 -07:00
committed by GitHub
parent 4d100d4507
commit 271e7a1e76
16 changed files with 115 additions and 109 deletions
@@ -105,10 +105,12 @@ const continuous = (selectorId, colorscale, colorAccessor) => {
colorScale: state.colors.scale,
}))
class ContinuousLegend extends React.Component {
componentDidUpdate(prevProps) {
const { colorAccessor, colorScale } = this.props;
if (prevProps.colorAccessor !== colorAccessor || prevProps.colorScale !== colorScale) {
if (
prevProps.colorAccessor !== colorAccessor ||
prevProps.colorScale !== colorScale
) {
/* always remove it, if it's not continuous we don't put it back. */
d3.select("#continuous_legend").selectAll("*").remove();
}
@@ -130,7 +132,9 @@ class ContinuousLegend extends React.Component {
return (
<div
id="continuous_legend"
ref={ref => {this.ref = ref}}
ref={(ref) => {
this.ref = ref;
}}
style={{
display: colorAccessor ? "inherit" : "none",
position: "absolute",