1 | var Lint = require("tslint");
|
2 |
|
3 | var __extends = this.__extends || function (d, b) {
|
4 | for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
5 | function __() { this.constructor = d; }
|
6 | __.prototype = b.prototype;
|
7 | d.prototype = new __();
|
8 | };
|
9 |
|
10 | var Formatter = (function (_super) {
|
11 | __extends(Formatter, _super);
|
12 | function Formatter() {
|
13 | _super.apply(this, arguments);
|
14 | }
|
15 | Formatter.prototype.format = function (failures) {
|
16 | var outputLines = failures.map(function (failure) {
|
17 | var failureString = failure.getFailure();
|
18 | var lineAndCharacter = failure.getStartPosition().getLineAndCharacter();
|
19 | var positionTuple = "[" + (lineAndCharacter.line + 1) + ", " + (lineAndCharacter.character + 1) + "]";
|
20 | return positionTuple + ": " + failureString;
|
21 | });
|
22 | return outputLines.join("\n") + "\n";
|
23 | };
|
24 | return Formatter;
|
25 | })(Lint.Formatters.AbstractFormatter);
|
26 | exports.Formatter = Formatter;
|