https://github.com/wwwouter/tslint-contrib
https://github.com/wwwouter/tslint-contrib
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wwwouter/tslint-contrib
- Owner: wwwouter
- License: mit
- Created: 2018-02-01T18:26:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T07:52:02.000Z (over 8 years ago)
- Last Synced: 2025-10-05T13:51:37.081Z (8 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# @wwwouter/tslint-contrib
Add to tslint.json
{
"rulesDirectory": [
"node_modules/@wwwouter/tslint-contrib",
],
"rules": {
"no-promise-as-boolean": true,
}
}
## Rule(s)
### no-promise-as-boolean
Checks for unresolved Promises in boolean expressions.
For example where this.isTrue() returns a Promise, this violates the rule:
if(this.isTrue()){
}
This doesn't:
if(await this.isTrue()){
}
## Update version
npm version major|minor|patch
npm publish --access=public
git push
## [License](LICENSE)
Copyright (c) 2018 Wouter Mooij.
Licensed under the [MIT License](LICENSE).