Notice: This package is no longer being maintained, as ESLint is prefered over JSHint for Webpack (especially since it can reference source files, not just line numbers). Please check that out instead, it's pretty awesome!
As a big fan of jshint-stylish, I really wanted to use it with a webpack-based build system. However, jshint-loader isn't compatible with normal reporters, so instead I forked jshint-stylish to create this! Error reporting resembles that of jshint, with a few slight differences due to what error data is returned from jshint-loader.
npm install --save-dev jshint-loader-stylish
// webpack.config.js
var stylishReporter = require('jshint-loader-stylish')({
// options...
});
module.exports = exports = {
module : {
preLoaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'jshint'
}],
},
jshint : {
reporter : stylishReporter
}
};
Since the regular jshint-stylish output doesn't work as well when errors can't be sorted by file, the default output has been adjusted slightly to give you a bit more information:
If you wish to enable the reporter that more closely adheres to vanilla jshint-stylish output, set the style
configuration property to "true-stylish".
require('jshint-loader-stylish')({
style : 'true-stylish'
});
Use the style
configuration to reference the name of the reporter style you wish to use. These can be found in jshint-loader-stylish/reporters
.
- Is there a way to get jshint-loader to reference file names?
Based on jshint-stylish by sindresorhus.
jshint-loader-stylish's People
jshint-loader-stylish's Issues
Routes return error: TypeError: Cannot read property 'forEach' of undefined
This happens for all my route, not sure why specifically only those....
./src/scripts/components/Application.js
Module build failed: TypeError: Cannot read property 'forEach' of undefined
at forEach (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader-stylish/node_modules/text-table/index.js:73:11)
at /Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader-stylish/node_modules/text-table/index.js:10:9
at Array.reduce (native)
at reduce (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader-stylish/node_modules/text-table/index.js:63:30)
at module.exports (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader-stylish/node_modules/text-table/index.js:9:20)
at Object.<anonymous> (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader-stylish/reporters/true-stylish.js:30:17)
at Object.jsHint (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader/index.js:110:13)
at Object.<anonymous> (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader/index.js:146:11)
at Object.<anonymous> (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader/index.js:37:12)
at respond (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader/node_modules/rcloader/index.js:68:7)
at respond (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader/node_modules/rcloader/node_modules/rcfinder/index.js:140:7)
at next (/Users/mmahalwy/Desktop/Code/quran.com/frontend/node_modules/jshint-loader/node_modules/rcloader/node_modules/rcfinder/index.js:167:16)
at process._tickCallback (node.js:355:11)
@ ./app.js 13:29-62
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.