
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
jshint-loader
Advanced tools
npm i jshint-loader --save
Apply the jshint loader as pre/postLoader in your webpack configuration:
module.exports = {
module: {
preLoaders: [
{
test: /\.js$/, // include .js files
exclude: /node_modules/, // exclude any and all files in the node_modules folder
loader: "jshint-loader"
}
]
},
// more options in the optional jshint object
jshint: {
// any jshint option http://www.jshint.com/docs/options/
// i. e.
camelcase: true,
// jshint errors are displayed by default as warnings
// set emitErrors to true to display them as errors
emitErrors: false,
// jshint to not interrupt the compilation
// if you want any file with jshint errors to fail
// set failOnHint to true
failOnHint: false,
// custom reporter function
reporter: function(errors) { }
}
}
By default, jshint-loader will provide a default reporter.
However, if you prefer a custom reporter, pass a function under the reporter key in jshint options. (see usage above)
The reporter function will be passed an array of errors/warnings produced by jshint with the following structure:
[
{
id: [string, usually '(error)'],
code: [string, error/warning code],
reason: [string, error/warning message],
evidence: [string, a piece of code that generated this error]
line: [number]
character: [number]
scope: [string, message scope;
usually '(main)' unless the code was eval'ed]
[+ a few other legacy fields that you don't need to worry about.]
},
// ...
// more errors/warnings
]
The reporter function will be excuted with the loader context as this. You may emit messages using this.emitWarning(...) or this.emitError(...). See webpack docs on loader context.
Note: jshint reporters are not compatible with jshint-loader! This is due to the fact that reporter input is only processed from one file; not multiple files. Error reporting in this manner differs from tranditional reporters for jshint since the loader plugin (i.e. jshint-loader) is executed for each source file; and thus the reporter is executed for each file.
The output in webpack CLI will usually be:
...
WARNING in ./path/to/file.js
<reporter output>
...
`
|
Juho Vepsäläinen |
Joshua Wiens |
Kees Kluskens |
Sean Larkin |
FAQs
jshint loader module for webpack
The npm package jshint-loader receives a total of 1,424 weekly downloads. As such, jshint-loader popularity was classified as popular.
We found that jshint-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.