Update tsconfig
This commit is contained in:
parent
5d2fd66ab4
commit
38f57175e7
3 changed files with 14 additions and 10 deletions
|
@ -221,18 +221,18 @@ app.use('/', downloadRouter)
|
||||||
app.use('/', lazyStaticRouter)
|
app.use('/', lazyStaticRouter)
|
||||||
|
|
||||||
// Client files, last valid routes!
|
// Client files, last valid routes!
|
||||||
const cliOptions = cli.opts()
|
const cliOptions = cli.opts<{ client: boolean, plugins: boolean }>()
|
||||||
if (cliOptions.client) app.use('/', clientsRouter)
|
if (cliOptions.client) app.use('/', clientsRouter)
|
||||||
|
|
||||||
// ----------- Errors -----------
|
// ----------- Errors -----------
|
||||||
|
|
||||||
// Catch unmatched routes
|
// Catch unmatched routes
|
||||||
app.use((req, res: express.Response) => {
|
app.use((_req, res: express.Response) => {
|
||||||
res.status(HttpStatusCode.NOT_FOUND_404).end()
|
res.status(HttpStatusCode.NOT_FOUND_404).end()
|
||||||
})
|
})
|
||||||
|
|
||||||
// Catch thrown errors
|
// Catch thrown errors
|
||||||
app.use((err, req, res: express.Response, next) => {
|
app.use((err, _req, res: express.Response, _next) => {
|
||||||
// Format error to be logged
|
// Format error to be logged
|
||||||
let error = 'Unknown error.'
|
let error = 'Unknown error.'
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
|
@ -120,7 +120,7 @@ const videoKeysToKeep = [
|
||||||
'downloadEnabled'
|
'downloadEnabled'
|
||||||
]
|
]
|
||||||
class VideoAuditView extends EntityAuditView {
|
class VideoAuditView extends EntityAuditView {
|
||||||
constructor (private readonly video: VideoDetails) {
|
constructor (video: VideoDetails) {
|
||||||
super(videoKeysToKeep, 'video', video)
|
super(videoKeysToKeep, 'video', video)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ const videoImportKeysToKeep = [
|
||||||
'video-name'
|
'video-name'
|
||||||
]
|
]
|
||||||
class VideoImportAuditView extends EntityAuditView {
|
class VideoImportAuditView extends EntityAuditView {
|
||||||
constructor (private readonly videoImport: VideoImport) {
|
constructor (videoImport: VideoImport) {
|
||||||
super(videoImportKeysToKeep, 'video-import', videoImport)
|
super(videoImportKeysToKeep, 'video-import', videoImport)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ const commentKeysToKeep = [
|
||||||
'account-name'
|
'account-name'
|
||||||
]
|
]
|
||||||
class CommentAuditView extends EntityAuditView {
|
class CommentAuditView extends EntityAuditView {
|
||||||
constructor (private readonly comment: VideoComment) {
|
constructor (comment: VideoComment) {
|
||||||
super(commentKeysToKeep, 'comment', comment)
|
super(commentKeysToKeep, 'comment', comment)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ const userKeysToKeep = [
|
||||||
'videoChannels'
|
'videoChannels'
|
||||||
]
|
]
|
||||||
class UserAuditView extends EntityAuditView {
|
class UserAuditView extends EntityAuditView {
|
||||||
constructor (private readonly user: User) {
|
constructor (user: User) {
|
||||||
super(userKeysToKeep, 'user', user)
|
super(userKeysToKeep, 'user', user)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ const channelKeysToKeep = [
|
||||||
'ownerAccount-displayedName'
|
'ownerAccount-displayedName'
|
||||||
]
|
]
|
||||||
class VideoChannelAuditView extends EntityAuditView {
|
class VideoChannelAuditView extends EntityAuditView {
|
||||||
constructor (private readonly channel: VideoChannel) {
|
constructor (channel: VideoChannel) {
|
||||||
super(channelKeysToKeep, 'channel', channel)
|
super(channelKeysToKeep, 'channel', channel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ const abuseKeysToKeep = [
|
||||||
'createdAt'
|
'createdAt'
|
||||||
]
|
]
|
||||||
class AbuseAuditView extends EntityAuditView {
|
class AbuseAuditView extends EntityAuditView {
|
||||||
constructor (private readonly abuse: AdminAbuse) {
|
constructor (abuse: AdminAbuse) {
|
||||||
super(abuseKeysToKeep, 'abuse', abuse)
|
super(abuseKeysToKeep, 'abuse', abuse)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"strictBindCallApply": true,
|
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"lib": [
|
"lib": [
|
||||||
|
@ -27,6 +26,11 @@
|
||||||
},
|
},
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
|
"strictBindCallApply": true,
|
||||||
|
"allowUnreachableCode": false,
|
||||||
|
"allowUnusedLabels": false,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"declarationMap": true
|
"declarationMap": true
|
||||||
|
|
Loading…
Reference in a new issue