app.use('/', lazyStaticRouter)
// Client files, last valid routes!
-const cliOptions = cli.opts()
+const cliOptions = cli.opts<{ client: boolean, plugins: boolean }>()
if (cliOptions.client) app.use('/', clientsRouter)
// ----------- Errors -----------
// Catch unmatched routes
-app.use((req, res: express.Response) => {
+app.use((_req, res: express.Response) => {
res.status(HttpStatusCode.NOT_FOUND_404).end()
})
// Catch thrown errors
-app.use((err, req, res: express.Response, next) => {
+app.use((err, _req, res: express.Response, _next) => {
// Format error to be logged
let error = 'Unknown error.'
if (err) {
'downloadEnabled'
]
class VideoAuditView extends EntityAuditView {
- constructor (private readonly video: VideoDetails) {
+ constructor (video: VideoDetails) {
super(videoKeysToKeep, 'video', video)
}
}
'video-name'
]
class VideoImportAuditView extends EntityAuditView {
- constructor (private readonly videoImport: VideoImport) {
+ constructor (videoImport: VideoImport) {
super(videoImportKeysToKeep, 'video-import', videoImport)
}
}
'account-name'
]
class CommentAuditView extends EntityAuditView {
- constructor (private readonly comment: VideoComment) {
+ constructor (comment: VideoComment) {
super(commentKeysToKeep, 'comment', comment)
}
}
'videoChannels'
]
class UserAuditView extends EntityAuditView {
- constructor (private readonly user: User) {
+ constructor (user: User) {
super(userKeysToKeep, 'user', user)
}
}
'ownerAccount-displayedName'
]
class VideoChannelAuditView extends EntityAuditView {
- constructor (private readonly channel: VideoChannel) {
+ constructor (channel: VideoChannel) {
super(channelKeysToKeep, 'channel', channel)
}
}
'createdAt'
]
class AbuseAuditView extends EntityAuditView {
- constructor (private readonly abuse: AdminAbuse) {
+ constructor (abuse: AdminAbuse) {
super(abuseKeysToKeep, 'abuse', abuse)
}
}
"emitDecoratorMetadata": true,
"importHelpers": true,
"removeComments": true,
- "strictBindCallApply": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"lib": [
},
"resolveJsonModule": true,
"strict": false,
+ "strictBindCallApply": true,
+ "allowUnreachableCode": false,
+ "allowUnusedLabels": false,
+ "noFallthroughCasesInSwitch": true,
+ "noUnusedLocals": true,
"skipLibCheck": true,
"composite": true,
"declarationMap": true