0

I am using VSCode version 1.52 and would like to disable the TS6133 “XXXXX is declared but its value is never used” warning.

I did a search and some people suggested turning off the noUnusedLocals in tsconfig.json, but I could not find that file.

Here is a link to that question.

Any leads would be appreciated.

Ethan
  • 876
  • 8
  • 18
  • 34
HHung
  • 49
  • 5
  • Perhaps you could not find a `tsconfig.json` file because you never created one? I assume the warning is a default warning. If you have no `tsconfig.json` yet, you can create one, and then configure it to your needs. – Shane Bishop Jan 03 '21 at 23:59
  • Please let me know where to host this file. – HHung Jan 04 '21 at 01:03
  • 1
    You should put the `tsconfig.json` in the root directory of your project. – Shane Bishop Jan 04 '21 at 04:09
  • Does this answer your question? [tslint how to disable error "someVariable is declared but its value is never read"](https://stackoverflow.com/questions/50011443/tslint-how-to-disable-error-somevariable-is-declared-but-its-value-is-never-rea) – Daniel Kaplan Apr 18 '23 at 23:19

1 Answers1

0

Update the tsconfig.json.

/* Linting */
    "strict": true,
    "noUnusedLocals": false, // make sure this is false to have no errors
    "noUnusedParameters": false,
    "noFallthroughCasesInSwitch": true
Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
deepakkadali
  • 31
  • 1
  • 1
  • 4