|
| 1 | +// Functions and classes |
1 | 2 | export { definePlugin, defineRule } from "./package/define.js"; |
| 3 | +export { RuleTester } from "./package/rule_tester.js"; |
2 | 4 |
|
| 5 | +// ESTree types |
3 | 6 | export type * as ESTree from "./generated/types.d.ts"; |
| 7 | + |
| 8 | +// Plugin types |
4 | 9 | export type { Context, LanguageOptions } from "./plugins/context.ts"; |
5 | 10 | export type { Fix, Fixer, FixFn } from "./plugins/fix.ts"; |
6 | 11 | export type { CreateOnceRule, CreateRule, Plugin, Rule } from "./plugins/load.ts"; |
@@ -57,3 +62,23 @@ export type { |
57 | 62 | Visitor, |
58 | 63 | VisitorWithHooks, |
59 | 64 | } from "./plugins/types.ts"; |
| 65 | + |
| 66 | +// Rule tester types. |
| 67 | +// Export as namespace to avoid lengthy type names. |
| 68 | +import type { |
| 69 | + Config as _Config, |
| 70 | + DescribeFn as _DescribeFn, |
| 71 | + ItFn as _ItFn, |
| 72 | + ValidTestCase as _ValidTestCase, |
| 73 | + InvalidTestCase as _InvalidTestCase, |
| 74 | + TestCases as _TestCases, |
| 75 | +} from "./package/rule_tester.ts"; |
| 76 | + |
| 77 | +export namespace RuleTester { |
| 78 | + export type Config = _Config; |
| 79 | + export type DescribeFn = _DescribeFn; |
| 80 | + export type ItFn = _ItFn; |
| 81 | + export type ValidTestCase = _ValidTestCase; |
| 82 | + export type InvalidTestCase = _InvalidTestCase; |
| 83 | + export type TestCases = _TestCases; |
| 84 | +} |
0 commit comments