chore(lint): cleanup unused variables in code (#1563)
This commit is contained in:
@ -30,7 +30,7 @@ AssetProxy.prototype.toString = function () {
|
||||
};
|
||||
|
||||
AssetProxy.prototype.toBase64 = function () {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise(resolve => {
|
||||
const fr = new FileReader();
|
||||
fr.onload = (readerEvt) => {
|
||||
const binaryString = readerEvt.target.result;
|
||||
@ -50,7 +50,7 @@ export function createAssetProxy(value, fileObj, uploaded = false, privateUpload
|
||||
response => (
|
||||
new AssetProxy(response.asset.url.replace(/^(https?):/, ''), null, true, response.asset)
|
||||
),
|
||||
error => new AssetProxy(value, fileObj, false)
|
||||
() => new AssetProxy(value, fileObj, false)
|
||||
);
|
||||
} else if (privateUpload) {
|
||||
throw new Error('The Private Upload option is only avaible for Asset Store Integration');
|
||||
|
@ -1,40 +1,19 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import { Component, Children } from 'react';
|
||||
import { List, Record, fromJS } from 'immutable';
|
||||
import { Record, fromJS } from 'immutable';
|
||||
import { isFunction } from 'lodash';
|
||||
|
||||
const plugins = { editor: List() };
|
||||
|
||||
const catchesNothing = /.^/;
|
||||
/* eslint-disable no-unused-vars */
|
||||
const EditorComponent = Record({
|
||||
id: null,
|
||||
label: 'unnamed component',
|
||||
icon: 'exclamation-triangle',
|
||||
fields: [],
|
||||
pattern: catchesNothing,
|
||||
fromBlock(match) { return {}; },
|
||||
fromBlock(match) { return {}; },
|
||||
toBlock(attributes) { return 'Plugin'; },
|
||||
toPreview(attributes) { return 'Plugin'; },
|
||||
});
|
||||
|
||||
|
||||
class Plugin extends Component {
|
||||
static propTypes = {
|
||||
children: PropTypes.element.isRequired,
|
||||
};
|
||||
|
||||
static childContextTypes = {
|
||||
plugins: PropTypes.object,
|
||||
};
|
||||
|
||||
getChildContext() {
|
||||
return { plugins };
|
||||
}
|
||||
|
||||
render() {
|
||||
return Children.only(this.props.children);
|
||||
}
|
||||
}
|
||||
/* eslint-enable */
|
||||
|
||||
export default function createEditorComponent(config) {
|
||||
const configObj = new EditorComponent({
|
||||
|
Reference in New Issue
Block a user