Scaffold oxlint plugin with initial rule (#2603)
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
25b02f4ba2
commit
825263b6f9
86 files changed
+1116
-434
No files matched your search
@@ -44,6 +44,7 @@ export class BitbucketApiError extends Schema.TaggedErrorClass<BitbucketApiError
|
||||
return `Bitbucket API failed in ${this.operation}: ${this.detail}`;
|
||||
}
|
||||
}
|
||||
const isBitbucketApiErrorValue = Schema.is(BitbucketApiError);
|
||||
|
||||
const RawBitbucketRepositorySchema = Schema.Struct({
|
||||
full_name: TrimmedNonEmptyString,
|
||||
@@ -350,7 +351,7 @@ function requestError(operation: string, cause: unknown): BitbucketApiError {
|
||||
}
|
||||
|
||||
function isBitbucketApiError(cause: unknown): cause is BitbucketApiError {
|
||||
return Schema.is(BitbucketApiError)(cause);
|
||||
return isBitbucketApiErrorValue(cause);
|
||||
}
|
||||
|
||||
function responseError(
|
||||
|
||||
@@ -13,6 +13,7 @@ import * as GitHubCli from "./GitHubCli.ts";
|
||||
import * as GitHubPullRequests from "./gitHubPullRequests.ts";
|
||||
import * as SourceControlProvider from "./SourceControlProvider.ts";
|
||||
import * as SourceControlProviderDiscovery from "./SourceControlProviderDiscovery.ts";
|
||||
const isSourceControlProviderError = Schema.is(SourceControlProviderError);
|
||||
|
||||
function providerError(
|
||||
operation: string,
|
||||
@@ -153,7 +154,7 @@ export const make = Effect.fn("makeGitHubSourceControlProvider")(function* () {
|
||||
);
|
||||
}),
|
||||
Effect.mapError((error) =>
|
||||
Schema.is(SourceControlProviderError)(error)
|
||||
isSourceControlProviderError(error)
|
||||
? error
|
||||
: providerError("listChangeRequests", error),
|
||||
),
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
import { ServerConfig } from "../config.ts";
|
||||
import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
|
||||
import * as SourceControlProviderRegistry from "./SourceControlProviderRegistry.ts";
|
||||
const isSourceControlRepositoryError = Schema.is(SourceControlRepositoryError);
|
||||
|
||||
export interface SourceControlRepositoryServiceShape {
|
||||
readonly lookupRepository: (
|
||||
@@ -69,7 +70,7 @@ function repositoryError(input: {
|
||||
|
||||
function mapRepositoryError(operation: string, provider: SourceControlProviderKind) {
|
||||
return Effect.mapError((cause: unknown) =>
|
||||
Schema.is(SourceControlRepositoryError)(cause)
|
||||
isSourceControlRepositoryError(cause)
|
||||
? cause
|
||||
: repositoryError({
|
||||
operation,
|
||||
|
||||
Reference in new issue
Block a user