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

ember-template-lint

Package Overview
Dependencies
Maintainers
1
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-template-lint - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

4

CHANGELOG.md
Changelog
=========
## 0.8.1
- Fix issue with console output formatting to avoid noisy console output when no errors are present.
## 0.8.0

@@ -5,0 +9,0 @@

44

lib/index.js

@@ -152,4 +152,18 @@ 'use strict';

static errorsToMessages(filePath, errors, options) {
options = options || {};
errors = errors || [];
options = options || {
verbose: false
};
if (errors.length === 0) {
return '';
}
let errorsMessages = errors.map((error) => this._formatError(error, options)).join('\n');
return `${chalk.underline(filePath)}\n${errorsMessages}\n`;
}
static _formatError(error, options) {
let message = '';
let severities = {

@@ -160,22 +174,16 @@ 1: 'warrning',

let errorsMessages = errors.map(error => {
let message = '';
if (error.line && error.column) {
message += chalk.dim(` ${error.line}:${error.column}`);
} else {
message += chalk.dim(' -:-');
}
if (error.line && error.column) {
message += chalk.dim(` ${error.line}:${error.column}`);
} else {
message += chalk.dim(' -:-');
}
message += ` ${chalk.red(severities[error.severity] || 'error')}`;
message += ` ${error.message} ${chalk.dim(error.rule)}`;
message += ` ${chalk.red(severities[error.severity] || 'error')}`;
message += ` ${error.message} ${chalk.dim(error.rule)}`;
if (options.verbose) {
message += `\n${error.source}`;
}
if (options.verbose) {
message += `\n${error.source}`;
}
return message;
}).join('\n');
return `${chalk.underline(filePath)}\n${errorsMessages}\n`;
return message;
}

@@ -182,0 +190,0 @@ }

{
"name": "ember-template-lint",
"version": "0.8.0",
"version": "0.8.1",
"description": "Lint your templates.",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -571,3 +571,9 @@ 'use strict';

});
it('formats empty errors', function() {
let result = Linter.errorsToMessages('file/path', []);
expect(result).to.equal('');
});
});
});
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