Package detail

tslint-line-before-class-property

toxity6ISC0.5.2

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

tslint, custom-tslint-rule

readme

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>;
}