upgrade dep:

css-loader 0.28->3.5
del 4.1->5.1
eslint 5.18->6.8
eslint-config-airbnb 17.1->18.1
eslint-loader 2.1->4.0
file-loader 2.0->6.0
fs.extra 8.0->9.0
gulp 2.0->3.0
gulp-nunjucks 4.0->5.0
json-loader 0.5->Removed
style-loader 0.23->1.1
uglifyjs-webpack-plugin 1.3->2.2
yargs 13.2->15.3
katex 0.10->0.11
react-monaco-editor 0.35->0.36
timeage-react 1.2->3.0
timeago.js 3.0->4.0
uuid 3.3->7.0
This commit is contained in:
masnn committed 2020-04-15 12:47:55 +08:00
1 parent 9cb68397b9
commit f9468536de
55 files changed
+776 -1032

No files matched your search

@@ -1,3 +1,4 @@
/* eslint-disable react/static-property-placement */
import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
@@ -13,14 +14,14 @@ import Toolbar, {
ToolbarSplitComponent as ToolbarSplit,
} from './ToolbarComponent';
const mapStateToProps = state => ({
const mapStateToProps = (state) => ({
pretestVisible: state.ui.pretest.visible,
recordsVisible: state.ui.records.visible,
isPosting: state.ui.isPosting,
editorLang: state.editor.lang,
});
const mapDispatchToProps = dispatch => ({
const mapDispatchToProps = (dispatch) => ({
togglePanel(uiElement) {
dispatch({
type: 'SCRATCHPAD_UI_TOGGLE_VISIBILITY',
@@ -37,8 +38,8 @@ const mapDispatchToProps = dispatch => ({
const state = context.store.getState();
const { pretest } = state;
const testCases = pretest.tabs;
const inputs = testCases.map(tabId => pretest.data[tabId].input);
const outputs = testCases.map(tabId => pretest.data[tabId].output);
const inputs = testCases.map((tabId) => pretest.data[tabId].input);
const outputs = testCases.map((tabId) => pretest.data[tabId].output);
const req = request.post(Context.postPretestUrl, {
lang: state.editor.lang,
code: state.editor.code,
@@ -103,7 +104,7 @@ export default class ScratchpadToolbarContainer extends React.PureComponent {
className="select"
disabled={this.props.isPosting}
value={this.props.editorLang}
onChange={ev => this.props.setEditorLanguage(ev.target.value)}
onChange={(ev) => this.props.setEditorLanguage(ev.target.value)}
>
{_.map(languageEnum.LANG_TEXTS, (val, key) => (
<option value={key} key={key}>{val}</option>