Unused imports and parameters in generated hapi routes file #1528
Labels
good first issue
This issue could be an easy PR for those looking to help contribute
help wanted
Pending feedback
Hello 👋 I am a developor for project PIA and we are currently integrating tsoa into our hapi based services.
We are compiling with
noUnusedLocals
andnoUnusedParameters
set totrue
and stumbled upon the hapi route generator template having both, unused imports and unused parameters.Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
The generated routes file for hapi should not trigger errors for unused imports and parameters, when the
compilerOptions
noUnusedLocals
andnoUnusedParameters
are set to true.Current Behavior
Errors are thrown when
noUnusedLocals
andnoUnusedParameters
are set to true.Possible Solution
Our solution is to prepend the generated file with
// @ts-nocheck
. As thehapi.hbs
template already has/* tslint:disable */
and/* eslint-disable */
modifiers,// @ts-nocheck
could be added, too.Steps to Reproduce
Setup
tsoa.json
with:Setup
tsconfig.json
withContext (Environment)
Version of the library: 5.1.1
Version of NodeJS: 20.3.0
The text was updated successfully, but these errors were encountered: