From 46a90f2cf528d97a9308ccdf5d090d78759c8740 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Fri, 28 May 2021 21:42:12 -0300 Subject: [PATCH 1/3] [eslint] add `cacheStategy` option --- types/eslint/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index d3140186fc00b8..c0479ca34ce976 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 { From bcb2e0851b843655d165c7904beee762f2abd79f Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Fri, 28 May 2021 21:44:40 -0300 Subject: [PATCH 2/3] [eslint] add tests for `cacheStrategy` option --- types/eslint/eslint-tests.ts | 2 ++ 1 file changed, 2 insertions(+) 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"] }); From afc4a0b822bde69628b8689b498b3b9832607fe2 Mon Sep 17 00:00:00 2001 From: Rafael Santana Date: Fri, 28 May 2021 21:56:49 -0300 Subject: [PATCH 3/3] fixup! [eslint] add cacheStategy option --- types/eslint/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index c0479ca34ce976..c3d2bcecd57936 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -917,6 +917,7 @@ export namespace CLIEngine { cache?: boolean; cacheFile?: string; cacheLocation?: string; + cacheStrategy?: "content" | "metadata"; configFile?: string; cwd?: string; envs?: string[];