style: Some lint

This commit is contained in:
Tixie 2020-10-11 20:09:03 +02:00
parent 49148d4d10
commit 61d9e55568
5 changed files with 7 additions and 8 deletions

View file

@ -22,7 +22,7 @@ export default function register () {
} }
window.addEventListener('load', () => { window.addEventListener('load', () => {
const swUrl = `/service-worker.js` const swUrl = '/service-worker.js'
if (isLocalhost) { if (isLocalhost) {
// This is running on localhost. Lets check if a service worker still exists or not. // This is running on localhost. Lets check if a service worker still exists or not.

View file

@ -10,7 +10,7 @@ export async function getCamera (shouldFaceUser) {
preferredFacingMode preferredFacingMode
].map(facingModeConstraint => ({ video: { facingMode: facingModeConstraint } })) ].map(facingModeConstraint => ({ video: { facingMode: facingModeConstraint } }))
for (let constraints of constraintsList) { for (const constraints of constraintsList) {
try { try {
console.log(constraints) console.log(constraints)
return { return {

View file

@ -7,7 +7,7 @@ import {
GIF_FRAME_RATE GIF_FRAME_RATE
} from '/constants.js' } from '/constants.js'
export function capture({ mediaStream, facingMode }, duration, progressCallback) { export function capture ({ mediaStream, facingMode }, duration, progressCallback) {
const delayTime = 1000 / GIF_FRAME_RATE const delayTime = 1000 / GIF_FRAME_RATE
const totalFrames = duration / 1000 * GIF_FRAME_RATE const totalFrames = duration / 1000 * GIF_FRAME_RATE
@ -35,7 +35,7 @@ export function capture({ mediaStream, facingMode }, duration, progressCallback)
video.removeEventListener('canplaythrough', afterVideoAvailable) video.removeEventListener('canplaythrough', afterVideoAvailable)
}) })
function afterVideoAvailable() { function afterVideoAvailable () {
const canvas = document.createElement('canvas') const canvas = document.createElement('canvas')
canvas.width = GIF_WIDTH canvas.width = GIF_WIDTH
canvas.height = GIF_HEIGHT canvas.height = GIF_HEIGHT
@ -51,7 +51,6 @@ export function capture({ mediaStream, facingMode }, duration, progressCallback)
const destinationRectangle = makeRectangle(0, 0, canvas.width, canvas.height) const destinationRectangle = makeRectangle(0, 0, canvas.width, canvas.height)
const soureRectangle = crop(makeRectangle(0, 0, video.videoWidth, video.videoHeight)) const soureRectangle = crop(makeRectangle(0, 0, video.videoWidth, video.videoHeight))
captureFrame() captureFrame()
const intervalId = setInterval(captureFrame, delayTime) const intervalId = setInterval(captureFrame, delayTime)

View file

@ -4,7 +4,7 @@ export function countdown (n, delay, onStep) {
return task(resolver => { return task(resolver => {
let count = 0 let count = 0
let intervalId = setInterval(() => { const intervalId = setInterval(() => {
count++ count++
onStep(n - count) onStep(n - count)

View file

@ -26,7 +26,7 @@ export default {
computed: { computed: {
pathDashOffset () { pathDashOffset () {
if (this.percent) { if (this.percent) {
let to = this.progressPerimeter * ((100 - this.percent) / 100) const to = this.progressPerimeter * ((100 - this.percent) / 100)
return Math.max(0, to) // Prevent negative number return Math.max(0, to) // Prevent negative number
} }
return this.progressPerimeter return this.progressPerimeter