Skip to content
forked from palantir/tslint

🚦 An extensible linter for the TypeScript language

License

Notifications You must be signed in to change notification settings

aescarcha/tslint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tslint

A linter for the TypeScript language.

Supported Rules

  • semicolon enforces semicolons at the end of every statement.
  • eqeqeq enforces === and !== in favor of == and !=.
  • maxlen sets the maximum length of a line.
  • whitespace enforces whitespace between a keyword and a conditional, surrounding an operator, and enclosing "=" within variable declarations and import/export statements.
  • quotemark enforces consistent single or double quoted string literals.
  • oneline enforces an opening brace to be on the same line as the expression preceding it.
  • trailing disallows trailing whitespace at the end of a line.
  • bitwise disallows bitwise operators.
  • evil disallows eval function invocations.
  • eofline enforces the file to end with a newline.
  • classname enforces PascalCased class names.
  • varname allows only camelCased or UPPER_CASED variable names.
  • noarg disallows access to arguments.callee.
  • sub disallows object access via string literals.
  • forin enforces a for ... in statement to be filtered with an if statement.
  • debug disallows debugger statements.
  • curly enforces braces for if/for/do/while statements.
  • indent enforces consistent indentation for the whole file.

Development

Setup

git clone [email protected]:palantir/tslint.git
cd tslint
git submodule init
git submodule update

Build

npm install
grunt

TODO

  • Disallow variables referenced outside of their scope definition
  • Disallow unused variables

About

🚦 An extensible linter for the TypeScript language

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.3%
  • Other 0.7%