Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump prettier from 1.19.1 to 2.0.2 in /app #2458

Merged
merged 2 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/experimenter/static/js/components/AddonForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class AddonForm extends React.PureComponent {
label="Signed Add-On URL"
name="addon_release_url"
dataTestId="addonUrl"
onChange={value => {
onChange={(value) => {
this.props.handleDataChange("addon_release_url", value);
}}
value={this.props.data.get("addon_release_url")}
Expand All @@ -51,7 +51,7 @@ export default class AddonForm extends React.PureComponent {
radioLabel2="Multiple add-ons"
radioValue1={false}
radioValue2={true}
onChange={event =>
onChange={(event) =>
this.props.handleDataChange(
"is_branched_addon",
event.target.value === "true",
Expand Down
2 changes: 1 addition & 1 deletion app/experimenter/static/js/components/Branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Branch extends React.PureComponent {
name={`variants[${this.props.index}][${name}]`}
id={`variants-${this.props.index}-${name}`}
value={value}
onChange={value => {
onChange={(value) => {
this.handleBranchFieldChange(name, value);
}}
error={error}
Expand Down
6 changes: 3 additions & 3 deletions app/experimenter/static/js/components/BranchManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ class BranchManager extends React.PureComponent {
index={index}
branch={branch}
branchFieldsComponent={branchFieldsComponent}
remove={index => {
remove={(index) => {
this.removeBranch(index);
}}
errors={errors.get(index, new Map())}
onChange={value => {
onChange={(value) => {
this.handleBranchChange(index, value);
}}
onErrorChange={errors => {
onErrorChange={(errors) => {
this.handleBranchErrorChange(index, errors);
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion app/experimenter/static/js/components/DesignForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class DesignForm extends React.PureComponent {
.then(() => {
location.replace(redirectUrl);
})
.catch(err => {
.catch((err) => {
this.setState({
errors: fromJS(err.data),
});
Expand Down
2 changes: 1 addition & 1 deletion app/experimenter/static/js/components/DesignInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class DesignInput extends React.PureComponent {
data-testid={this.props.dataTestId}
type={this.props.type ? this.props.type : "text"}
name={this.props.name}
onChange={event => {
onChange={(event) => {
this.props.onChange(event.target.value);
}}
value={this.props.value}
Expand Down
2 changes: 1 addition & 1 deletion app/experimenter/static/js/components/GenericForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class GenericForm extends React.PureComponent {
label="Design"
name="design"
dataTestId="design"
onChange={value => {
onChange={(value) => {
this.props.handleDataChange("design", value);
}}
value={this.props.data.get("design")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class LabeledMultiSelect extends React.PureComponent {
name={this.props.name}
value={this.props.value}
className={this.props.error ? "is-invalid" : ""}
onChange={selection => {
onChange={(selection) => {
this.props.onChange(selection, this.props.name);
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ class MultiPrefBranchFields extends React.PureComponent {
<PrefManager
preferences={this.props.branch.get("preferences", new List())}
errors={this.props.errors.get("preferences", new List())}
onDataChange={value => {
onDataChange={(value) => {
this.props.onChange("preferences", value);
}}
onErrorChange={errors => {
onErrorChange={(errors) => {
this.props.onErrorChange("preferences", errors);
}}
variantIndex={this.props.index}
Expand Down
8 changes: 4 additions & 4 deletions app/experimenter/static/js/components/Pref.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Pref extends React.PureComponent {
label="Pref Branch"
name="pref_branch"
id={`pref-branch-${this.props.variantIndex}-${this.props.index}`}
onChange={value => {
onChange={(value) => {
this.handlePrefValueChange("pref_branch", value);
}}
value={
Expand Down Expand Up @@ -103,7 +103,7 @@ class Pref extends React.PureComponent {
label="Pref Type"
name="pref_type"
id={`pref-type-${this.props.variantIndex}-${this.props.index}`}
onChange={value => {
onChange={(value) => {
this.handlePrefValueChange("pref_type", value);
}}
value={
Expand All @@ -130,7 +130,7 @@ class Pref extends React.PureComponent {
label="Pref Name"
name="pref_name"
id={`pref-key-${this.props.variantIndex}-${this.props.index}`}
onChange={value => {
onChange={(value) => {
this.handlePrefValueChange("pref_name", value);
}}
value={
Expand All @@ -149,7 +149,7 @@ class Pref extends React.PureComponent {
label="Pref Value"
name="pref_value"
id={`pref-value-${this.props.variantIndex}-${this.props.index}`}
onChange={value => {
onChange={(value) => {
this.handlePrefValueChange("pref_value", value);
}}
value={
Expand Down
8 changes: 4 additions & 4 deletions app/experimenter/static/js/components/PrefForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class PrefForm extends React.PureComponent {
label="Pref Name"
name="pref_name"
id="id_pref_name"
onChange={value => {
onChange={(value) => {
this.props.handleDataChange("pref_name", value);
}}
value={this.props.data.get("pref_name")}
Expand All @@ -45,7 +45,7 @@ export default class PrefForm extends React.PureComponent {
label="Pref Type"
name="pref_type"
id="id_pref_type"
onChange={value => {
onChange={(value) => {
this.props.handleDataChange("pref_type", value);
}}
value={this.props.data.get("pref_type")}
Expand All @@ -65,7 +65,7 @@ export default class PrefForm extends React.PureComponent {
label="Pref Branch"
name="pref_branch"
id="id_pref_branch"
onChange={value => {
onChange={(value) => {
this.props.handleDataChange("pref_branch", value);
}}
value={this.props.data.get("pref_branch")}
Expand Down Expand Up @@ -97,7 +97,7 @@ export default class PrefForm extends React.PureComponent {
radioLabel2="Different Prefs per branch"
radioValue1={false}
radioValue2={true}
onChange={event => {
onChange={(event) => {
this.props.handleReloadAPIState(
"is_multi_pref",
event.target.value === "true",
Expand Down
2 changes: 1 addition & 1 deletion app/experimenter/static/js/components/PrefManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class PrefManager extends React.PureComponent {
preference={preference}
errors={errors.get(index, new Map())}
remove={this.removePref}
onChange={value => this.handlePrefChange(index, value)}
onChange={(value) => this.handlePrefChange(index, value)}
variantIndex={this.props.variantIndex}
rolloutType={this.props.rolloutType}
/>
Expand Down
10 changes: 5 additions & 5 deletions app/experimenter/static/js/components/RolloutForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class RolloutForm extends React.PureComponent {
id="id_addon_release_url"
label="Signed Add-On URL"
name="addon_release_url"
onChange={value => {
onChange={(value) => {
this.props.handleDataChange("addon_release_url", value);
}}
value={this.props.data.get("addon_release_url")}
Expand All @@ -50,10 +50,10 @@ export default class RolloutForm extends React.PureComponent {
<PrefManager
preferences={this.props.data.get("preferences", blankPreference)}
errors={this.props.errors.get("preferences", new List())}
onDataChange={value => {
onDataChange={(value) => {
this.props.handleDataChange("preferences", value);
}}
onErrorChange={errors => {
onErrorChange={(errors) => {
this.props.handleErrorsChange("preferences", errors);
}}
rolloutType={this.props.data.get("rollout_type")}
Expand All @@ -75,7 +75,7 @@ export default class RolloutForm extends React.PureComponent {
radioLabel2="Add-On Rollout"
radioValue1={TYPE_PREF}
radioValue2={TYPE_ADDON}
onChange={event =>
onChange={(event) =>
this.props.handleReloadAPIState(
"rollout_type",
event.target.value,
Expand All @@ -90,7 +90,7 @@ export default class RolloutForm extends React.PureComponent {
id="id_design"
label="Description"
name="design"
onChange={value => {
onChange={(value) => {
this.props.handleDataChange("design", value);
}}
value={this.props.data.get("design")}
Expand Down
22 changes: 11 additions & 11 deletions app/experimenter/static/js/components/TimelinePopForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class TimelinePopForm extends React.PureComponent {
label="Population Percentage"
name="population_percent"
id="id_population_percent"
onChange={value => {
onChange={(value) => {
this.handleDataChange("population_percent", value);
}}
value={this.state.data.get("population_percent")}
Expand All @@ -104,7 +104,7 @@ class TimelinePopForm extends React.PureComponent {
label="Proposed Enrollment Duration (days)"
name="proposed_enrollment"
id="id_proposed_enrollment"
onChange={value => {
onChange={(value) => {
this.handleDataChange("proposed_enrollment", value);
}}
value={this.state.data.get("proposed_enrollment")}
Expand All @@ -125,7 +125,7 @@ class TimelinePopForm extends React.PureComponent {
label="Rollout Playbook"
name="rollout_playbook"
id="id_rollout_playbook"
onChange={value => {
onChange={(value) => {
this.handleDataChange("rollout_playbook", value);
}}
value={this.state.data.get("rollout_playbook")}
Expand Down Expand Up @@ -163,7 +163,7 @@ class TimelinePopForm extends React.PureComponent {
.then(() => {
location.replace(redirectUrl);
})
.catch(err => {
.catch((err) => {
this.setState({
errors: fromJS(err.data),
});
Expand Down Expand Up @@ -212,7 +212,7 @@ class TimelinePopForm extends React.PureComponent {
label="Proposed Start Date"
name="proposed_start_date"
id="id_proposed_start_date"
onChange={value => {
onChange={(value) => {
this.handleDataChange("proposed_start_date", value);
}}
value={this.state.data.get("proposed_start_date")}
Expand All @@ -224,7 +224,7 @@ class TimelinePopForm extends React.PureComponent {
label="Proposed Total Duration (days)"
name="proposed_duration"
id="id_proposed_duration"
onChange={value => {
onChange={(value) => {
this.handleDataChange("proposed_duration", value);
}}
value={this.state.data.get("proposed_duration")}
Expand All @@ -244,7 +244,7 @@ class TimelinePopForm extends React.PureComponent {
label="Firefox Channel"
name="firefox_channel"
id="id_firefox_channel"
onChange={value => {
onChange={(value) => {
this.handleDataChange("firefox_channel", value);
}}
value={this.state.data.get("firefox_channel")}
Expand All @@ -265,7 +265,7 @@ class TimelinePopForm extends React.PureComponent {
label="Firefox Min Version"
name="firefox_min_version"
id="id_firefox_min_version"
onChange={value => {
onChange={(value) => {
this.handleDataChange("firefox_min_version", value);
}}
value={this.state.data.get("firefox_min_version")}
Expand All @@ -283,7 +283,7 @@ class TimelinePopForm extends React.PureComponent {
label="Firefox Max Version"
name="firefox_max_version"
id="id_firefox_max_version"
onChange={value => {
onChange={(value) => {
this.handleDataChange("firefox_max_version", value);
}}
value={this.state.data.get("firefox_max_version")}
Expand Down Expand Up @@ -335,7 +335,7 @@ class TimelinePopForm extends React.PureComponent {
label="Platform"
name="platform"
id="id_platform"
onChange={value => {
onChange={(value) => {
this.handleDataChange("platform", value);
}}
value={this.state.data.get("platform")}
Expand All @@ -353,7 +353,7 @@ class TimelinePopForm extends React.PureComponent {
label="Population filtering"
name="client_matching"
id="id_client_matching"
onChange={value => {
onChange={(value) => {
this.handleDataChange("client_matching", value);
}}
value={this.state.data.get("client_matching")}
Expand Down
2 changes: 1 addition & 1 deletion app/experimenter/static/js/tests/AddonForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe("The `DesignForm` component for Addon", () => {
for (let variant of successResponse.variants) {
expect(getByDisplayValue(variant.name)).toBeInTheDocument();
expect(getByDisplayValue(variant.description)).toBeInTheDocument();
getAllByDisplayValue(variant.ratio).map(e =>
getAllByDisplayValue(variant.ratio).map((e) =>
expect(e).toBeInTheDocument(),
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/experimenter/static/js/tests/GenericForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe("The `DesignForm` component for generic", () => {
for (let variant of successResponse.variants) {
expect(getByDisplayValue(variant.name)).toBeInTheDocument();
expect(getByDisplayValue(variant.description)).toBeInTheDocument();
getAllByDisplayValue(variant.ratio).map(e =>
getAllByDisplayValue(variant.ratio).map((e) =>
expect(e).toBeInTheDocument(),
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/experimenter/static/js/tests/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class Factory {

const fields = this.getFields();

Object.keys(fields).forEach(key => {
Object.keys(fields).forEach((key) => {
if (defaults[key]) {
this.data[key] = defaults[key];
} else if (fields[key] instanceof Field) {
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"immutable": "4.0.0-rc.12",
"jquery": "3.4.1",
"popper.js": "1.16.1",
"prettier": "1.19.1",
"prettier": "2.0.2",
"react": "16.13.1",
"react-bootstrap": "1.0.0",
"react-dom": "16.13.1",
Expand Down
8 changes: 4 additions & 4 deletions app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6402,10 +6402,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier@1.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
prettier@2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08"
integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==

pretty-format@^25.1.0:
version "25.1.0"
Expand Down