webpack-contrib/eslint-loader is a JavaScript project with 1.1k stars in the Frontend space. [DEPRECATED] A ESlint loader for webpack
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
When using with transpiling loaders (like babel-loader), make sure they are in correct order (bottom to top). Otherwise files will be checked after being processed by babel-loader:
You can pass eslint options using standard webpack loader options.
Note: That the config option you provide will be passed to the CLIEngine. This is a different set of options than what you'd specify in package.json or .eslintrc. See the eslint docs for more detail.
cache
Type: Boolean|String
Default: false
This option will enable caching of the linting results into a file. This is particularly useful in reducing linting time when doing a full build.
This can either be a boolean value or the cache directory path(ex: './.eslint-loader-cache').
If cache: true is used, the cache is written to the ./node_modules/.cache/eslint-loader directory. This is the recommended usage.
Path to eslint instance that will be used for linting. If the eslintPath is a folder like a official eslint, or specify a formatter option. Now you dont have to install eslint.
This option accepts a function that will have one argument: an array of eslint messages (object). The function must return the output as a string. You can use official eslint formatters.
module.exports = {
entry: '...',
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
options: {
// several examples !
// default value
formatter: 'stylish',
// community formatter
formatter: require('eslint-friendly-formatter'),
// custom formatter
formatter: function (results) {
// `results` format is available here
// http://eslint.org/docs/developer-guide/nodejs-api.html#executeonfiles()
// you should return a string
// DO NOT USE console.*() directly !
return 'OUTPUT';
},
},
},
],
},
};
Errors and Warning
By default the loader will auto adjust error reporting depending on eslint errors/warnings counts. You can still force this behavior by using emitErrororemitWarning options:
emitError
Type: Boolean
Default: false
Will always return errors, if this option is set to true.
Will always return warnings, if option is set to true. If you're using hot module replacement, you may wish to enable this in development, or else updates will be skipped when there's an eslint error.
Write the output of the errors to a file, for example a checkstyle xml file for use for reporting on Jenkins CI.
The filePath is an absolute path or relative to the webpack config: output.path. You can pass in a different formatter for the output file, if none is passed in the default/configured formatter will be used.
NoEmitOnErrorsPlugin is now automatically enabled in webpack 4, when mode is either unset, or set to production. So even ESLint warnings will fail the build. No matter what error settings are used for eslint-loader, except if emitWarning enabled.
Defining configFile or using eslint -c path/.eslintrc
Bear in mind that when you define configFile, eslint doesn't automatically look for .eslintrc files in the directory of the file to be linted. More information is available in official eslint documentation in section Using Configuration Files. See #129.
Does webpack-contrib/eslint-loader have a project website?
No homepage URL was recorded for webpack-contrib/eslint-loader in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on webpack-contrib/eslint-loader?
The most recent commit recorded on webpack-contrib/eslint-loader was 6.2 years ago, based on the GitHub push timestamp. The repository has 120 forks — one of the better signals of community interest.
Is webpack-contrib/eslint-loader open source?
Yes — webpack-contrib/eslint-loader ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/webpack-contrib/eslint-loader.
What license does webpack-contrib/eslint-loader use?
webpack-contrib/eslint-loader is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is webpack-contrib/eslint-loader associated with?
GitHub's repository topics for webpack-contrib/eslint-loader: "javascript", "loader", "webpack". TopGit's editorial category is Frontend.
Where do I read more about webpack-contrib/eslint-loader?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/webpack-contrib/eslint-loader is the definitive source.
Read full README in the tab above.
Want a second opinion on eslint-loader?
Ask an AI that can read this page — one click and you get its take on eslint-loader.