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

gulp-htmlhint

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-htmlhint - npm Package Compare versions

Comparing version 3.0.1 to 4.0.0

32

index.js

@@ -118,14 +118,8 @@ const fs = require('fs');

'use strict';
return file.htmlhint.messages.map(msg => {
const {error: message} = msg;
return file.htmlhint.messages.map(message_ => {
const {error: message} = message_;
let {evidence} = message;
const {line, col} = message;
let detail;
const detail = line ? c.yellow('L' + line) + c.red(':') + c.yellow('C' + col) : c.yellow('GENERAL');
if (line) {
detail = c.yellow('L' + line) + c.red(':') + c.yellow('C' + col);
} else {
detail = c.yellow('GENERAL');
}
if (col === 0) {

@@ -200,5 +194,5 @@ evidence = c.red('?') + evidence;

htmlhintPlugin.failOnError = function (opts) {
htmlhintPlugin.failOnError = function (options) {
'use strict';
opts = opts || {};
options = options || {};
return through2.obj((file, enc, cb) => {

@@ -208,3 +202,3 @@ // Something to report and has errors

if (file.htmlhint && !file.htmlhint.success) {
if (opts.suppress === true) {
if (options.suppress === true) {
error = new PluginError('gulp-htmlhint', {

@@ -217,4 +211,4 @@ message: 'HTMLHint failed.',

const plural = errorCount === 1 ? '' : 's';
const msg = c.cyan(errorCount) + ' error' + plural + ' found in ' + c.magenta(file.path);
const messages = [msg].concat(getMessagesForFile(file).map(m => {
const message = c.cyan(errorCount) + ' error' + plural + ' found in ' + c.magenta(file.path);
const messages = [message].concat(getMessagesForFile(file).map(m => {
return m.message;

@@ -234,5 +228,5 @@ }));

htmlhintPlugin.failAfterError = function (opts) {
htmlhintPlugin.failAfterError = function (options) {
'use strict';
opts = opts || {};
options = options || {};
let globalErrorCount = 0;

@@ -244,3 +238,3 @@ let globalErrorMessage = '';

if (file.htmlhint && !file.htmlhint.success) {
if (opts.suppress === true) {
if (options.suppress === true) {
globalErrorCount += file.htmlhint.errorCount;

@@ -250,4 +244,4 @@ } else {

const plural = file.htmlhint.errorCount === 1 ? '' : 's';
const msg = c.cyan(file.htmlhint.errorCount) + ' error' + plural + ' found in ' + c.magenta(file.path);
const messages = [msg].concat(getMessagesForFile(file).map(m => {
const message = c.cyan(file.htmlhint.errorCount) + ' error' + plural + ' found in ' + c.magenta(file.path);
const messages = [message].concat(getMessagesForFile(file).map(m => {
return m.message;

@@ -254,0 +248,0 @@ }));

{
"name": "gulp-htmlhint",
"version": "3.0.1",
"version": "4.0.0",
"description": "A plugin for Gulp",

@@ -26,11 +26,11 @@ "keywords": [

"fancy-log": "^1.3.2",
"htmlhint": "^0.10.1",
"htmlhint": "^0.14.2",
"plugin-error": "^1.0.1",
"strip-ansi": "^6.0.0",
"strip-json-comments": "^3.0.1",
"strip-json-comments": "^3.1.1",
"through2": "^3.0.1",
"vinyl": "^2.2.0"
"vinyl": "^2.2.1"
},
"devDependencies": {
"coveralls": "^3.0.2",
"coveralls": "^3.1.0",
"htmlhint-stylish": "^1.0.3",

@@ -41,3 +41,3 @@ "mocha": "^6.2.2",

"vinyl-fs": "^3.0.3",
"xo": "^0.25.3"
"xo": "^0.36.1"
},

@@ -48,3 +48,3 @@ "xo": {

"engines": {
"node": ">=8"
"node": ">=10"
},

@@ -51,0 +51,0 @@ "licenses": [

@@ -30,3 +30,3 @@ /* eslint-env node, mocha */

let someTagOccurrences = 0;
let someTagIsFirstEl = false;
let someTagIsFirstElement = false;
let iteration = 0;

@@ -36,3 +36,3 @@ function onTagStart(event) {

if (tagName === 'some-tag' && iteration === 0) {
someTagIsFirstEl = true;
someTagIsFirstElement = true;
someTagOccurrences++;

@@ -43,3 +43,3 @@ } else if (tagName === 'some-tag' && iteration > 0) {

if (!someTagIsFirstEl) {
if (!someTagIsFirstElement) {
reporter.error('The tag <some-tag> must be present as first element.', event.line, event.col, self, event.raw);

@@ -46,0 +46,0 @@ parser.removeListener('tagstart', onTagStart);

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