Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
grunt-jslint
Advanced tools
Validates JavaScript files with JSLint as a grunt task.
Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-jslint
Then add this line to your project's grunt.js
gruntfile:
grunt.loadNpmTasks('grunt-jslint');
The multitask, responsible for running JSLint. The task accepts a single option (property), files.
The files property is an array of files or wildcards which you want to be validated with JSLint.
Configuration options/settings to pre-define in JSLint.
Sample directives:
browser: true,
unparam: true,
predef: [ // functionally the same thing as /*global myGlobal:true, anotherGlobal:true*/
'myGlobal',
'anotherGlobal'
]
Configuration options/settings for the plugin itself.
Currently supported options include:
true
.module.exports = function (grunt) {
'use strict';
grunt.loadNpmTasks('grunt-jslint'); // load the task
grunt.initConfig({
watch: {
files: '<config:jslint.files>',
tasks: 'jslint'
},
jslint: { // configure the task
files: [ // some example files
'grunt.js',
'src/**/*.js'
]
},
jslint_directives: { // example directives
browser: true,
unparam: true,
todo: true,
predef: [ // array of pre-defined globals
'jQuery'
]
},
jslint_options: {
junit: 'out/junit.xml', // write the output to a JUnit XML
log: 'out/lint.log',
errorsOnly: true // only display errors
}
});
grunt.registerTask('default', 'server watch');
};
Copyright (c) 2012 Stephen Mathieson Licensed under the WTFPL license.
FAQs
Validates JavaScript files with JSLint
The npm package grunt-jslint receives a total of 741 weekly downloads. As such, grunt-jslint popularity was classified as not popular.
We found that grunt-jslint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.