
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
gulp-json-lint
Advanced tools
JSON linter plugin for Gulp.
First install gulp-json-lint
npm install --save-dev gulp-json-lint
Usage:
var jsonlint = require('gulp-json-lint');
gulp.task('jsonlint', function(){
gulp.src('source.json')
.pipe(jsonlint())
.pipe(jsonlint.report('verbose'));
});
The output is added to file.jsonlint. You can output the errors by using reporters. There are two default reporters:
Reporters are executed only if there is an error.
You can use your own reporter by supplying a function.
/* Output is in the following form:
* {
* "error": "Unknown Character 'a', expecting a string for key statement.",
* "line": 2,
* "character": 5
* }
*/
var testReporter = function (lint, file) {
console.log(file.path + ': ' + lint.error);
};
gulp.task('invalid', function(){
gulp.src('invalid.json')
.pipe(jsonlint())
.pipe(jsonlint.report(testReporter));
});
gulp-json-lint only has one option, which specifies if comments are allowed. By default, they're not.
gulp.task('comments-valid', function(){
gulp.src('comments.json')
.pipe(jsonlint({
comments: true
}))
.pipe(jsonlint.report('verbose'));
});
Fork this repository, run npm install and send pull requests.
FAQs
JSON linter Gulp plugin
The npm package gulp-json-lint receives a total of 654 weekly downloads. As such, gulp-json-lint popularity was classified as not popular.
We found that gulp-json-lint 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.