From 8f936229ce1c9961031d009307b10ba508c784b7 Mon Sep 17 00:00:00 2001 From: seotts Date: Thu, 2 Apr 2020 10:43:45 -0400 Subject: [PATCH] Fix linting --- src/components/modal/report/modal.jsx | 21 +++++++++------------ src/l10n.json | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/components/modal/report/modal.jsx b/src/components/modal/report/modal.jsx index 047170900..ae1e3e67d 100644 --- a/src/components/modal/report/modal.jsx +++ b/src/components/modal/report/modal.jsx @@ -2,7 +2,6 @@ const bindAll = require('lodash.bindall'); const PropTypes = require('prop-types'); const React = require('react'); const connect = require('react-redux').connect; -const FormattedHTMLMessage = require('react-intl').FormattedHTMLMessage; const FormattedMessage = require('react-intl').FormattedMessage; const injectIntl = require('react-intl').injectIntl; const intlShape = require('react-intl').intlShape; @@ -45,7 +44,8 @@ class ReportModal extends React.Component { }; } handleSetCategory (formData) { - const category = this.props.reportOptions.find(o => o.value === formData.category) || this.props.reportOptions[0]; + const category = this.props.reportOptions.find(o => o.value === formData.category) || + this.props.reportOptions[0]; return this.setState({ categoryValue: formData.category, @@ -53,9 +53,11 @@ class ReportModal extends React.Component { }); } handleSetSubcategory (formData) { - const category = this.props.reportOptions.find(o => o.value === this.state.categoryValue) || this.props.reportOptions[0]; + const category = this.props.reportOptions.find(o => o.value === this.state.categoryValue) || + this.props.reportOptions[0]; - const subcategory = category.subcategories.find(o => o.value === formData.subcategory) || category.subcategories[0]; + const subcategory = category.subcategories.find(o => o.value === formData.subcategory) || + category.subcategories[0]; return this.setState({ subcategoryValue: subcategory.value, @@ -87,15 +89,10 @@ class ReportModal extends React.Component { if (category.subcategories) { - finalCategory = category.subcategories.find(o => o.value === this.state.subcategoryValue) || category.subcategories[0]; + finalCategory = category.subcategories.find(o => o.value === this.state.subcategoryValue) || + category.subcategories[0]; } - const promptList = finalCategory.list && finalCategory.list.map((listItem, index) => -
  • - -
  • - ); - // Confirmation step is shown if a report has been submitted, even if state is reset by closing the modal. // This prevents multiple report submission within the same session because submission is stored in redux. const step = isConfirmed ? STEPS.confirmation : this.state.step; @@ -231,7 +228,7 @@ class ReportModal extends React.Component { submitEnabled nextLabel={{id: 'general.close'}} onNext={onRequestClose} - > + >
    diff --git a/src/l10n.json b/src/l10n.json index ea676d1bd..bbb547516 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -291,7 +291,7 @@ "report.promptFaceReveal": "Scratch allows people to use pictures of their face in creative projects like games, stories, or animations. However, projects that are just a picture of their face, or which focus entirely on their physical appearance, aren't allowed on Scratch. If this is a 'face reveal', or the project focuses on the person's appearance, please click report.", "report.promptNoRemixingAllowed": "Please let us know where the project says it is not okay to remix — such as in the Notes & Credits, project title, etc. ", "report.promptCreatorsSafety": "It's important that everyone on Scratch remains safe online and in real life. Please let us know why you are worried about the safety of this user.", - "report.promptSomethingElse": "We encourage you to double check if your report fits any of the other available categories. If you strongly feel it does not, please explain why this project breaks the {communityGuidelinesLink}.", + "report.promptSomethingElse": "We encourage you to double check if your report fits any of the other available categories. If you strongly feel it does not, please explain why this project breaks the {CommunityGuidelinesLink}.", "report.tooLongError": "That's too long! Please find a way to shorten your text.", "report.tooShortError": "That's too short. Please describe in detail what's inappropriate or disrespectful about the project.", "report.send": "Send",