1.1.0 ng lint no-use-before-declare Warning
See original GitHub issue- [] bug report
- [X] feature request
Versions.
@angular/cli@1.1.0
Repro steps.
ng new project-name cd project-name ng lint Warning: The ‘no-use-before-declare’ rule requires type checking
ng lint --type-check No Warning
Desired functionality.
Should --type-check be the default? Or at least a way to set it as default would be nice.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:9 (6 by maintainers)
Top Results From Across the Web
TSLint: Warning: The 'no-use-before-declare' rule requires ...
The problem was only with passing flags from command line to the ng lint command. I fixed it using this command from the...
Read more >angular/angular-cli
Is there a way to set ng lint --type-check as the default when running ng lint ? Without it in 1.1.0 we get...
Read more >TSLint missing rules warning
Running ng lint --type-check says All files pass linting. ... "no-unused-expression": true, "no-use-before-declare": true, "no-var-keyword": ...
Read more >rule 'no-any' with severinity 'warn' failed linting with error ...
Hi @ajafff, yes, I use ng lint. Lint errors found in the listed files. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm...
Read more >no-use-before-declare - Rule
Rule: no-use-before-declare. Disallows usage of variables before their declaration. This rule is primarily useful when using the var keyword since the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Any further thoughts on this?
I agree making it slower is not ideal. I wonder if a warning or message when running
ng lintthat tells the user how to handle this warning may be nice.Which cases are those? I have a fairly large Angular project (over 20k lines of typescript code). Running
ng lintwithtype-checkdisabled takes 11 seconds, and with it enabled, 12 seconds.