Skip to content

fix: correct overrideConfigFile type #19289

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

Merged
merged 1 commit into from
Dec 29, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ export namespace ESLint {
allowInlineConfig?: boolean | undefined;
baseConfig?: Linter.Config | Linter.Config[] | null | undefined;
overrideConfig?: Linter.Config | Linter.Config[] | null | undefined;
overrideConfigFile?: string | boolean | undefined;
overrideConfigFile?: string | true | null | undefined;
plugins?: Record<string, Plugin> | null | undefined;
ruleFilter?: ((arg: { ruleId: string; severity: Exclude<Linter.Severity, 0> }) => boolean) | undefined;
stats?: boolean | undefined;
Expand Down
10 changes: 8 additions & 2 deletions tests/lib/types/types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,6 @@ linterWithEslintrcConfig.getRules();
eslint = new ESLint();
eslint = new ESLint({ allowInlineConfig: false });
eslint = new ESLint({ baseConfig: {} });
eslint = new ESLint({ overrideConfig: {} });
eslint = new ESLint({ overrideConfigFile: "foo" });
eslint = new ESLint({ cache: true });
eslint = new ESLint({ cacheLocation: "foo" });
eslint = new ESLint({ cacheStrategy: "content" });
Expand All @@ -941,6 +939,14 @@ linterWithEslintrcConfig.getRules();
eslint = new ESLint({ globInputPaths: true });
eslint = new ESLint({ ignore: true });
eslint = new ESLint({ ignorePatterns: ["foo", "bar"] });
eslint = new ESLint({ overrideConfig: {} });

eslint = new ESLint({ overrideConfigFile: "foo" });
eslint = new ESLint({ overrideConfigFile: true });
eslint = new ESLint({ overrideConfigFile: null });
// @ts-expect-error `overrideConfigFile` cannot be `false`
eslint = new ESLint({ overrideConfigFile: false });

eslint = new ESLint({ plugins: { foo: {} } });
eslint = new ESLint({
ruleFilter({ severity }) {
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy