@rrlab/oxc-plugin 1.0.0 → 1.0.1-git-908d2c0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +3 -6
- package/package.json +4 -4
- package/src/index.ts +7 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormatOptions, Formatter, InstallContext, InstallResult, LintOptions, Linter, ToolService, TypeCheckOptions, TypeChecker, UninstallContext, UninstallResult } from "@rrlab/cli/plugin";
|
|
1
|
+
import { FormatOptions, Formatter, InstallContext, InstallResult, LintOptions, Linter, RunReport, ToolService, TypeCheckOptions, TypeChecker, UninstallContext, UninstallResult } from "@rrlab/cli/plugin";
|
|
2
2
|
import { ShellService } from "@vlandoss/clibuddy";
|
|
3
3
|
|
|
4
4
|
//#region src/tool-versions.d.ts
|
|
@@ -17,15 +17,15 @@ declare const TOOL_VERSIONS: {
|
|
|
17
17
|
//#region src/index.d.ts
|
|
18
18
|
declare class OxlintService extends ToolService implements Linter {
|
|
19
19
|
constructor(shellService: ShellService);
|
|
20
|
-
lint(options: LintOptions): Promise<
|
|
20
|
+
lint(options: LintOptions): Promise<RunReport>;
|
|
21
21
|
}
|
|
22
22
|
declare class OxfmtService extends ToolService implements Formatter {
|
|
23
23
|
constructor(shellService: ShellService);
|
|
24
|
-
format(options: FormatOptions): Promise<
|
|
24
|
+
format(options: FormatOptions): Promise<RunReport>;
|
|
25
25
|
}
|
|
26
26
|
declare class OxlintTypeCheckService extends ToolService implements TypeChecker {
|
|
27
27
|
constructor(shellService: ShellService);
|
|
28
|
-
check(options?: TypeCheckOptions): Promise<
|
|
28
|
+
check(options?: TypeCheckOptions): Promise<RunReport>;
|
|
29
29
|
}
|
|
30
30
|
declare function install(_ctx: InstallContext): Promise<InstallResult>;
|
|
31
31
|
declare function uninstall(_ctx: UninstallContext): Promise<UninstallResult>;
|
package/dist/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ var OxlintService = class extends ToolService {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
async lint(options) {
|
|
25
|
-
|
|
25
|
+
return this.runReport(["--report-unused-disable-directives", options.fix ? "--fix" : "--check"]);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
var OxfmtService = class extends ToolService {
|
|
@@ -35,7 +35,7 @@ var OxfmtService = class extends ToolService {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
async format(options) {
|
|
38
|
-
|
|
38
|
+
return this.runReport(["--no-error-on-unmatched-pattern", options.fix ? "--fix" : "--check"]);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
var OxlintTypeCheckService = class extends ToolService {
|
|
@@ -48,10 +48,7 @@ var OxlintTypeCheckService = class extends ToolService {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
async check(options = {}) {
|
|
51
|
-
|
|
52
|
-
cwd: options.cwd,
|
|
53
|
-
verbose: !options.cwd
|
|
54
|
-
});
|
|
51
|
+
return this.runReport(["--type-aware", "--type-check"], { cwd: options.cwd });
|
|
55
52
|
}
|
|
56
53
|
};
|
|
57
54
|
async function install(_ctx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rrlab/oxc-plugin",
|
|
3
|
-
"version": "1.0.0",
|
|
3
|
+
"version": "1.0.1-git-908d2c0.0",
|
|
4
4
|
"description": "oxc plugin for @rrlab/cli — provides lint (oxlint) and format (oxfmt) capabilities.",
|
|
5
5
|
"homepage": "https://github.com/variableland/dx/tree/main/run-run/oxc-plugin#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"node": ">=20.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@vlandoss/clibuddy": "0.6.
|
|
36
|
+
"@vlandoss/clibuddy": "0.6.2-git-908d2c0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"oxfmt": ">=0.30.0",
|
|
40
40
|
"oxlint": ">=1.0.0",
|
|
41
41
|
"oxlint-tsgolint": ">=0.15.0",
|
|
42
|
-
"@rrlab/cli": "^1.0.0"
|
|
42
|
+
"@rrlab/cli": "^1.0.1-git-908d2c0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"oxlint-tsgolint": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"oxlint": "1.66.0",
|
|
53
53
|
"oxlint-tsgolint": "0.23.0",
|
|
54
54
|
"semver": "^7.8.1",
|
|
55
|
-
"@rrlab/cli": "1.0.0",
|
|
55
|
+
"@rrlab/cli": "1.0.1-git-908d2c0.0",
|
|
56
56
|
"@rrlab/tsdown-config": "^0.1.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
type InstallResult,
|
|
7
7
|
type Linter,
|
|
8
8
|
type LintOptions,
|
|
9
|
+
type RunReport,
|
|
9
10
|
ToolService,
|
|
10
11
|
type TypeChecker,
|
|
11
12
|
type TypeCheckOptions,
|
|
@@ -27,8 +28,8 @@ export class OxlintService extends ToolService implements Linter {
|
|
|
27
28
|
super({ pkg: "oxlint", ui: UI_LINT, shellService, from: FROM });
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
async lint(options: LintOptions) {
|
|
31
|
-
|
|
31
|
+
async lint(options: LintOptions): Promise<RunReport> {
|
|
32
|
+
return this.runReport(["--report-unused-disable-directives", options.fix ? "--fix" : "--check"]);
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -37,8 +38,8 @@ export class OxfmtService extends ToolService implements Formatter {
|
|
|
37
38
|
super({ pkg: "oxfmt", ui: UI_FMT, shellService, from: FROM });
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
async format(options: FormatOptions) {
|
|
41
|
-
|
|
41
|
+
async format(options: FormatOptions): Promise<RunReport> {
|
|
42
|
+
return this.runReport(["--no-error-on-unmatched-pattern", options.fix ? "--fix" : "--check"]);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -47,8 +48,8 @@ export class OxlintTypeCheckService extends ToolService implements TypeChecker {
|
|
|
47
48
|
super({ pkg: "oxlint", ui: UI_LINT, shellService, from: FROM });
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
async check(options: TypeCheckOptions = {}): Promise<
|
|
51
|
-
|
|
51
|
+
async check(options: TypeCheckOptions = {}): Promise<RunReport> {
|
|
52
|
+
return this.runReport(["--type-aware", "--type-check"], { cwd: options.cwd });
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
|