diff --git a/lib/types/index.d.ts b/lib/types/index.d.ts index 1576548f5d25..b86ac2caae93 100644 --- a/lib/types/index.d.ts +++ b/lib/types/index.d.ts @@ -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 | null | undefined; ruleFilter?: ((arg: { ruleId: string; severity: Exclude }) => boolean) | undefined; stats?: boolean | undefined; diff --git a/tests/lib/types/types.test.ts b/tests/lib/types/types.test.ts index 5ece3df0a5a4..bc4d268beea6 100644 --- a/tests/lib/types/types.test.ts +++ b/tests/lib/types/types.test.ts @@ -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" }); @@ -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 }) { 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