Suppress DeepSource false positives

- Should not have unused variables (JS-0128)
- Found an arrow function that could be confused for a comparison (JS-0229)
pull/52/head
tycrek 3 years ago
parent b171c365ad
commit 4e08c6e4b9
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -71,7 +71,7 @@ app.use(nofavicon);
// Use custom index, otherwise render README.md
const ASS_INDEX = fs.existsSync(`./${indexFile}/`) ? require(`./${indexFile}`) : false;
app.get('/', (req, res, next) => !!ASS_INDEX
app.get('/', (req, res, next) => ASS_INDEX // skipcq: JS-0229
? ASS_INDEX(req, res, next)
: fs.readFile(path('README.md'))
.then((bytes) => bytes.toString())
@ -89,7 +89,7 @@ ASS_PREMIUM.enabled && app.use(ASS_PREMIUM.endpoint, ASS_PREMIUM.router); // ski
app.use('/:resourceId', (req, _res, next) => (req.resourceId = req.params.resourceId, next()), ROUTERS.resource); // skipcq: JS-0086, JS-0090
// Error handler
app.use((err, _req, res, _next) => log.error(err).err(err).callback(() => res.sendStatus(CODE_INTERNAL_SERVER_ERROR)));
app.use((err, _req, res, _next) => log.error(err).err(err).callback(() => res.sendStatus(CODE_INTERNAL_SERVER_ERROR))); // skipcq: JS-0128
// Host the server
log

Loading…
Cancel
Save