Skip to content

noUnusedParameters always enabled by default when using typescript from node_modules #1433

Closed
@Neonit

Description

@Neonit

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 if noUnusedParameters was enabled. Setting it explicitly to false didn't solve the problem for me.

Reproduction

I was using atom-typescript 12.5.3 when reproducing this like so:

  1. In an empty folder, open Atom and create a file foo.ts:
function foo(x: string)
{}
  1. No errors or warnings should be reported.
  2. Now open a console in that folder and install Typescript locally: npm i typescript.
  3. Restart or reload (Ctrl + Shift + F5) Atom.
  4. Once the package has been initialized, the parameter x of foo should get a blue squiggly underline and the compiler should complain about an unused parameter.
  5. Running 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 the tsconfig.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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions