Skip to content

ibezkrovnyi/tslint-rules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tslint-rules

currently it contains only one rule:

{
  "no-inferrable-return-types": true
}

which is the same as no-inferrable-types, but for Return Types

Supported

  • function declarations
  • function expressions
  • arrow functions
  • class methods (including static methods and generators)
  • getter/setter (not tested)

install

npm i -D @ibezkrovnyi/tslint-rules

and add to tslint.json

"extends": [
  "@ibezkrovnyi/tslint-rules"
],
"rules": {
  "no-inferrable-return-types": true
}

example

function sum(a, b): number {
  return a + b;
}

may be safely replaced with

function sum(a, b) {
  return a + b;
}

fix

tslint --fix is available

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published