
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
gulp-htmlhint-inline
Advanced tools
First, install gulp-htmlhint-inline
as a development dependency:
npm install --save-dev gulp-htmlhint-inline
Then, add it to your gulpfile.js
:
var gulp = require('gulp'),
htmlhint_inline = require('gulp-htmlhint-inline');
gulp.task('htmlhint', function () {
var options = {
htmlhintrc: './.htmlhintrc',
ignores: {
'<?php': '?>'
},
patterns: [
{
match: /hoge/g,
replacement: 'fuga'
}
]
};
gulp.src('test/*.phtml')
.pipe(htmlhint_inline(options))
.pipe(htmlhint_inline.reporter())
.pipe(htmlhint_inline.reporter('fail'));
});
Type: String Default value: null
htmlhintrc
file must be a valid JSON.
If you specify this file, options that have been defined in it will be used in the global.
If there is specified in the task options, the options in this file will be overwritten.
{
"tagname-lowercase": true
}
Type: Object Default: {}
Remove program tag pairs.
Type: Array Default: []
Enable the replacement by the pattern
Type: RegExp|String
Indicates the matching expression.
Type: String | Function
var gulp = require('gulp'),
htmlhint_inline = require('gulp-htmlhint-inline');
gulp.task('htmlhint', function () {
var options = {
htmlhintrc: './.htmlhintrc',
ignores: {
'<?php': '?>'
}
};
gulp.src('test/*.phtml')
.pipe(htmlhint_inline(options))
.pipe(htmlhint_inline.reporter());
});
In order to end the task when your task happened error of HTMLHint, please use this reporter.
var gulp = require('gulp'),
htmlhint_inline = require('gulp-htmlhint-inline');
gulp.task('htmlhint', function () {
var options = {
htmlhintrc: './.htmlhintrc',
ignores: {
'<?php': '?>'
}
};
gulp.src('test/*.phtml')
.pipe(htmlhint_inline(options))
.pipe(htmlhint_inline.reporter('fail'));
});
You can also use the custom reporter that you have created.
var gulp = require('gulp'),
htmlhint_inline = require('gulp-htmlhint-inline');
gulp.task('htmlhint', function () {
var options = {
htmlhintrc: './.htmlhintrc',
ignores: {
'<?php': '?>'
}
};
var cutomReporter = function (file) {
if (!file.htmlhint_inline.success) {
console.log('custom reporter: htmlhint-inline fail in '+ file.path);
}
}
return gulp.src('test/*.phtml')
.pipe(htmlhint_inline(options))
.pipe(htmlhint_inline.reporter())
.pipe(htmlhint_inline.reporter(cutomReporter));
});
FAQs
Gulp plugin for linting inline html
The npm package gulp-htmlhint-inline receives a total of 2 weekly downloads. As such, gulp-htmlhint-inline popularity was classified as not popular.
We found that gulp-htmlhint-inline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.