Skip to content

Commit f6b4b66

Browse files
perf: enable cache by default (#213)
* perf: enable cache by default * chore: update lock file * fix: update `cacheLocation`
1 parent e623766 commit f6b4b66

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,30 @@ You can pass [eslint options](https://eslint.org/docs/developer-guide/nodejs-api
8282
>
8383
> In eslint-webpack-plugin version 1 the options were passed to the now deprecated [CLIEngine](https://eslint.org/docs/developer-guide/nodejs-api#cliengine).
8484
85+
### `cache`
86+
87+
- Type:
88+
89+
```ts
90+
type cache = boolean;
91+
```
92+
93+
- Default: `true`
94+
95+
The cache is enabled by default to decrease execution time.
96+
97+
### `cacheLocation`
98+
99+
- Type:
100+
101+
```ts
102+
type cacheLocation = string;
103+
```
104+
105+
- Default: `node_modules/.cache/eslint-webpack-plugin/.eslintcache`
106+
107+
Specify the path to the cache location. Can be a file or a directory.
108+
85109
### `context`
86110

87111
- Type:

src/options.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ const schema = require('./options.json');
4747
*/
4848
function getOptions(pluginOptions) {
4949
const options = {
50+
cache: true,
51+
cacheLocation: 'node_modules/.cache/eslint-webpack-plugin/.eslintcache',
5052
extensions: 'js',
5153
emitError: true,
5254
emitWarning: true,

0 commit comments

Comments
 (0)