diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index cc59b80907179d..08b71375ce100a 100644 --- a/types/eslint/eslint-tests.ts +++ b/types/eslint/eslint-tests.ts @@ -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"] }); @@ -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"] }); diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index d3140186fc00b8..c3d2bcecd57936 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -842,6 +842,7 @@ export namespace ESLint { // Cache-related cache?: boolean; cacheLocation?: string; + cacheStrategy?: "content" | "metadata"; } interface LintResult { @@ -916,6 +917,7 @@ export namespace CLIEngine { cache?: boolean; cacheFile?: string; cacheLocation?: string; + cacheStrategy?: "content" | "metadata"; configFile?: string; cwd?: string; envs?: string[];