fix lingering linting errors
This commit is contained in:
parent
2e62c6b288
commit
1ae37ebaaa
6 changed files with 11 additions and 10 deletions
|
@ -28,7 +28,7 @@ export function getObjectKey(url) {
|
|||
if (urlArray.length === 6) {
|
||||
const key = urlArray.pop();
|
||||
const userId = urlArray.pop();
|
||||
objectKey = `${userId}/${key}`
|
||||
objectKey = `${userId}/${key}`;
|
||||
} else {
|
||||
const key = urlArray.pop();
|
||||
objectKey = key;
|
||||
|
|
|
@ -48,7 +48,8 @@ function deleteMany(files, ids) {
|
|||
|
||||
each(ids, (id, cb) => {
|
||||
if (files.id(id).url) {
|
||||
if (!process.env.S3_DATE || (process.env.S3_DATE && moment(process.env.S3_DATE) < moment(files.id(id).createdAt))) {
|
||||
if (!process.env.S3_DATE
|
||||
|| (process.env.S3_DATE && moment(process.env.S3_DATE) < moment(files.id(id).createdAt))) {
|
||||
const objectKey = getObjectKey(files.id(id).url);
|
||||
objectKeys.push(objectKey);
|
||||
}
|
||||
|
|
|
@ -100,9 +100,7 @@ function deleteFilesFromS3(files) {
|
|||
}
|
||||
return false;
|
||||
})
|
||||
.map((file) => {
|
||||
return getObjectKey(file.url);
|
||||
})
|
||||
.map(file => getObjectKey(file.url))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,8 @@ function getSketchContent(projectsInAllCategories) {
|
|||
if (noNumberprojectName === 'Instance Mode : Instance Container ') {
|
||||
for (let i = 0; i < 4; i += 1) {
|
||||
const splitedRes = `${res.split('*/')[1].split('</html>')[i]}</html>\n`;
|
||||
project.sketchContent = splitedRes.replace('p5.js', 'https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.4/p5.min.js');
|
||||
project.sketchContent = splitedRes.replace('p5.js',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.4/p5.min.js');
|
||||
}
|
||||
} else {
|
||||
project.sketchContent = res;
|
||||
|
@ -228,7 +229,8 @@ function createProjectsInP5user(projectsInAllCategories) {
|
|||
});
|
||||
}
|
||||
|
||||
const assetsInProject = project.sketchContent.match(/assets\/[\w-]+\.[\w]*/g) || project.sketchContent.match(/assets\/[\w-]*/g) || [];
|
||||
const assetsInProject = project.sketchContent.match(/assets\/[\w-]+\.[\w]*/g)
|
||||
|| project.sketchContent.match(/assets\/[\w-]*/g) || [];
|
||||
|
||||
assetsInProject.forEach((assetNamePath, i) => {
|
||||
let assetName = assetNamePath.split('assets/')[1];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { resolvePathToFile } from '../utils/filePath';
|
||||
|
||||
// eslint-disable-next-line max-len
|
||||
const MEDIA_FILE_REGEX_NO_QUOTES = /^(?!(http:\/\/|https:\/\/)).*\.(png|jpg|jpeg|gif|bmp|mp3|wav|aiff|ogg|json|txt|csv|svg|obj|mp4|ogg|webm|mov|otf|ttf|m4a)$/i;
|
||||
const STRING_REGEX = /(['"])((\\\1|.)*?)\1/gm;
|
||||
const EXTERNAL_LINK_REGEX = /^(http:\/\/|https:\/\/)/;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 5b924f3460886b82d72d0ab0d709f323f8b9a588
|
||||
Subproject commit 0958be54482722821159cd3e07777988ee349f37
|
Loading…
Reference in a new issue