diff --git a/README.md b/README.md index 9297212..57d826a 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,30 @@ You can pass [eslint options](https://eslint.org/docs/developer-guide/nodejs-api > > In eslint-webpack-plugin version 1 the options were passed to the now deprecated [CLIEngine](https://eslint.org/docs/developer-guide/nodejs-api#cliengine). +### `cache` + +- Type: + +```ts +type cache = boolean; +``` + +- Default: `true` + +The cache is enabled by default to decrease execution time. + +### `cacheLocation` + +- Type: + +```ts +type cacheLocation = string; +``` + +- Default: `node_modules/.cache/eslint-webpack-plugin/.eslintcache` + +Specify the path to the cache location. Can be a file or a directory. + ### `context` - Type: diff --git a/src/options.js b/src/options.js index aac1d1b..4d1fce6 100644 --- a/src/options.js +++ b/src/options.js @@ -47,6 +47,8 @@ const schema = require('./options.json'); */ function getOptions(pluginOptions) { const options = { + cache: true, + cacheLocation: 'node_modules/.cache/eslint-webpack-plugin/.eslintcache', extensions: 'js', emitError: true, emitWarning: true,