Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04e394c

Browse files
committed
feat(linter/plugins): introduceRuleTester
1 parent832983a commit04e394c

File tree

4 files changed

+536
-2
lines changed

4 files changed

+536
-2
lines changed

‎apps/oxlint/src-js/index.ts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
// Functions and classes
12
export{definePlugin,defineRule}from"./package/define.js";
3+
export{RuleTester}from"./package/rule_tester.js";
24

5+
// ESTree types
36
exporttype*asESTreefrom"./generated/types.d.ts";
7+
8+
// Plugin types
49
exporttype{Context,LanguageOptions}from"./plugins/context.ts";
510
exporttype{Fix,Fixer,FixFn}from"./plugins/fix.ts";
611
exporttype{CreateOnceRule,CreateRule,Plugin,Rule}from"./plugins/load.ts";
@@ -57,3 +62,23 @@ export type {
5762
Visitor,
5863
VisitorWithHooks,
5964
}from"./plugins/types.ts";
65+
66+
// Rule tester types.
67+
// Export as namespace to avoid lengthy type names.
68+
importtype{
69+
Configas_Config,
70+
DescribeFnas_DescribeFn,
71+
ItFnas_ItFn,
72+
ValidTestCaseas_ValidTestCase,
73+
InvalidTestCaseas_InvalidTestCase,
74+
TestCasesas_TestCases,
75+
}from"./package/rule_tester.ts";
76+
77+
exportnamespaceRuleTester{
78+
exporttypeConfig=_Config;
79+
exporttypeDescribeFn=_DescribeFn;
80+
exporttypeItFn=_ItFn;
81+
exporttypeValidTestCase=_ValidTestCase;
82+
exporttypeInvalidTestCase=_InvalidTestCase;
83+
exporttypeTestCases=_TestCases;
84+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp