fix even more linting errors
This commit is contained in:
parent
5057a901fe
commit
bd303b7710
6 changed files with 7 additions and 10 deletions
|
@ -22,9 +22,6 @@ class EmailVerificationView extends React.Component {
|
|||
this.closeLoginPage = this.closeLoginPage.bind(this);
|
||||
this.gotoHomePage = this.gotoHomePage.bind(this);
|
||||
|
||||
this.state = {
|
||||
error: null,
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
|
|
@ -88,7 +88,7 @@ export function signS3(req, res) {
|
|||
}
|
||||
|
||||
export function copyObjectInS3(req, res) {
|
||||
const url = req.body.url;
|
||||
const { url } = req.body;
|
||||
const objectKey = getObjectKey(url);
|
||||
const fileExtension = getExtension(objectKey);
|
||||
const newFilename = uuid.v4() + fileExtension;
|
||||
|
@ -109,7 +109,7 @@ export function copyObjectInS3(req, res) {
|
|||
}
|
||||
|
||||
export function listObjectsInS3ForUser(req, res) {
|
||||
const username = req.params.username;
|
||||
const { username } = req.params;
|
||||
findUserByUsername(username, (user) => {
|
||||
const userId = user.id;
|
||||
const params = {
|
||||
|
|
|
@ -15,7 +15,7 @@ export function serveProject(req, res) {
|
|||
return;
|
||||
}
|
||||
// TODO this does not parse html
|
||||
const files = project.files;
|
||||
const { files } = project;
|
||||
const htmlFile = files.find(file => file.name.match(/\.html$/i)).content;
|
||||
const filesToInject = files.filter(file => file.name.match(/\.(js|css)$/i));
|
||||
injectMediaUrls(filesToInject, files, req.params.project_id);
|
||||
|
|
|
@ -249,7 +249,7 @@ function bundleExternalLibs(project, zip, callback) {
|
|||
function resolveScriptTagSrc(scriptTag, document) {
|
||||
const path = scriptTag.src.split('/');
|
||||
const filename = path[path.length - 1];
|
||||
const src = scriptTag.src;
|
||||
const { src } = scriptTag;
|
||||
|
||||
if (!isUrl(src)) {
|
||||
numScriptsResolved += 1;
|
||||
|
@ -286,7 +286,7 @@ function buildZip(project, req, res) {
|
|||
const zip = archiver('zip');
|
||||
const rootFile = project.files.find(file => file.name === 'root');
|
||||
const numFiles = project.files.filter(file => file.fileType !== 'folder').length;
|
||||
const files = project.files;
|
||||
const { files } = project;
|
||||
let numCompletedFiles = 0;
|
||||
|
||||
zip.on('error', (err) => {
|
||||
|
|
|
@ -2,7 +2,7 @@ import mongoose from 'mongoose';
|
|||
import shortid from 'shortid';
|
||||
import slugify from 'slugify';
|
||||
|
||||
const Schema = mongoose.Schema;
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const fileSchema = new Schema({
|
||||
name: { type: String, default: 'sketch.js' },
|
||||
|
|
|
@ -8,7 +8,7 @@ const EmailConfirmationStates = {
|
|||
Resent: 'resent',
|
||||
};
|
||||
|
||||
const Schema = mongoose.Schema;
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const userSchema = new Schema({
|
||||
name: { type: String, default: '' },
|
||||
|
|
Loading…
Reference in a new issue