Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eslint] add cacheStategy option #53485

Merged
merged 3 commits into from Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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