0.5.2 • Published 5 years ago

tslint-line-before-class-property v0.5.2

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

tslint-line-before-class-property

npm version CircleCI

Custom rule for TSLint to assure that each class property has new line before declaration

Install

npm install --save-dev tslint-line-before-class-property

Configuration

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

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

Example

// Bad
class Name {
    public boolean: boolean;
    public string: string;
    public array: Array<string>;
}

// Good
class Name {

    public boolean: boolean;

    public string: string;

    public array: Array<string>;
}