Skip to content

Commit 510153b

Browse files
authored
fix(utils): remove function form type from flat config files and ignores (typescript-eslint#9111)
1 parent 165d8f7 commit 510153b

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

packages/utils/src/ts-eslint/Config.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,6 @@ export namespace FlatConfig {
232232
sourceType?: SourceType;
233233
}
234234

235-
// The function form is undocumented but allowed:
236-
// https://github.com/eslint/eslint/issues/18118
237-
//
238-
// We have to support it as well because the DefinitelyTyped configs define it
239-
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e26919eb3426f5ba85fed394c90c39efb217037a/types/eslint/index.d.ts#L1208-L1223
240-
//
241-
// If we don't then users can't use shareable configs defined using the DT types
242-
// https://github.com/typescript-eslint/typescript-eslint/issues/8467
243-
export type FileSpec = string | ((filePath: string) => boolean);
244-
245235
// it's not a json schema so it's nowhere near as nice to read and convert...
246236
// https://github.com/eslint/eslint/blob/v8.45.0/lib/config/flat-config-schema.js
247237
export interface Config {
@@ -254,15 +244,15 @@ export namespace FlatConfig {
254244
* If not specified, the configuration object applies to all files matched by any other configuration object.
255245
*/
256246
files?: (
257-
| FileSpec
247+
| string
258248
// yes, a single layer of array nesting is supported
259-
| FileSpec[]
249+
| string[]
260250
)[];
261251
/**
262252
* An array of glob patterns indicating the files that the configuration object should not apply to.
263253
* If not specified, the configuration object applies to all files matched by files.
264254
*/
265-
ignores?: FileSpec[];
255+
ignores?: string[];
266256
/**
267257
* An object containing settings related to how JavaScript is configured for linting.
268258
*/

0 commit comments

Comments
 (0)
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