0.5.1 • Published 5 years ago

tslint-line-before-constructor v0.5.1

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

tslint-line-before-constructor

npm version CircleCI

Custom rule for TSLint to assure that constructor has blank line before declaration

Install

npm install --save-dev tslint-line-before-constructor

Configuration

Update tslint.json file and add new rules directory with new rule itself

{
    "rulesDirectory": [
      "tslint-line-before-constructor"
    ],
    "rules": {
      "tslint-line-before-constructor": true
    }
}

Example

// Bad
class Name {
    constructor() {}
}

// Good
class Name {
    
    constructor() {}
    
    public method(): void { }
   
    ...
}