Skip to content

Commit

Permalink
馃 Merge PR #53485 [eslint] add cacheStategy option by @rafaelss95
Browse files Browse the repository at this point in the history
* [eslint] add `cacheStategy` option

* [eslint] add tests for `cacheStrategy` option

* fixup! [eslint] add cacheStategy option
  • Loading branch information
rafaelss95 committed Jun 1, 2021
1 parent bc73577 commit c0feb58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/eslint/eslint-tests.ts
Expand Up @@ -633,6 +633,7 @@ eslint = new ESLint({ overrideConfig: {} });
eslint = new ESLint({ overrideConfigFile: "foo" });
eslint = new ESLint({ cache: true });
eslint = new ESLint({ cacheLocation: "foo" });
eslint = new ESLint({ cacheStrategy: "content" });
eslint = new ESLint({ cwd: "foo" });
eslint = new ESLint({ errorOnUnmatchedPattern: true });
eslint = new ESLint({ extensions: ["js"] });
Expand Down Expand Up @@ -734,6 +735,7 @@ cli = new CLIEngine({ baseConfig: false });
cli = new CLIEngine({ baseConfig: { extends: ["lynt"] } });
cli = new CLIEngine({ cache: true });
cli = new CLIEngine({ cacheFile: "foo" });
cli = new CLIEngine({ cacheStrategy: "content" });
cli = new CLIEngine({ configFile: "foo" });
cli = new CLIEngine({ cwd: "foo" });
cli = new CLIEngine({ envs: ["browser"] });
Expand Down
2 changes: 2 additions & 0 deletions types/eslint/index.d.ts
Expand Up @@ -842,6 +842,7 @@ export namespace ESLint {
// Cache-related
cache?: boolean;
cacheLocation?: string;
cacheStrategy?: "content" | "metadata";
}

interface LintResult {
Expand Down Expand Up @@ -916,6 +917,7 @@ export namespace CLIEngine {
cache?: boolean;
cacheFile?: string;
cacheLocation?: string;
cacheStrategy?: "content" | "metadata";
configFile?: string;
cwd?: string;
envs?: string[];
Expand Down

0 comments on commit c0feb58

Please sign in to comment.