antlr4ts icon indicating copy to clipboard operation
antlr4ts copied to clipboard

Unused imports typescript error

Open amazzalel-habib opened this issue 5 years ago • 4 comments

The generated files contains some errors. You have imported the decorators NotNull and Override and commented their usage, is there a way to uncomment them or remove the imports without me touching the file manualy?

amazzalel-habib avatar Mar 04 '19 11:03 amazzalel-habib

Are you sure this is an error and not just a linter warning?

With that said, the imports could be commented out to match the uses.

sharwell avatar Mar 04 '19 17:03 sharwell

In my case it is an error because I want to use noUnusedLocals for my ts files. And there is no way to ignore them for just the generated files.

amazzalel-habib avatar Mar 04 '19 17:03 amazzalel-habib

It'd be better if the imports are commented as well, or add some option (experimentalDecorators) to let the user select whether to add the decorators or not. also there is a variable that isn't used in the parser/Lexer generated files. Thanks alot,

amazzalel-habib avatar Mar 04 '19 21:03 amazzalel-habib

I met this issue in my project. It violates noUnusedLocals in ts compile options, that cannot be changed. Is there any solution or workaround for it now?

hieunguyen2211 avatar Jul 29 '21 07:07 hieunguyen2211