Skip to content

Commit

Permalink
perf: enable cache by default (#213)
Browse files Browse the repository at this point in the history
* perf: enable cache by default

* chore: update lock file

* fix: update `cacheLocation`
  • Loading branch information
ricardogobbosouza authored Apr 10, 2023
1 parent e623766 commit f6b4b66
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f6b4b66

Please sign in to comment.