mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix lint
This commit is contained in:
@@ -196,7 +196,7 @@ async function updateMe (req: express.Request, res: express.Response, next: expr
|
||||
|
||||
await user.save()
|
||||
|
||||
return await res.sendStatus(204)
|
||||
return res.sendStatus(204)
|
||||
}
|
||||
|
||||
async function updateUser (req: express.Request, res: express.Response, next: express.NextFunction) {
|
||||
|
||||
@@ -41,7 +41,7 @@ import {
|
||||
getVideoFileHeight,
|
||||
resetSequelizeInstance
|
||||
} from '../../../helpers'
|
||||
import { TagInstance, VideoInstance } from '../../../models'
|
||||
import { VideoInstance } from '../../../models'
|
||||
import { VideoCreate, VideoUpdate } from '../../../../shared'
|
||||
|
||||
import { abuseVideoRouter } from './abuse'
|
||||
|
||||
@@ -58,7 +58,7 @@ async function sign (data: string|Object) {
|
||||
sign.update(dataString, 'utf8')
|
||||
|
||||
const myKey = await getMyPrivateCert()
|
||||
return await sign.sign(myKey, SIGNATURE_ENCODING)
|
||||
return sign.sign(myKey, SIGNATURE_ENCODING)
|
||||
}
|
||||
|
||||
function comparePassword (plainPassword: string, hashPassword: string) {
|
||||
@@ -68,7 +68,7 @@ function comparePassword (plainPassword: string, hashPassword: string) {
|
||||
async function createCertsIfNotExist () {
|
||||
const exist = await certsExist()
|
||||
if (exist === true) {
|
||||
return undefined
|
||||
return
|
||||
}
|
||||
|
||||
return await createCerts()
|
||||
|
||||
@@ -96,7 +96,7 @@ database.init = async (silent: boolean) => {
|
||||
|
||||
if (!silent) logger.info('Database %s is ready.', dbname)
|
||||
|
||||
return undefined
|
||||
return
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -146,7 +146,7 @@ abstract class AbstractRequestScheduler <T> {
|
||||
this.afterRequestsHook()
|
||||
|
||||
// All the requests were made, we update the pods score
|
||||
await db.Pod.updatePodsScore(goodPods, badPods)
|
||||
db.Pod.updatePodsScore(goodPods, badPods)
|
||||
}
|
||||
|
||||
protected afterRequestHook () {
|
||||
|
||||
@@ -95,7 +95,7 @@ class RequestVideoQaduScheduler extends AbstractRequestScheduler<RequestsVideoQa
|
||||
|
||||
default:
|
||||
logger.error('Unknown request video QADU type %s.', request.type)
|
||||
return
|
||||
return undefined
|
||||
}
|
||||
|
||||
// Do not forget the uuid so the remote pod can identify the video
|
||||
|
||||
@@ -79,7 +79,7 @@ const videosAddValidator = [
|
||||
})
|
||||
.then(duration => {
|
||||
// Previous test failed, abort
|
||||
if (duration === undefined) return
|
||||
if (duration === undefined) return undefined
|
||||
|
||||
if (!isVideoDurationValid('' + duration)) {
|
||||
return res.status(400)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import * as Sequelize from 'sequelize'
|
||||
import * as Promise from 'bluebird'
|
||||
|
||||
import { AuthorInstance } from './author-interface'
|
||||
import { TagAttributes, TagInstance } from './tag-interface'
|
||||
import { VideoFileAttributes, VideoFileInstance } from './video-file-interface'
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* tslint:disable:no-unused-expression */
|
||||
|
||||
import * as request from 'supertest'
|
||||
import { join } from 'path'
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
const expect = chai.expect
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/* tslint:disable:no-unused-expression */
|
||||
|
||||
import { keyBy } from 'lodash'
|
||||
import { join } from 'path'
|
||||
import 'mocha'
|
||||
import * as chai from 'chai'
|
||||
const expect = chai.expect
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "tslint-config-standard",
|
||||
"rules": {
|
||||
"await-promise": [true, "Bluebird"],
|
||||
"no-inferrable-types": true,
|
||||
"eofline": true,
|
||||
"indent": ["spaces"],
|
||||
|
||||
Reference in New Issue
Block a user