-
Notifications
You must be signed in to change notification settings - Fork 204
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
noUnusedParameters always enabled by default when using typescript from node_modules #1433
Comments
This seems to be an issue with TypeScript 2.9, which apparently reports those diagnostics regardless of tsconfig settings. I could not reproduce on TypeScript 2.8. For additional context, these diagnostics are reported via If you could open an issue on Microsoft/TypeScript, that would be very helpful. The best we could offer from our end is #1434, but it will take some time to polish (we could of course ignore all |
I would open an issue in the Typescript repo, but I lack the background and knowledge to fulfill all their requirements there. I just figured out suggestion diagnostics is a service that provides you in this case with the information that the parameters there are unused and shouldn't be? They require a test with typescript@next in case the issue is already resolved in the newest version. I don't know how to make atom-typescript use typescript@next nor how to create a suitable minimal example without atom-typescript. Preparing the issue as desired is out of my time frame, sorry. I'd be happy if someone with the necessary knowledge could help out here as this wouldn't take much of their time. |
Hmm. Went into this rabbit hole, and traced this back to microsoft/TypeScript#22361 -- so apparently this is very deliberate. |
Okay, so there is an "escape hatch" so to speak. I've added necessary checks to #1434. Will try to cook up a release this weak. In the meantime, consider using TypeScript 2.8 if you can. For the record, atom-typescript uses whatever TypeScript version you have installed into |
Thanks for your engagement. Take your time, though. It's a bit annoying, but it doesn't hinder development. |
Problem
If Typescript is installed locally in
node_modules
,atom-typescript
uses it instead of the version shipped with the package. This causes a behavior as ifnoUnusedParameters
was enabled. Setting it explicitly tofalse
didn't solve the problem for me.Reproduction
I was using
atom-typescript
12.5.3 when reproducing this like so:foo.ts
:npm i typescript
.x
offoo
should get a blue squiggly underline and the compiler should complain about an unused parameter.tsc foo.ts
should not output any warnings or errors.(No
tsconfig.json
was used for reproduction)Expectation
The expected behavior is that
atom-typescript
just plays by the rules set in thetsconfig.json
, no matter whether it uses it's own or a locally installed version of Typescript. I haven't tested whether this affects any other settings.The text was updated successfully, but these errors were encountered: