Installations
npm install eslint-loader-fs-cache
Developer Guide
Typescript
No
Module System
N/A
Node Version
6.9.5
NPM Version
4.3.0
Score
44.3
Supply Chain
85.1
Quality
68.4
Maintenance
50
Vulnerability
96.8
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
viankakrisna
Download Statistics
Total Downloads
1,608
Last Day
2
Last Week
3
Last Month
17
Last Year
88
GitHub Statistics
MIT License
136 Commits
1 Forks
2 Watchers
4 Branches
1 Contributors
Updated on Feb 17, 2017
Bundle Size
119.28 kB
Minified
36.20 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.6.7
Package Id
eslint-loader-fs-cache@1.6.7
Size
5.93 kB
NPM Version
4.3.0
Node Version
6.9.5
Published on
Mar 09, 2017
Total Downloads
Cumulative downloads
Total Downloads
1,608
Last Day
0%
2
Compared to previous day
Last Week
-57.1%
3
Compared to previous week
Last Month
466.7%
17
Compared to previous month
Last Year
-9.3%
88
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
1
Dev Dependencies
5
eslint-loader 
eslint loader for webpack
Install
1$ npm install eslint-loader --save-dev
Usage
In your webpack configuration
1module.exports = { 2 // ... 3 module: { 4 rules: [ 5 { 6 test: /\.js$/, 7 exclude: /node_modules/, 8 loader: "eslint-loader", 9 options: { 10 // eslint options (if necessary) 11 } 12 }, 13 ], 14 }, 15 // ... 16}
When using with transpiling loaders (like babel-loader
), make sure they are in correct order
(bottom to top). Otherwise files will be check after being processed by babel-loader
1module.exports = { 2 // ... 3 module: { 4 rules: [ 5 { 6 test: /\.js$/, 7 exclude: /node_modules/, 8 use: [ 9 "babel-loader", 10 "eslint-loader", 11 ], 12 }, 13 ], 14 }, 15 // ... 16}
To be safe, you can use enforce: "pre"
section to check source files, not modified
by other loaders (like babel-loader
)
1module.exports = { 2 // ... 3 module: { 4 rules: [ 5 { 6 enforce: "pre", 7 test: /\.js$/, 8 exclude: /node_modules/, 9 loader: "eslint-loader", 10 }, 11 { 12 test: /\.js$/, 13 exclude: /node_modules/, 14 loader: "babel-loader", 15 }, 16 ], 17 }, 18 // ... 19}
Options
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.
fix
(default: false)
This option will enable ESLint autofix feature.
Be careful: this option might cause webpack to enter an infinite build loop if some issues cannot be fixed properly.
cache
(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.
The cache file is written to the ./node_modules/.cache
directory, thanks to the usage
of the find-cache-dir module.
formatter
(default: eslint stylish formatter)
Loader 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.
1module.exports = { 2 entry: "...", 3 module: { 4 rules: [ 5 { 6 test: /\.js$/, 7 exclude: /node_modules/, 8 loader: "eslint-loader", 9 options: { 10 // several examples ! 11 12 // default value 13 formatter: require("eslint/lib/formatters/stylish"), 14 15 // community formatter 16 formatter: require("eslint-friendly-formatter"), 17 18 // custom formatter 19 formatter: function(results) { 20 // `results` format is available here 21 // http://eslint.org/docs/developer-guide/nodejs-api.html#executeonfiles() 22 23 // you should return a string 24 // DO NOT USE console.*() directly ! 25 return "OUTPUT" 26 } 27 } 28 }, 29 ], 30 }, 31}
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 emitError
or emitWarning
options:
emitError
(default: false
)
Loader will always return errors if this option is set to true
.
1module.exports = { 2 entry: "...", 3 module: { 4 rules: [ 5 { 6 test: /\.js$/, 7 exclude: /node_modules/, 8 loader: "eslint-loader", 9 options: { 10 emitError: true, 11 } 12 }, 13 ], 14 }, 15}
emitWarning
(default: false
)
Loader will always return warnings if option is set to true
.
quiet
(default: false
)
Loader will process and report errors only and ignore warnings if this option is set to true
1module.exports = { 2 entry: "...", 3 module: { 4 rules: [ 5 { 6 test: /\.js$/, 7 exclude: /node_modules/, 8 loader: "eslint-loader", 9 options: { 10 quiet: true, 11 } 12 }, 13 ], 14 }, 15}
failOnWarning
(default: false
)
Loader will cause the module build to fail if there are any eslint warnings.
1module.exports = { 2 entry: "...", 3 module: { 4 rules: [ 5 { 6 test: /\.js$/, 7 exclude: /node_modules/, 8 loader: "eslint-loader", 9 options: { 10 failOnWarning: true, 11 } 12 }, 13 ], 14 }, 15}
failOnError
(default: false
)
Loader will cause the module build to fail if there are any eslint errors.
1module.exports = { 2 entry: "...", 3 module: { 4 rules: [ 5 { 6 test: /\.js$/, 7 exclude: /node_modules/, 8 loader: "eslint-loader", 9 options: { 10 failOnError: true, 11 } 12 }, 13 ], 14 }, 15}
outputReport
(default: false
)
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 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
1module.exports = { 2 entry: "...", 3 module: { 4 rules: [ 5 { 6 test: /\.js$/, 7 exclude: /node_modules/, 8 loader: "eslint-loader", 9 options: { 10 outputReport: { 11 filePath: 'checkstyle.xml', 12 formatter: require('eslint/lib/formatters/checkstyle') 13 } 14 } 15 }, 16 ], 17 }, 18}
Gotchas
NoErrorsPlugin
NoErrorsPlugin
prevents Webpack from outputting anything into a bundle. So even ESLint warnings
will fail the build. No matter what error settings are used for eslint-loader
.
So if you want to see ESLint warnings in console during development using WebpackDevServer
remove NoErrorsPlugin
from webpack config.
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.
Changelog
License

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
78 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-832h-xg76-4gv6
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-hr2v-3952-633q
- Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2
- Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q
- Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq
- Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-8g7p-74h8-hg48
- Warn: Project is vulnerable to: GHSA-pc5p-h8pf-mvwp
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-4hpf-3wq7-5rpr
- Warn: Project is vulnerable to: GHSA-f522-ffg8-j8r6
- Warn: Project is vulnerable to: GHSA-p9w8-2mpq-49h9
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-wrvr-8mpx-r7pp
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f
- Warn: Project is vulnerable to: GHSA-gqgv-6jq5-jjj9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
- Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3
- Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-xc7v-wxcw-j472
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.7
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to eslint-loader-fs-cache
@npmteam2024/nesciunt-tempore-occaecati
A simple cache system for a single user request, built on the same concepts of [data loader](https://github.com/facebook/dataloader).
@wemnyelezxnpm/nemo-accusamus-magnam
A simple cache system for a single user request, built on the same concepts of [data loader](https://github.com/facebook/dataloader).