https://github.com/anmuel/tslint-noif
A tslint rule extension to prohibit the usage of conditional statements.
https://github.com/anmuel/tslint-noif
conditional-statements tslint tslint-rules
Last synced: 22 days ago
JSON representation
A tslint rule extension to prohibit the usage of conditional statements.
- Host: GitHub
- URL: https://github.com/anmuel/tslint-noif
- Owner: anmuel
- License: mit
- Created: 2017-01-16T19:28:48.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-08-10T07:52:39.000Z (over 1 year ago)
- Last Synced: 2024-08-10T09:03:02.916Z (over 1 year ago)
- Topics: conditional-statements, tslint, tslint-rules
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/tslint-noif
- Size: 97.7 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# tslint-noif [](https://travis-ci.org/anmuel/tslint-noif)
[](https://npmjs.com/package/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**:
```json
{
"extends": ["tslint:recommended", "tslint-noif"],
"rules": {
"no-if": true,
"no-static": true,
"no-switch": true
}
}
```
## Test
Run `npm test`
## Todos
See [Issues](https://github.com/anmuel/tslint-noif/issues)
## References
* https://github.com/palantir/tslint
* https://palantir.github.io/tslint/develop/custom-rules/
* https://palantir.github.io/tslint/develop/testing-rules/