
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
grunt-jslint
Advanced tools
Validates JavaScript files with JSLint as a grunt task.
Install this grunt plugin next to your project's Gruntfile with: npm install grunt-jslint
Then add this line to your project's gruntfile:
grunt.loadNpmTasks('grunt-jslint');
A multi-task to validate your JavaScript files with JSLint.
Supports the following options:
predef: ['myglobal']
true
true
; when set to false
, grunt will not fail if JSLint detects an error#!/usr/bin/whatever
) from filesmodule.exports = function (grunt) {
'use strict';
grunt.loadNpmTasks('grunt-jslint'); // load the task
grunt.initConfig({
jslint: { // configure the task
// lint your project's server code
server: {
src: [ // some example files
'server/lib/*.js',
'server/routes/*.js',
'server/*.js',
'server/test/*.js'
],
exclude: [
'server/config.js'
],
directives: { // example directives
node: true,
todo: true
},
options: {
edition: 'latest', // specify an edition of jslint or use 'dir/mycustom-jslint.js' for own path
junit: 'out/server-junit.xml', // write the output to a JUnit XML
log: 'out/server-lint.log',
jslintXml: 'out/server-jslint.xml',
errorsOnly: true, // only display errors
failOnError: false, // defaults to true
checkstyle: 'out/server-checkstyle.xml' // write a checkstyle-XML
}
},
// lint your project's client code
client: {
src: [
'client/**/*.js'
],
directives: {
browser: true,
predef: [
'jQuery'
]
},
options: {
junit: 'out/client-junit.xml'
}
}
}
});
grunt.registerTask('default', 'jslint');
};
All files should be validated with JSLint. Bug fixes and/or new features must be accompanied by a passing test. Tests are written with vows.
Run grunt jslint
in the root of your repository.
Run make test
in the root of your repository.
Copyright (c) 2013 Stephen Mathieson Licensed under the WTFPL license.
FAQs
Validates JavaScript files with JSLint
The npm package grunt-jslint receives a total of 0 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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.