Skip to content

Fix conflicts in eslint package versions (#2219) #2220

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
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
30 changes: 29 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@
"import/namespace": 0,
"import/no-unresolved": 0,
"import/no-named-as-default": 2,
"import/no-cycle": 1,
"import/no-import-module-exports": 1,
"import/no-useless-path-segments": 1,
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
"default-param-last": 0,
"no-else-return": 0,
"indent": 0,
"no-console": 0,
"no-alert": 0,
"no-import-assign": 2,
"no-promise-executor-return": 1,
"no-restricted-exports": 1,
"no-underscore-dangle": 0,
"no-useless-catch": 1,
"prefer-object-spread": 0,
"max-len": [1, 120, 2, {"ignoreComments": true, "ignoreTemplateLiterals": true}],
"max-classes-per-file": 0,
"quote-props": [1, "as-needed"],
"no-unused-vars": [1, {"vars": "local", "args": "none"}],
"consistent-return": ["error", { "treatUndefinedAsUnspecified": true }],
Expand All @@ -30,11 +41,26 @@
"html": false
}],
"newline-per-chained-call": 0,
"lines-between-class-members": 0,
"react/prefer-stateless-function": [2,
{ "ignorePureComponents": true
}],
"class-methods-use-this": 0,
"react/jsx-no-bind": [2, {"allowBind": true, "allowArrowFunctions": true}],
"react/button-has-type": 0,
"react/destructuring-assignment": 0,
"react/function-component-definition": 0,
"react/jsx-curly-newline": 0,
"react/jsx-fragments": 0,
"react/jsx-no-bind": 0,
"react/jsx-no-useless-fragment": 1,
"react/jsx-one-expression-per-line": 0,
"react/jsx-props-no-spreading": 0,
"react/jsx-wrap-multilines": 0,
"react/no-access-state-in-setstate": 1,
"react/no-deprecated": 1,
"react/no-unused-class-component-methods": 1,
"react/sort-comp": 0,
"react/static-property-placement": 1,
"no-return-assign": [2, "except-parens"],
"jsx-a11y/anchor-is-valid": [
"error",
Expand All @@ -61,6 +87,8 @@
"allowChildren": false
}
],
"jsx-a11y/control-has-associated-label": 1,
"jsx-a11y/label-has-associated-control": 1,
"prettier/prettier": [
"error"
]
Expand Down
10 changes: 10 additions & 0 deletions client/components/createRedirectWithUsername.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
Expand All @@ -14,6 +15,15 @@ const RedirectToUser = ({ username, url = '/:username/sketches' }) => {
return null;
};

RedirectToUser.propTypes = {
url: PropTypes.string.isRequired,
username: PropTypes.string
};

RedirectToUser.defaultProps = {
username: null
};

function mapStateToProps(state) {
return {
username: state.user ? state.user.username : null
Expand Down
7 changes: 3 additions & 4 deletions client/modules/IDE/components/FileNode.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,7 @@ function mapStateToProps(state, ownProps) {
});
}

function mapDispatchToProps(dispatch) {
return bindActionCreators(Object.assign(FileActions, IDEActions), dispatch);
}
const mapDispatchToProps = { ...FileActions, ...IDEActions };

const TranslatedFileNode = withTranslation()(FileNode);

Expand All @@ -456,4 +454,5 @@ const ConnectedFileNode = connect(
mapDispatchToProps
)(TranslatedFileNode);

export { TranslatedFileNode as FileNode, ConnectedFileNode as default };
export { TranslatedFileNode as FileNode };
export default ConnectedFileNode;
4 changes: 0 additions & 4 deletions client/modules/IDE/pages/MobileIDEView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@ const handleGlobalKeydown = (props, cmController) => (e) => {
e.preventDefault();
e.stopPropagation();
stopSketch();
} else if (e.keyCode === 13) {
e.preventDefault();
e.stopPropagation();
startSketch();
// 50 === 2
} else if (e.keyCode === 50) {
e.preventDefault();
Expand Down
14 changes: 7 additions & 7 deletions client/modules/User/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export function initiateResetPassword(formValues) {
dispatch({
type: ActionTypes.RESET_PASSWORD_INITIATE
});
return apiClient
apiClient
.post('/reset-password', formValues)
.then(() => resolve())
.catch((error) => {
Expand Down Expand Up @@ -245,7 +245,7 @@ export function validateResetPasswordToken(token) {

export function updatePassword(formValues, token) {
return (dispatch) =>
new Promise((resolve) =>
new Promise((resolve) => {
apiClient
.post(`/reset-password/${token}`, formValues)
.then((response) => {
Expand All @@ -258,8 +258,8 @@ export function updatePassword(formValues, token) {
type: ActionTypes.INVALID_RESET_PASSWORD_TOKEN
});
resolve({ error });
})
);
});
});
}

export function updateSettingsSuccess(user) {
Expand All @@ -275,16 +275,16 @@ export function submitSettings(formValues) {

export function updateSettings(formValues) {
return (dispatch) =>
new Promise((resolve) =>
new Promise((resolve) => {
submitSettings(formValues)
.then((response) => {
dispatch(updateSettingsSuccess(response.data));
dispatch(showToast(5500));
dispatch(setToastText('Toast.SettingsSaved'));
resolve();
})
.catch((error) => resolve({ error }))
);
.catch((error) => resolve({ error }));
});
}

export function createApiKeySuccess(user) {
Expand Down
1 change: 1 addition & 0 deletions client/store.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable import/no-import-module-exports */
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import DevTools from './modules/App/components/DevTools';
Expand Down
Loading