Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Linting
  • Loading branch information
Emyrk committed Mar 16, 2023
commit bc824c55ccc25ed1d460efefc9de143e88b2695a
6 changes: 3 additions & 3 deletions scripts/apitypings/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ func (g *Generator) typescriptType(ty types.Type) (TypescriptType, error) {
AboveTypeLine: fmt.Sprintf("%s\n%s",
indentedComment("Embedded anonymous struct, please fix by naming it"),
// Linter needs to be disabled here, or else it will complain about the "any" type.
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any"),
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any -- Anonymously embedded struct"),
),
}, nil
case *types.Map:
Expand Down Expand Up @@ -776,7 +776,7 @@ func (g *Generator) typescriptType(ty types.Type) (TypescriptType, error) {
return TypescriptType{ValueType: "any", AboveTypeLine: fmt.Sprintf("%s\n%s",
indentedComment(fmt.Sprintf("Named type %q unknown, using \"any\"", n.String())),
// Linter needs to be disabled here, or else it will complain about the "any" type.
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any"),
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type"),
)}, nil
}

Expand Down Expand Up @@ -807,7 +807,7 @@ func (g *Generator) typescriptType(ty types.Type) (TypescriptType, error) {
AboveTypeLine: fmt.Sprintf("%s\n%s",
indentedComment("Empty interface{} type, cannot resolve the type."),
// Linter needs to be disabled here, or else it will complain about the "any" type.
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any"),
indentedComment("eslint-disable-next-line @typescript-eslint/no-explicit-any -- interface{}"),
),
}, nil
}
Expand Down
30 changes: 15 additions & 15 deletions site/src/api/typesGenerated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ export type AuditDiff = Record<string, AuditDiffField>

// From codersdk/audit.go
export interface AuditDiffField {
// Empty interface{} type, cannot resolve any type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// Empty interface{} type, cannot resolve the type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- interface{}
readonly old?: any
// Empty interface{} type, cannot resolve any type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// Empty interface{} type, cannot resolve the type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- interface{}
readonly new?: any
readonly secret: boolean
}
Expand All @@ -69,7 +69,7 @@ export interface AuditLog {
readonly time: string
readonly organization_id: string
// Named type "net/netip.Addr" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly ip: any
readonly user_agent: string
readonly resource_type: ResourceType
Expand Down Expand Up @@ -359,12 +359,12 @@ export interface DeploymentValues {
readonly disable_password_auth?: boolean
readonly support?: SupportConfig
// Named type "github.com/coder/coder/cli/clibase.Struct[[]github.com/coder/coder/codersdk.GitAuthConfig]" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly git_auth?: any
readonly config?: string
readonly write_config?: boolean
// Named type "github.com/coder/coder/cli/clibase.HostPort" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly address?: any
}

Expand Down Expand Up @@ -443,8 +443,8 @@ export interface License {
readonly id: number
readonly uuid: string
readonly uploaded_at: string
// Empty interface{} type, cannot resolve any type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// Empty interface{} type, cannot resolve the type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- interface{}
readonly claims: Record<string, any>
}

Expand Down Expand Up @@ -580,15 +580,15 @@ export interface PatchGroupRequest {
export interface PprofConfig {
readonly enable: boolean
// Named type "github.com/coder/coder/cli/clibase.HostPort" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly address: any
}

// From codersdk/deployment.go
export interface PrometheusConfig {
readonly enable: boolean
// Named type "github.com/coder/coder/cli/clibase.HostPort" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly address: any
}

Expand Down Expand Up @@ -673,8 +673,8 @@ export interface Role {
// From codersdk/serversentevents.go
export interface ServerSentEvent {
readonly type: ServerSentEventType
// Empty interface{} type, cannot resolve any type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// Empty interface{} type, cannot resolve the type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- interface{}
readonly data: any
}

Expand All @@ -696,7 +696,7 @@ export interface SessionCountDeploymentStats {
// From codersdk/deployment.go
export interface SupportConfig {
// Named type "github.com/coder/coder/cli/clibase.Struct[[]github.com/coder/coder/codersdk.LinkConfig]" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly links: any
}

Expand All @@ -709,7 +709,7 @@ export interface SwaggerConfig {
export interface TLSConfig {
readonly enable: boolean
// Named type "github.com/coder/coder/cli/clibase.HostPort" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly address: any
readonly redirect_http: boolean
readonly cert_file: string[]
Expand Down