1

My app has two warnings from lint:

no-use-before-declare is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.

I've seen this and this and this, etc... I gather there's a big migration going on in lint-land. Unfortunately, Please use the built-in compiler checks is still super vague.

Is it possible to migrate these two options to eliminate the warnings and keep the functionality?

jsharpe
  • 2,546
  • 3
  • 26
  • 42

1 Answers1

2

"Built-in compiler checks" means enabling noUnusedLocals and noUnusedParameters compiler options in tsconfig.json. But I wouldn't bother since then they will be hard errors that prevent compilation, and cannot be turned into warnings.

I gather there's a big migration going on in lint-land.

Yes. From tslint to typescript-eslint:

Palantir, the backers behind TSLint announced earlier this year that they would be deprecating TSLint in favor of supporting typescript-eslint in order to benefit the community. You can read more about that here: https://medium.com/palantir/tslint-in-2019-1a144c2317a9

The TypeScript Team themselves also announced their plans to move the TypeScript codebase from TSLint to typescript-eslint, and they have been big supporters of this project. More details at https://github.com/microsoft/TypeScript/issues/30553

Emil Laine
  • 41,598
  • 9
  • 101
  • 157
  • Could not find implementations for the following rules specified in the configuration: noUnusedLocals noUnusedParameters Try upgrading TSLint and/or ensuring that you have all necessary custom rules installed. If TSLint was recently upgraded, you may have old rules configured which need to be cleaned up. – jsharpe Nov 15 '19 at 07:43
  • As of this writing, I'm using latest tslint (5.20.1). – jsharpe Nov 15 '19 at 07:43
  • @jsharpe tsconfig.json, not tslint.json. – Emil Laine Nov 15 '19 at 12:07