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

Plugin settings manager dev #227

Merged
merged 157 commits into from Aug 23, 2017

Conversation

lauriejim
Copy link
Contributor

No description provided.

pierreburgy and others added 30 commits July 31, 2017 17:45
Merge branch 'plugin/settings-manager-dev' of https://github.com/strapi/strapi into plugin/settings-manager-dev
Merge branch 'plugin/settings-manager-dev' of https://github.com/strapi/strapi into plugin/settings-manager-dev
* @param messages
*/
const formatMessages = messages => reduce(messages, (result, value, key) => {
const obj = result;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to declare the obj variable here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint requirement.

* Dynamically generate `translationsMessages object`.
*/
const translationMessages = reduce(window.Strapi.languages, (result, language) => {
const obj = result;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint requirement.

@@ -66,12 +66,12 @@ class InputNumber extends React.Component { // eslint-disable-line react/prefer-
validate = (value) => {
let errors = [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The let is needed.

};
}

componentWillReceiveProps(nextProps) {
if (nextProps.error !== this.props.error) {
if (isEmpty(nextProps.formErrors)) this.setState({ modal: false, loader: false });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this line with only one if statement would be better

@pierreburgy
Copy link
Member

LGTM.

@Aurelsicoko
Copy link
Member

LGTM except that we need to remove the rule of ESLint that doesn't allow to update a function parameter... It makes no sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants