Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/oxlint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
"devDependencies": {
"@types/esquery": "^1.5.4",
"@types/estree": "^1.0.8",
"@types/json-stable-stringify-without-jsonify": "^1.0.2",
"@typescript-eslint/scope-manager": "8.46.2",
"@typescript-eslint/typescript-estree": "^8.47.0",
"cross-env": "catalog:",
"eslint": "^9.36.0",
"esquery": "^1.6.0",
"execa": "^9.6.0",
"jiti": "^2.6.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"oxc-parser": "^0.99.0",
"rolldown": "catalog:",
"tsdown": "catalog:",
Expand Down
25 changes: 25 additions & 0 deletions apps/oxlint/src-js/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// Functions and classes
export { definePlugin, defineRule } from "./package/define.js";
export { RuleTester } from "./package/rule_tester.js";

// ESTree types
export type * as ESTree from "./generated/types.d.ts";

// Plugin types
export type { Context, LanguageOptions } from "./plugins/context.ts";
export type { Fix, Fixer, FixFn } from "./plugins/fix.ts";
export type { CreateOnceRule, CreateRule, Plugin, Rule } from "./plugins/load.ts";
Expand Down Expand Up @@ -57,3 +62,23 @@ export type {
Visitor,
VisitorWithHooks,
} from "./plugins/types.ts";

// Rule tester types.
// Export as namespace to avoid lengthy type names.
import type {
Config as _Config,
DescribeFn as _DescribeFn,
ItFn as _ItFn,
ValidTestCase as _ValidTestCase,
InvalidTestCase as _InvalidTestCase,
TestCases as _TestCases,
} from "./package/rule_tester.ts";

export namespace RuleTester {
export type Config = _Config;
export type DescribeFn = _DescribeFn;
export type ItFn = _ItFn;
export type ValidTestCase = _ValidTestCase;
export type InvalidTestCase = _InvalidTestCase;
export type TestCases = _TestCases;
}
Loading
Loading