-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I disable noUnusedLocals, noUnusedParameters per file #12913
Comments
No. See also #11051 |
So uh, would a feature request for this capability be a new ticket then? As I just commented on #11051, I'm working with generated TS (transpiled from Java with |
@thw0rted I'm in a similar situation with another TypeScript generator but I think #11051 has the solution. If I rename the generated type file to *.d.ts it is ignored during noUnusedLocals and noUnusedParameters. Unfortunately the generator refuses to generate anything other than a .ts extension, so I have to rename at another point in my build process, but it works. |
I don't think that's going to help me, I'm not generating typings but actual implementations, and This is a frustrating issue, because it's a basic feature that just about every other tool I can think of includes. If you're going to warn me about something that doesn't impact program execution (like |
@thw0rted |
That's a good point -- if it's too much to ask the generator to never create an unused local, maybe we can at least identify the cases where the local might be unused and give them an ignore directive preemptively. |
TypeScript Version: 2.0.10
After reading about the deprecation of
no-unused-variable
in tslint v4 I started usingnoUnusedLocals
andnoUnusedParameters
in mytsconfig.json
.With tslint I can disable a rule for a file or line
Is this disabling possible if Typescript is performing the checks?
Here is a stackoverflow question related to this http://stackoverflow.com/questions/38237594/pragma-disable-for-nounusedlocals
Thanks
The text was updated successfully, but these errors were encountered: