@fimbul/mimir
Advanced tools
Comparing version 0.22.0-dev.20190806 to 0.22.0-dev.20191111
{ | ||
"name": "@fimbul/mimir", | ||
"version": "0.22.0-dev.20190806", | ||
"version": "0.22.0-dev.20191111", | ||
"description": "Core rules of the Fimbullinter project", | ||
@@ -30,3 +30,3 @@ "main": "recommended.yaml", | ||
"@fimbul/ymir": "0.21.0", | ||
"chalk": "^2.3.2", | ||
"chalk": "^3.0.0", | ||
"debug": "^4.0.0", | ||
@@ -33,0 +33,0 @@ "tslib": "^1.8.1", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ymir_1 = require("@fimbul/ymir"); | ||
const chalk_1 = require("chalk"); | ||
const chalk = require("chalk"); | ||
const path = require("path"); | ||
const COLORS = { | ||
error: chalk_1.default.red, | ||
warning: chalk_1.default.yellow, | ||
suggestion: chalk_1.default.cyan, | ||
error: chalk.red, | ||
warning: chalk.yellow, | ||
suggestion: chalk.cyan, | ||
}; | ||
@@ -62,11 +62,11 @@ const SYMBOLS = { | ||
for (const [fileName, findings] of this.files) { | ||
lines.push('', `${chalk_1.default.underline(path.normalize(fileName))}${chalk_1.default.hidden(':' + findings[0].position)}`); | ||
lines.push('', `${chalk.underline(path.normalize(fileName))}${chalk.hidden(':' + findings[0].position)}`); | ||
for (const finding of findings) { | ||
const positionColor = COLORS[finding.severity]; | ||
++counts[finding.severity]; | ||
lines.push(positionColor(pad(finding.severity.toUpperCase(), this.maxSeverityWidth) + ' ' + pad(finding.position, this.maxPositionWidth)) + ` ${chalk_1.default.grey(pad(finding.ruleName, this.maxNameWidth))} ${chalk_1.default.blueBright(finding.message)}`); | ||
lines.push(positionColor(pad(finding.severity.toUpperCase(), this.maxSeverityWidth) + ' ' + pad(finding.position, this.maxPositionWidth)) + ` ${chalk.grey(pad(finding.ruleName, this.maxNameWidth))} ${chalk.blueBright(finding.message)}`); | ||
} | ||
} | ||
if (this.fixed !== 0) | ||
lines.push('', chalk_1.default.green(`Automatically fixed ${addCount(this.fixed, 'finding')}.`)); | ||
lines.push('', chalk.green(`Automatically fixed ${addCount(this.fixed, 'finding')}.`)); | ||
if (this.files.size !== 0) { | ||
@@ -81,3 +81,3 @@ const summaryLine = []; | ||
if (this.fixable !== 0) | ||
lines.push(chalk_1.default.grey(addCount(this.fixable, 'finding') + ' ' + | ||
lines.push(chalk.grey(addCount(this.fixable, 'finding') + ' ' + | ||
(this.fixable === 1 ? 'is' : 'are') + " potentially fixable with the '--fix' option.")); | ||
@@ -84,0 +84,0 @@ } |
Sorry, the diff of this file is not supported yet
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
417478
+ Addedansi-styles@4.3.0(transitive)
+ Addedchalk@3.0.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedsupports-color@7.2.0(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedsupports-color@5.5.0(transitive)
Updatedchalk@^3.0.0