tslint-noif
v0.1.1
Published
A tslint-plugin for rules regarding if/else constructions
Downloads
16
Maintainers
Readme
tslint-noif
A tslint rule extension to prohibit the usage of conditional statements such as if
or switch
.
It's a bit radical I guess :)
Usage
npm install tslint-noif --save-dev
Use the desired rules in your tslint.json:
{
"extends": ["tslint:recommended", "tslint-noif"],
"rules": {
"no-if": true,
"no-static": true,
"no-switch": true
}
}
Test
Run npm test
Todos
See Issues
References
- https://github.com/palantir/tslint
- https://palantir.github.io/tslint/develop/custom-rules/
- https://palantir.github.io/tslint/develop/testing-rules/