tslint-jasmine-rules
Advanced tools
Comparing version 1.3.5 to 1.4.0
@@ -16,2 +16,11 @@ "use strict"; | ||
var ts = require("typescript"); | ||
function some(iterator, predicate) { | ||
var next; | ||
while (!(next = iterator.next()).done) { | ||
if (predicate(next.value)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
var Rule = (function (_super) { | ||
@@ -34,3 +43,2 @@ __extends(Rule, _super); | ||
var _this = _super.call(this, sourceFile, ruleName, options) || this; | ||
_this.isInTestFile = false; | ||
_this.minimalPattern = "(\/test\/)"; | ||
@@ -71,8 +79,6 @@ _this.defaultPattern = "(\/e2e\/)|(spec\.ts$)"; | ||
ExpectLengthWalker.prototype.isLengthExpectedFor = function (callee) { | ||
return Array.from(this.usages.values()).some(function (value) { | ||
return some(this.usages.values(), function (value) { | ||
return value.uses.some(function (use) { | ||
var usage = use.location.parent.parent.getText(); | ||
if (usage === "expect(" + callee.getText() + ".length)") { | ||
return true; | ||
} | ||
return usage === "expect(" + callee.getText() + ".length)"; | ||
}); | ||
@@ -79,0 +85,0 @@ }); |
{ | ||
"name": "tslint-jasmine-rules", | ||
"version": "1.3.5", | ||
"version": "1.4.0", | ||
"description": "tslint rules for jasmine", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"release": "rimraf dist && tsc && npm t", | ||
"release": "rimraf dist && tsc && npm t && npm run lint", | ||
"test": "rimraf dist && tsc && tslint --test test", | ||
"tsc": "tsc", | ||
"cp": "cp" | ||
"cp": "cp", | ||
"lint": "tslint --project tsconfig.json" | ||
}, | ||
@@ -12,0 +13,0 @@ "repository": { |
@@ -29,6 +29,1 @@ # tslint-jasmine-rules | ||
``` | ||
## Roadmap | ||
- [X] Add unit tests | ||
- [ ] Add more rules |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9830
170
29