/
index.ts
50 lines (46 loc) · 1.3 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
import { ESLintUtils } from '@typescript-eslint/experimental-utils';
import { ESLintTypeUtils } from '@typescript-eslint/type-utils';
export * from './astUtils';
export * from './collectUnusedVariables';
export * from './createRule';
export * from './getFunctionHeadLoc';
export * from './getThisExpression';
export * from './getWrappingFixer';
export * from './misc';
export * from './objectIterators';
export * from './requiresQuoting';
export * from './types';
// this is done for convenience - saves migrating all of the old rules
const {
applyDefault,
deepMerge,
isObjectNotArray,
getParserServices,
nullThrows,
NullThrowsReasons,
} = ESLintUtils;
type InferMessageIdsTypeFromRule<T> =
ESLintUtils.InferMessageIdsTypeFromRule<T>;
type InferOptionsTypeFromRule<T> = ESLintUtils.InferOptionsTypeFromRule<T>;
const {
getTypeOfPropertyOfName,
isTypeReadonly,
readonlynessOptionsSchema,
readonlynessOptionsDefaults,
} = ESLintTypeUtils;
type ReadonlynessOptions = ESLintTypeUtils.ReadonlynessOptions;
export {
applyDefault,
deepMerge,
isObjectNotArray,
getParserServices,
getTypeOfPropertyOfName,
isTypeReadonly,
nullThrows,
readonlynessOptionsDefaults,
readonlynessOptionsSchema,
InferMessageIdsTypeFromRule,
InferOptionsTypeFromRule,
NullThrowsReasons,
ReadonlynessOptions,
};