diff options
Diffstat (limited to 'node_modules/tslint/lib/formatters/stylishFormatter.js')
-rw-r--r-- | node_modules/tslint/lib/formatters/stylishFormatter.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/node_modules/tslint/lib/formatters/stylishFormatter.js b/node_modules/tslint/lib/formatters/stylishFormatter.js index d3a2603c1..fa039922b 100644 --- a/node_modules/tslint/lib/formatters/stylishFormatter.js +++ b/node_modules/tslint/lib/formatters/stylishFormatter.js @@ -18,7 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var abstractFormatter_1 = require("../language/formatter/abstractFormatter"); -var chalk = require("chalk"); +var chalk_1 = require("chalk"); var Utils = require("../utils"); var Formatter = /** @class */ (function (_super) { tslib_1.__extends(Formatter, _super); @@ -46,25 +46,25 @@ var Formatter = /** @class */ (function (_super) { for (var _i = 0, failures_1 = failures; _i < failures_1.length; _i++) { var failure = failures_1[_i]; var fileName = failure.getFileName(); + var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); + var positionTuple = lineAndCharacter.line + 1 + ":" + (lineAndCharacter.character + 1); // Output the name of each file once if (currentFile !== fileName) { outputLines.push(""); - outputLines.push(fileName); + outputLines.push("" + fileName + chalk_1.default.hidden(":" + positionTuple)); currentFile = fileName; } var failureString = failure.getFailure(); - failureString = chalk.yellow(failureString); + failureString = chalk_1.default.yellow(failureString); // Rule var ruleName = failure.getRuleName(); ruleName = this.pad(ruleName, ruleMaxSize); - ruleName = chalk.grey(ruleName); + ruleName = chalk_1.default.grey(ruleName); // Lines - var lineAndCharacter = failure.getStartPosition().getLineAndCharacter(); - var positionTuple = lineAndCharacter.line + 1 + ":" + (lineAndCharacter.character + 1); positionTuple = this.pad(positionTuple, positionMaxSize); positionTuple = failure.getRuleSeverity() === "warning" - ? chalk.blue(failure.getRuleSeverity().toUpperCase() + ": " + positionTuple) - : chalk.red(failure.getRuleSeverity().toUpperCase() + ": " + positionTuple); + ? chalk_1.default.blue(failure.getRuleSeverity().toUpperCase() + ": " + positionTuple) + : chalk_1.default.red(failure.getRuleSeverity().toUpperCase() + ": " + positionTuple); // Output var output = positionTuple + " " + ruleName + " " + failureString; outputLines.push(output); @@ -102,11 +102,11 @@ var Formatter = /** @class */ (function (_super) { Formatter.metadata = { formatterName: "stylish", description: "Human-readable formatter which creates stylish messages.", - descriptionDetails: (_a = ["\n The output matches what is produced by ESLint's stylish formatter.\n Its readability is enhanced through spacing and colouring."], _a.raw = ["\n The output matches what is produced by ESLint's stylish formatter.\n Its readability is enhanced through spacing and colouring."], Utils.dedent(_a)), - sample: (_b = ["\n myFile.ts\n 1:14 semicolon Missing semicolon"], _b.raw = ["\n myFile.ts\n 1:14 semicolon Missing semicolon"], Utils.dedent(_b)), + descriptionDetails: Utils.dedent(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n The output matches what is produced by ESLint's stylish formatter.\n Its readability is enhanced through spacing and colouring."], ["\n The output matches what is produced by ESLint's stylish formatter.\n Its readability is enhanced through spacing and colouring."]))), + sample: Utils.dedent(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n myFile.ts\n 1:14 semicolon Missing semicolon"], ["\n myFile.ts\n 1:14 semicolon Missing semicolon"]))), consumer: "human", }; return Formatter; }(abstractFormatter_1.AbstractFormatter)); exports.Formatter = Formatter; -var _a, _b; +var templateObject_1, templateObject_2; |