mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
[eslint] updated eslintrc and improved the code (#4702)
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
"no-irregular-whitespace": "warn",
|
||||
"no-console": "warn",
|
||||
"no-useless-escape": "warn",
|
||||
"no-trailing-spaces": "warn",
|
||||
|
||||
"react/jsx-indent": ["warn", 2],
|
||||
"react/prop-types": "warn",
|
||||
|
@@ -25,7 +25,7 @@ class AddMemberDialog extends React.Component {
|
||||
handleSubmit = () => {
|
||||
if (!this.state.selectedOption) return;
|
||||
const emails = this.state.selectedOption.map(item => item.email);
|
||||
this.props.addUser(emails)
|
||||
this.props.addUser(emails);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@@ -44,7 +44,7 @@ class UploadProgressDialog extends React.Component {
|
||||
|
||||
render() {
|
||||
|
||||
let uploadBitrate = Utils.formatBitRate(this.props.uploadBitrate)
|
||||
let uploadBitrate = Utils.formatBitRate(this.props.uploadBitrate);
|
||||
let uploadedMessage = gettext('File Upload');
|
||||
let uploadingMessage = gettext('File Uploading...') + ' ' + this.props.totalProgress + '%' + ' (' + uploadBitrate + ')';
|
||||
|
||||
|
@@ -4,7 +4,7 @@ import { gettext, loginUrl } from '../utils/constants';
|
||||
function PermissionDeniedTip() {
|
||||
let reloginUrl = `${loginUrl}?next=${encodeURIComponent(location.href)}`;
|
||||
let errorTip = gettext('Permission denied. Please try {placeholder-left}login again.{placeholder-right}');
|
||||
errorTip = errorTip.replace('{placeholder-left}', '<a class="action-link p-0" href='+ reloginUrl + '>')
|
||||
errorTip = errorTip.replace('{placeholder-left}', '<a class="action-link p-0" href='+ reloginUrl + '>');
|
||||
errorTip = errorTip.replace('{placeholder-right}', '</a>');
|
||||
return(
|
||||
<span className="error" dangerouslySetInnerHTML={{__html: errorTip}}></span>
|
||||
|
@@ -15,7 +15,7 @@ class TermsPreviewWidget extends React.Component {
|
||||
this.state = {
|
||||
innerHtml: null,
|
||||
isFormatValue: true,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
@@ -313,7 +313,7 @@ class Draft extends React.Component {
|
||||
const nodes = this.refs.diffViewer.value;
|
||||
let commentNode = nodes.find((node) => {
|
||||
if (node.data['old_index'] == oldIndex && node.data['new_index'] == newIndex) {
|
||||
return node
|
||||
return node;
|
||||
}
|
||||
});
|
||||
if (commentNode) {
|
||||
|
@@ -56,7 +56,7 @@ class LibContentToolbar extends React.Component {
|
||||
render() {
|
||||
|
||||
if (!this.props.userPerm) {
|
||||
return <div className="cur-view-toolbar"></div>
|
||||
return <div className="cur-view-toolbar"></div>;
|
||||
}
|
||||
|
||||
if (this.props.isViewFile) {
|
||||
|
@@ -653,7 +653,7 @@ class LibContentView extends React.Component {
|
||||
this.setState({
|
||||
asyncOperationProgress: 0,
|
||||
isCopyMoveProgressDialogShow: false,
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// toolbar operations
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user