Skip to content

Commit

Permalink
eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dubwub committed Nov 1, 2024
1 parent 10f04f1 commit be98c4c
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion generators/csharp/model/src/snippets/ExampleGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export class ExampleGenerator {
double: (p) => csharp.InstantiatedPrimitive.double(p),
boolean: (p) => csharp.InstantiatedPrimitive.boolean(p),
string: (p) => csharp.InstantiatedPrimitive.string(p.original),
datetime: (datetime: any) => csharp.InstantiatedPrimitive.dateTime(datetime, parseDatetimes),
datetime: (datetime) => csharp.InstantiatedPrimitive.dateTime(datetime, parseDatetimes),
date: (dateString) => csharp.InstantiatedPrimitive.date(dateString),
uuid: (p) => csharp.InstantiatedPrimitive.uuid(p),
base64: (p) => csharp.InstantiatedPrimitive.string(p),
Expand Down
4 changes: 2 additions & 2 deletions generators/ruby/sdk/src/AbstractionUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ export function generateSubpackage(
requestClientCr: ClassReference,
asyncRequestClientCr: ClassReference,
locationGenerator: LocationGenerator,
subpackages: Map<Name, Class_> = new Map(),
asyncSubpackages: Map<Name, Class_> = new Map()
subpackages: Map<Name, Class_> = new Map<Name, Class_>(),
asyncSubpackages: Map<Name, Class_> = new Map<Name, Class_>()
): ClientClassPair {
const location = locationGenerator.getLocationFromFernFilepath(package_.fernFilepath, "client");
const moduleBreadcrumbs = getBreadcrumbsFromFilepath(package_.fernFilepath, clientName);
Expand Down
4 changes: 2 additions & 2 deletions generators/ruby/sdk/src/GeneratorCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import { parseCustomConfig, RubySdkCustomConfigConsumed } from "./CustomConfig";

export class RubySdkGeneratorCli extends AbstractGeneratorCli<RubySdkCustomConfigConsumed> {
generatedFiles: GeneratedFile[] = [];
generatedClasses: Map<TypeId, Class_> = new Map();
flattenedProperties: Map<TypeId, ObjectProperty[]> = new Map();
generatedClasses: Map<TypeId, Class_> = new Map<TypeId, Class_>();
flattenedProperties: Map<TypeId, ObjectProperty[]> = new Map<TypeId, ObjectProperty[]>();
classReferenceFactory: ClassReferenceFactory | undefined;
locationGenerator: LocationGenerator | undefined;

Expand Down
4 changes: 2 additions & 2 deletions generators/ruby/sdk/src/utils/ArtifactRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { EndpointId } from "@fern-fern/ir-sdk/api";

// Note we currently only register the sync endpoint and sync client for the below, for simplicity.
export class ArtifactRegistry {
endpointRegistry: Map<EndpointId, Function_> = new Map();
endpointPackageRegistry: Map<EndpointId, ClassReference> = new Map();
endpointRegistry: Map<EndpointId, Function_> = new Map<EndpointId, Function_>();
endpointPackageRegistry: Map<EndpointId, ClassReference> = new Map<EndpointId, ClassReference>();

public registerEndpoint(endpointId: EndpointId, endpoint: Function_, endpointPackage: ClassReference): void {
this.endpointRegistry.set(endpointId, endpoint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ import {
import { DummyOpenAPIV3ParserContext } from "./DummyOpenAPIV3ParserContext";

export class OpenAPIV3ParserContext extends AbstractOpenAPIV3ParserContext {
private nonRequestReferencedSchemas: Set<SchemaId> = new Set();
private nonRequestReferencedSchemas: Set<SchemaId> = new Set<SchemaId>();

private twoOrMoreRequestsReferencedSchemas: Set<SchemaId> = new Set();
private singleRequestReferencedSchemas: Set<SchemaId> = new Set();
private twoOrMoreRequestsReferencedSchemas: Set<SchemaId> = new Set<SchemaId>();
private singleRequestReferencedSchemas: Set<SchemaId> = new Set<SchemaId>();

private discrminatedUnionReferences: Record<string, DiscriminatedUnionReference> = {};

private discrminatedUnionMetadata: Record<string, DiscriminatedUnionMetadata> = {};

private schemasToExclude: Set<SchemaId> = new Set();
private schemasToExclude: Set<SchemaId> = new Set<SchemaId>();

constructor({
document,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function convertSchema(
source: Source,
namespace: string | undefined,
referencedAsRequest = false,
propertiesToExclude: Set<string> = new Set(),
propertiesToExclude: Set<string> = new Set<string>(),
fallback?: string | number | boolean | unknown[]
): SchemaWithExample {
const encoding = getEncoding({ schema, logger: context.logger });
Expand Down Expand Up @@ -153,7 +153,7 @@ export function convertSchemaObject(
encoding: Encoding | undefined,
source: Source,
namespace: string | undefined,
propertiesToExclude: Set<string> = new Set(),
propertiesToExclude: Set<string> = new Set<string>(),
referencedAsRequest = false,
fallback?: string | number | boolean | unknown[]
): SchemaWithExample {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ export class ExampleTypeFactory {
private hasExample(
schema: SchemaWithExample,
depth: number,
visitedSchemaIds: Set<SchemaId> = new Set(),
visitedSchemaIds: Set<SchemaId> = new Set<SchemaId>(),
options: ExampleTypeFactory.Options
): boolean {
if (this.exceedsMaxCheckerDepth(depth, options)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class OpenApiIrConverterContext {
public detectGlobalHeaders: boolean;
private enableUniqueErrorsPerEndpoint: boolean;
private defaultServerName: string | undefined = undefined;
private unknownSchema: Set<number> = new Set();
private unknownSchema: Set<number> = new Set<number>();

constructor({
taskContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function visitDocsNavigationItem({
}

class ApiSectionCollector {
private namedApis: Set<string> = new Set();
private namedApis: Set<string> = new Set<string>();
private defaultApi = false;

collect(section: DocsNavigationItem.ApiSection): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { fromMarkdown } from "mdast-util-from-markdown";
import { mdxFromMarkdown } from "mdast-util-mdx";
import { mdx } from "micromark-extension-mdx";

export function parseMarkdownToTree(content: string): any {
export function parseMarkdownToTree(content: string) {

Check failure on line 7 in packages/cli/docs-markdown-utils/src/parseMarkdownToTree.ts

View workflow job for this annotation

GitHub Actions / eslint

Missing return type on function
return fromMarkdown(content, {
extensions: [mdx()],
mdastExtensions: [mdxFromMarkdown()]
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/docs-resolver/src/DocsDefinitionResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class DocsDefinitionResolver {
return this._parsedDocsConfig;
}
private collectedFileIds = new Map<AbsoluteFilePath, string>();
private markdownFilesToFullSlugs: Map<AbsoluteFilePath, string> = new Map();
private markdownFilesToFullSlugs: Map<AbsoluteFilePath, string> = new Map<AbsoluteFilePath, string>();
public async resolve(): Promise<DocsV1Write.DocsDefinition> {
this._parsedDocsConfig = await docsYml.parseDocsConfiguration({
rawDocsConfiguration: this.docsWorkspace.config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TaskContext } from "@fern-api/task-context";
import { JSONSchema4 } from "json-schema";

export class JsonSchemaConverterContext {
private readonly buildingTypeIds: Set<TypeId> = new Set();
private readonly buildingTypeIds: Set<TypeId> = new Set<TypeId>();
private readonly definitions: Record<string, JSONSchema4> = {};

constructor(private readonly context: TaskContext, private readonly ir: IntermediateRepresentation) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ export interface FilteredIr {
}

export class FilteredIrImpl implements FilteredIr {
private environments: Set<EnvironmentId> = new Set();
private types: Set<TypeId> = new Set();
private environments: Set<EnvironmentId> = new Set<EnvironmentId>();
private types: Set<TypeId> = new Set<TypeId>();
private properties: Record<TypeId, Set<string> | undefined>;
private errors: Set<ErrorId> = new Set();
private services: Set<ServiceId> = new Set();
private endpoints: Set<EndpointId> = new Set();
private errors: Set<ErrorId> = new Set<ErrorId>();
private services: Set<ServiceId> = new Set<ServiceId>();
private endpoints: Set<EndpointId> = new Set<EndpointId>();
private requestProperties: Record<EndpointId, Set<string> | undefined>;
private queryParameters: Record<EndpointId, Set<string> | undefined>;
private webhooks: Set<WebhookId> = new Set();
private webhooks: Set<WebhookId> = new Set<WebhookId>();
private webhookPayloadProperties: Record<WebhookId, Set<string> | undefined>;
private subpackages: Set<SubpackageId> = new Set();
private subpackages: Set<SubpackageId> = new Set<SubpackageId>();

public constructor({
types,
Expand Down
12 changes: 6 additions & 6 deletions packages/cli/generation/ir-generator/src/filtered-ir/IrGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ export class IrGraph {
private webhooks: Record<WebhookId, WebhookNode> = {};
private audiences: Audiences;
private typesReferencedByService: Record<TypeId, Set<ServiceId>> = {};
private environmentsNeededForAudience: Set<EnvironmentId> = new Set();
private typesNeededForAudience: Set<TypeId> = new Set();
private servicesNeededForAudience: Set<ServiceId> = new Set();
private endpointsNeededForAudience: Set<EndpointId> = new Set();
private webhooksNeededForAudience: Set<WebhookId> = new Set();
private subpackagesNeededForAudience: Set<SubpackageId> = new Set();
private environmentsNeededForAudience: Set<EnvironmentId> = new Set<EnvironmentId>();
private typesNeededForAudience: Set<TypeId> = new Set<TypeId>();
private servicesNeededForAudience: Set<ServiceId> = new Set<ServiceId>();
private endpointsNeededForAudience: Set<EndpointId> = new Set<EndpointId>();
private webhooksNeededForAudience: Set<WebhookId> = new Set<WebhookId>();
private subpackagesNeededForAudience: Set<SubpackageId> = new Set<SubpackageId>();

public constructor(audiences: ConfigAudiences) {
this.audiences = audiencesFromConfig(audiences);
Expand Down

0 comments on commit be98c4c

Please sign in to comment.