aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/eoflineRule.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/tslint/lib/rules/eoflineRule.js')
-rw-r--r--node_modules/tslint/lib/rules/eoflineRule.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/node_modules/tslint/lib/rules/eoflineRule.js b/node_modules/tslint/lib/rules/eoflineRule.js
index c41ad92b0..631b5fc28 100644
--- a/node_modules/tslint/lib/rules/eoflineRule.js
+++ b/node_modules/tslint/lib/rules/eoflineRule.js
@@ -18,14 +18,14 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var Lint = require("../index");
-var Rule = (function (_super) {
+var Rule = /** @class */ (function (_super) {
tslib_1.__extends(Rule, _super);
function Rule() {
return _super !== null && _super.apply(this, arguments) || this;
}
Rule.prototype.apply = function (sourceFile) {
var length = sourceFile.text.length;
- if (length === 0 ||
+ if (length === 0 || // if the file is empty, it "ends with a newline", so don't return a failure
sourceFile.text[length - 1] === "\n") {
return [];
}