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

Diff for: packages/utils/src/ts-eslint/Config.ts

+3-13
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)