
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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 526 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.