Skip to content

Commit 25f6c15

Browse files
authored
Merge pull request #34 from hudovisk/greenkeeper/prettier-2.0.0
Update prettier to the latest version πŸš€
2 parents 06989d8 + d1c3fc7 commit 25f6c15

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"karma-sourcemap-loader": "^0.3.7",
5353
"karma-webpack": "^4.0.2",
5454
"mocha": "^7.0.1",
55-
"prettier": "^1.19.1",
55+
"prettier": "^2.0.0",
5656
"react": "^16.8.6",
5757
"react-dom": "^16.8.6",
5858
"semantic-release": "^17.0.0",

β€Žsrc/Experiment.jsβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@ import OptimizeContext from "./OptimizeContext";
55
class Experiment extends React.Component {
66
static defaultProps = {
77
loader: null,
8-
timeout: 3000
8+
timeout: 3000,
99
};
1010

1111
static propTypes = {
1212
id: PropTypes.string.isRequired,
1313
loader: PropTypes.node,
1414
timeout: PropTypes.number,
15-
children: PropTypes.node
15+
children: PropTypes.node,
1616
};
1717

1818
state = {
19-
variant: null
19+
variant: null,
2020
};
2121

2222
updateVariantTimeout = null;
2323

24-
updateVariant = value => {
24+
updateVariant = (value) => {
2525
clearTimeout(this.updateVariantTimeout);
2626
// if experiment not active, render original
2727
const newVariant = value === undefined || value === null ? "0" : value;
2828
if (newVariant !== this.state.variant) {
2929
this.setState({
30-
variant: newVariant
30+
variant: newVariant,
3131
});
3232
}
3333
};
@@ -54,7 +54,7 @@ class Experiment extends React.Component {
5454
window.gtag &&
5555
window.gtag("event", "optimize.callback", {
5656
name: this.props.id,
57-
callback: this.updateVariant
57+
callback: this.updateVariant,
5858
});
5959
};
6060

@@ -85,7 +85,7 @@ class Experiment extends React.Component {
8585
window.gtag("event", "optimize.callback", {
8686
name: this.props.id,
8787
callback: this.updateVariant,
88-
remove: true
88+
remove: true,
8989
});
9090
}
9191

β€Žsrc/Variant.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import OptimizeContext from "./OptimizeContext";
55
class Variant extends React.Component {
66
static propTypes = {
77
id: PropTypes.string.isRequired,
8-
children: PropTypes.node
8+
children: PropTypes.node,
99
};
1010

1111
render() {
1212
return (
1313
<OptimizeContext.Consumer>
14-
{value => (value === this.props.id ? this.props.children : null)}
14+
{(value) => (value === this.props.id ? this.props.children : null)}
1515
</OptimizeContext.Consumer>
1616
);
1717
}

β€Žtest/specs/variant.spec.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("variant", () => {
1919
</>,
2020
{
2121
wrappingComponent: OptimizeContext.Provider,
22-
wrappingComponentProps: { value: "1" }
22+
wrappingComponentProps: { value: "1" },
2323
}
2424
);
2525

β€Žtest/tests.bundle.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const testsContext = require.context("./specs/", true, /\.spec\.js$/);
99
const __karmaWebpackManifest__ = [];
1010
let runnable = testsContext
1111
.keys()
12-
.filter(path => __karmaWebpackManifest__.indexOf(path) >= 0);
12+
.filter((path) => __karmaWebpackManifest__.indexOf(path) >= 0);
1313

1414
if (!runnable.length) runnable = testsContext.keys();
1515

β€Žyarn.lockβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7574,10 +7574,10 @@ prettier-linter-helpers@^1.0.0:
75747574
dependencies:
75757575
fast-diff "^1.1.2"
75767576

7577-
prettier@^1.19.1:
7578-
version "1.19.1"
7579-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
7580-
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
7577+
prettier@^2.0.0:
7578+
version "2.0.0"
7579+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.0.tgz#9c8fdba0aeae3faf0d9d9391623ac4f9321a4455"
7580+
integrity sha512-vI55PC+GFLOVtpwr2di1mYhJF36v+kztJov8sx3AmqbfdA+2Dhozxb+3e1hTgoV9lyhnVJFF3Z8GCVeMBOS1bA==
75817581

75827582
private@^0.1.6:
75837583
version "0.1.8"

0 commit comments

Comments
Β (0)