Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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
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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.