This repository was archived by the owner on Mar 7, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathindex.ts
54 lines (49 loc) · 1.6 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import type { ESLintConfig } from './config';
import type { FlatESLintConfig } from './flat-config';
import type { Rules as AllRules } from './rules';
import type { RuleConfig } from './rules/rule-config';
/**
* Define an ESLint config.
*
* @param config ESLint config.
* @returns ESLint config.
*/
export function defineConfig<
Rules extends Record<string, RuleConfig> = AllRules,
Strict extends boolean = false,
>(config: ESLintConfig<Rules, Strict>): ESLintConfig {
return config;
}
/**
* Define an item of Flat ESLint config.
*
* @see [Configuration Files (New)](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new)
*
* @param config an item of Flat ESLint config.
* @returns an item of Flat ESLint config.
*/
export function defineFlatConfig<
Rules extends Record<string, RuleConfig> = AllRules,
Strict extends boolean = false,
>(config: FlatESLintConfig<Rules, Strict>): FlatESLintConfig<Rules, Strict>;
/**
* Define a flat ESLint config.
*
* @see [Configuration Files (New)](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new)
*
* @param config Flat ESLint config.
* @returns Flat ESLint config.
*/
export function defineFlatConfig<
Rules extends Record<string, RuleConfig> = AllRules,
Strict extends boolean = false,
>(
config: ReadonlyArray<FlatESLintConfig<Rules, Strict>>,
): Array<FlatESLintConfig<Rules, Strict>>;
export function defineFlatConfig(config: unknown): unknown {
return config;
}
export type * from './config';
export type * from './flat-config';
export type * from './parser-options';
export type * from './rules';