Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

custom-tslint-formatters

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

custom-tslint-formatters - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

10

formatters/groupedFormatter.js

@@ -14,4 +14,4 @@ "use strict";

var Lint = require("tslint");
var chalk = require("chalk");
var Formatter = (function (_super) {
var chalk_1 = require("chalk");
var Formatter = /** @class */ (function (_super) {
__extends(Formatter, _super);

@@ -26,3 +26,5 @@ function Formatter() {

var ruleName = failure.getRuleName();
return " " + chalk.dim(position) + " " + message + " " + chalk.dim(ruleName);
var severity = failure.getRuleSeverity();
var positionColor = severity === 'warning' ? chalk_1.default.yellow : chalk_1.default.red;
return " " + positionColor(position) + " " + message + " " + chalk_1.default.dim(ruleName);
};

@@ -42,3 +44,3 @@ Formatter.prototype.groupByFile = function (failures) {

.reduce(function (lines, fileName) {
lines.push(chalk.underline.yellow(fileName));
lines.push(chalk_1.default.underline.green(fileName));
var fileFailures = failuresByFile[fileName];

@@ -45,0 +47,0 @@ return lines.concat(fileFailures.map(_this.formatFailure), ['\n']);

2

formatters/vscodeFormatter.js

@@ -15,3 +15,3 @@ "use strict";

var Lint = require("tslint");
var Formatter = (function (_super) {
var Formatter = /** @class */ (function (_super) {
__extends(Formatter, _super);

@@ -18,0 +18,0 @@ function Formatter() {

{
"name": "custom-tslint-formatters",
"version": "2.1.1",
"version": "2.2.0",
"description": "Custom formatters for TSLint.",

@@ -34,11 +34,10 @@ "main": "index.js",

"devDependencies": {
"@types/chalk": "^0.4.31",
"@types/node": "^7.0.12",
"lint-staged": "^4.0.2",
"prettier": "^1.5.3",
"tslint": "^5.0.0",
"typescript": "^2.2.2"
"@types/node": "^8.9.1",
"lint-staged": "^6.1.0",
"prettier": "^1.10.2",
"tslint": "^5.9.1",
"typescript": "^2.7.1"
},
"dependencies": {
"chalk": "^1.1.3"
"chalk": "^2.3.0"
},

@@ -45,0 +44,0 @@ "lint-staged": {

@@ -13,4 +13,6 @@ Custom TSLint Formatters

![custom tslint formatter grouped](docs/screenshots/grouped.png)
<img width="603" alt="custom tslint formatter grouped" src="docs/screenshots/grouped.png">
Errors are printed with a red position (`row:column`), warnings are printed with a yellow position.
### `vscode`

@@ -17,0 +19,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc