New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scss-lint-html-reporter

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scss-lint-html-reporter - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

test/fixtures/output/results.json

15

package.json
{
"name": "scss-lint-html-reporter",
"version": "0.2.1",
"version": "0.2.2",
"description": "SCSS Lint HTML Reporter with optional TeamCity integration",

@@ -8,3 +8,4 @@ "main": "./src/index.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "istanbul cover _mocha",
"coveralls": "istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
},

@@ -33,5 +34,11 @@ "repository": {

"dependencies": {
"hairballs": "0.0.5",
"handlebars": "^3.0.1"
"hairballs": "0.0.7"
},
"devDependencies": {
"chai": "^2.2.0",
"coveralls": "^2.11.2",
"istanbul": "^0.3.13",
"mocha": "^2.2.4",
"mocha-lcov-reporter": "0.0.2"
}
}

@@ -1,3 +0,1 @@

#!/usr/bin/env node
var fs = require('fs');

@@ -10,8 +8,8 @@

module.exports = function(input) {
var lintReporter = new LintReporter(input);
var data = lintReporter.runReport();
var lintReporter = new LintReporter();
var data = lintReporter.runReport(input);
if (lintReporter.generateHtml) {
fs.writeFile(lintReporter.outputPath, templateUtils.applyTemplates(data), function(err) {
if (err) {
if(err) {
throw err;

@@ -18,0 +16,0 @@ }

@@ -11,3 +11,3 @@ /**

function LintReporter(jsonOutput) {
function LintReporter() {

@@ -82,8 +82,5 @@ /**

var teamCityLogger = new TeamCityLogger('SCSS Lint');
teamCityLogger.reportStart();
for (var fileName in data) {
teamCityLogger.testStart(fileName);
this.teamCityLogger.testStart(fileName);

@@ -99,6 +96,6 @@ var file = { path: fileName, errors: 0, warnings: 0, messages: [], errorList: [] };

if (file.errorList.length) {
teamCityLogger.testFailed(fileName, file.errorList);
this.teamCityLogger.testFailed(fileName, file.errorList);
}
teamCityLogger.testEnd(fileName);
this.teamCityLogger.testEnd(fileName);
hairballs.updateFileSummary(file);

@@ -112,9 +109,2 @@

}
teamCityLogger.reportEnd();
// output team city report to the console
if (this.useTeamCityReport) {
console.log(teamCityLogger.reportOutput.join('\n'));
}
};

@@ -128,11 +118,16 @@

this.fixJSON = function(jsonString) {
if (!jsonString) {
return '';
}
try {
jsonString = jsonString
.replace(/\n/g, '')
.replace(/\r/g, '');
jsonString = jsonString
.replace(/\n/g, '')
.replace(/\r/g, '');
var jsonObject = JSON.parse(jsonString);
return JSON.parse(jsonString);
return jsonObject;
} catch(err) {
this.teamCityLogger.logMessage('SCSS Lint Error', 'An error occured parsing the lint results', 'ERROR');
console.log('An error occured parsing the JSON: ' + err);
}
};

@@ -168,6 +163,10 @@

*/
this.runReport = function() {
this.runReport = function(jsonOutput) {
this.teamCityLogger.reportStart();
this.checkParameters();
var data = this.fixJSON(jsonOutput);
this.checkParameters();
this.summarizeData(data);

@@ -180,2 +179,9 @@

this.teamCityLogger.reportEnd();
// output team city report to the console
if (this.useTeamCityReport) {
console.log(this.teamCityLogger.reportOutput.join('\n'));
}
return {

@@ -198,2 +204,3 @@ fileSummary: hairballs.fileSummary,

this.outputPath = 'scss-lint-report.html';
this.teamCityLogger = new TeamCityLogger('SCSS Lint');
this.ruleUrl = 'https://github.com/brigade/scss-lint/blob/master/lib/scss_lint/linter/README.md#';

@@ -200,0 +207,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