Professional Documents
Culture Documents
Angular has a linting tool that checks our TypeScript code for programmatic and
stylistic errors as well as non-adherence to coding standards and conventions.
tslint.json is the configuration file for linting. This file contains all the
default rules for linting our code.
For the purpose of this demo I have created a brand new Angular project using the
following command.
ng new AngularProject
Since we have just generated a new angular project and all the code in the project
is auto-generated, we do not have any linting errors and we get the message - All
files pass linting.
sayHello() {
var message = 'Hello';
message = message + ' Pragim';
console.log(message);
}
sayHello() {
var message = 'Hello';
message = message + ' Pragim';
console.log(message);
}
Run ng lint command again with --type-check option. Notice now we do not get any
linting errors.
Variables declared with let keyword are not accessible before they are declared. So
this rule 'no-use-before-declare' can be safely disabled, if you have 'no-var-
keyword' rule enabled.
sayHello() {
var message = 'Hello';
message = message + ' Pragim';
console.log(message);
}
Reply
Complete Tutorials
How to become a full stack web developer
JavaScript tutorial
Bootstrap tutorial
Important Videos
The Gift of Education
C tutorial
Angular 6 Tutorial
Angular 2 Tutorial
Design Patterns
SOLID Principles
Bootstrap
AngularJS Tutorial
jQuery Tutorial
JavaScript Tutorial
Charts Tutorial
LINQ
LINQ to SQL
LINQ to XML
Entity Framework
WCF
C#
SQL Server
ADO.NET
ASP.NET
GridView
ASP.NET MVC
Slides
Entity Framework
WCF
C#
SQL Server
ADO.NET
ASP.NET
GridView
ASP.NET MVC
Interview Questions
C#
SQL Server
Written Test
Powered by Blogger.