forked from jonathancaleb/enoflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.d.ts
77 lines (64 loc) · 2 KB
/
eslint.d.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* Since ESLint and many plugins are written in JavaScript, we need to provide
* or change some types to make them work with TypeScript.
*/
// From: https://github.com/t3-oss/create-t3-turbo/blob/main/tooling/eslint/types.d.ts
declare module '@eslint/js' {
import type { Linter } from 'eslint';
export const configs: {
readonly recommended: { readonly rules: Readonly<Linter.RulesRecord> };
readonly all: { readonly rules: Readonly<Linter.RulesRecord> };
};
}
declare module '@eslint-community/eslint-plugin-eslint-comments/configs' {
import type { Linter } from 'eslint';
export const recommended: {
rules: Linter.RulesRecord;
};
}
declare module '@eslint/eslintrc' {
import type { Linter } from 'eslint';
export class FlatCompat {
constructor({
baseDirectory,
resolvePluginsRelativeTo,
}: {
baseDirectory: string;
resolvePluginsRelativeTo: string;
});
extends(extendsValue: string): Linter.Config & {
[Symbol.iterator]: () => IterableIterator<Linter.Config>;
};
}
}
declare module '@eslint/compat' {
import type { Linter } from 'eslint';
import type { ConfigWithExtends } from 'typescript-eslint';
export const fixupConfigRules: (
config: string | Linter.Config,
) => ConfigWithExtends[];
}
declare module 'eslint-plugin-regexp' {
import type { Linter } from 'eslint';
import type { ConfigWithExtends } from 'typescript-eslint';
export const configs: {
'flat/recommended': {
[Symbol.iterator]: () => IterableIterator<ConfigWithExtends>;
rules: Linter.RulesRecord;
};
'flat/all': {
[Symbol.iterator]: () => IterableIterator<ConfigWithExtends>;
rules: Linter.RulesRecord;
};
};
}
declare module 'eslint-plugin-security' {
import type { Linter } from 'eslint';
import type { ConfigWithExtends } from 'typescript-eslint';
export const configs: {
recommended: {
[Symbol.iterator]: () => IterableIterator<ConfigWithExtends>;
rules: Linter.RulesRecord;
};
};
}