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

less-terrible-coffeelint-loader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less-terrible-coffeelint-loader - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.editorconfig

15

index.js

@@ -85,3 +85,3 @@ 'use strict';

// Custom reporter.
var reporter = config.reporter;
var reporter = (config.reporter) ? config.reporter : defaultReporter;
delete config.reporter;

@@ -91,15 +91,4 @@

if (errors.length > 0) {
if (reporter) {
reporter.call(this, errors);
} else {
var emitter = emitErrors ? this.emitError : this.emitWarning;
reporter.call(this, errors, emitErrors);
if (emitter) {
emitter(defaultReporter(errors));
} else {
throw new Error('Your module system doesn\'t support emitWarning.' +
' Update available? \n' + defaultReporter(errors));
}
}
if (failOnHint && errors.length > 0) {

@@ -106,0 +95,0 @@ throw new Error('Module failed because of coffeelint error.');

@@ -5,4 +5,8 @@ 'use strict';

module.exports = function(errors) {
return table(errors.map(function(error) {
module.exports = function(errors, emitErrors) {
var emitter = emitErrors ? this.emitError : this.emitWarning;
var errorCount = errors.filter(function(error) { return (error.level === 'error'); }).length;
var warningCount = errors.filter(function(error) { return (error.level === 'warning'); }).length;
var report = table(errors.map(function(error) {
var line = [

@@ -21,2 +25,20 @@ '',

}));
if (errors.length > 0) {
report = report +
'\n\n' +
chalk.yellow([
'✖ ',
errors.length,
' problems',
' (',
errorCount,
' errors, ',
warningCount,
' warnings)'
].join(''));
}
emitter(report);
};
{
"name": "less-terrible-coffeelint-loader",
"version": "0.1.0",
"version": "0.1.1",
"author": "Tommy Brunn <tommy.brunn@gmail.com",

@@ -5,0 +5,0 @@ "description": "Coffeelint loader module for webpack",

@@ -61,5 +61,5 @@ # Less Terrible Coffeelint Loader

The reporter function will be passed the array returned from `coffeelint.lint`:
The reporter function will be passed the array returned from `coffeelint.lint` as well as a boolean indicating whether you should `emitError` or `emitWarning`:
```js
[
reporter.call(this, [
{

@@ -72,3 +72,3 @@ rule : 'Name of the violated rule',

}
]
], true); // emitErrors
```

@@ -75,0 +75,0 @@

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