Currently, I am tackling a moderately sized Angular 4 project that incorporates TSLint.
Whenever I execute the lint command using npm run lint
(which utilizes ng lint
), a warning consistently pops up in the command line:
Warning: The 'no-use-before-declare' rule requires type checking
I have attempted to activate type-checking by including the --type-check
and
--project path/to/the/tsconfig.json
, which supposedly is "all you need to do", but the warning persists on the console regardless of my efforts with these flags.
The project does not contain any lint issues, irrespective of whether I use the --type-check
and --project
flags or not.
Is type-checking actually being implemented? Will this warning eventually disappear?
Edit
The issue lies in passing the flags from the command-line to the ng lint
command:
If I enter the command on the command line like this:
npm run lint --type-check --project tsconfig.json
I still encounter the warning on the screen. However, when I modify the command in the package.json file to look like this:
"lint": "ng lint --type-check --project tsconfig.json",
The warning message no longer appears in the console, although I receive a few additional lint notifications.