Fix linting

This commit is contained in:
Jonathan Cremin 2018-06-02 18:07:00 +00:00
parent 553ba9db9a
commit bb5189c9ed
35 changed files with 157 additions and 866 deletions

View file

@ -4,7 +4,7 @@ const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
function randomID() {
let rand = '';
for (let i = 0; i < 12; i++) {
for (let i = 0; i < 12; i += 1) {
rand += chars.charAt(Math.floor((Math.random() * chars.length)));
}
return rand;
@ -18,7 +18,7 @@ async function checkId(Files, fileId, attempts) {
if (file === null) {
return fileId;
}
return checkId(randomID(), ++attempts); // eslint-disable-line no-param-reassign
return checkId(Files, randomID(), attempts + 1);
}
export default function (Files) {