tslint-line-before-constructor
v0.5.1
Published
Custom rule for TSLint to assure that constructor has blank line before declaration
Downloads
20
Readme
tslint-line-before-constructor
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 { }
...
}