Skip to content

Commit beda079

Browse files
committed
lint, fix lint config
1 parent f385164 commit beda079

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import apify from '@apify/eslint-config';
22

33
// eslint-disable-next-line import/no-default-export
44
export default [
5-
{ ignores: ['**/dist'] }, // Ignores need to happen first
5+
{ ignores: ['**/dist', '**/.venv'] }, // Ignores need to happen first
66
...apify,
77
{
88
languageOptions: {

src/actors.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ export function truncateActorReadme(readme: string, limit = ACTOR_README_MAX_LEN
109109
/**
110110
* Helps determine the type of items in an array schema property.
111111
* Priority order: explicit type in items > prefill type > default value type > editor type.
112-
*
112+
*
113113
* Based on JSON schema, the array needs a type, and most of the time Actor input schema does not have this, so we need to infer that.
114-
*
114+
*
115115
*/
116116
export function inferArrayItemType(property: ISchemaProperties): string | null {
117117
return property.items?.type
@@ -133,13 +133,13 @@ export function inferArrayItemType(property: ISchemaProperties): string | null {
133133

134134
/**
135135
* Add enum values as string to property descriptions.
136-
*
136+
*
137137
* This is done as a preventive measure to prevent cases where library or agent framework
138138
* does not handle enums or examples based on JSON schema definition.
139-
*
139+
*
140140
* https://json-schema.org/understanding-json-schema/reference/enum
141141
* https://json-schema.org/understanding-json-schema/reference/annotations
142-
*
142+
*
143143
* @param properties
144144
*/
145145
function addEnumsToDescriptionsWithExamples(properties: Record<string, ISchemaProperties>): Record<string, ISchemaProperties> {
@@ -158,9 +158,9 @@ function addEnumsToDescriptionsWithExamples(properties: Record<string, ISchemaPr
158158

159159
/**
160160
* Filters schema properties to include only the necessary fields.
161-
*
161+
*
162162
* This is done to reduce the size of the input schema and to make it more readable.
163-
*
163+
*
164164
* @param properties
165165
*/
166166
export function filterSchemaProperties(properties: { [key: string]: ISchemaProperties }): { [key: string]: ISchemaProperties } {
@@ -195,7 +195,7 @@ export function filterSchemaProperties(properties: { [key: string]: ISchemaPrope
195195
/**
196196
* Marks input properties as required by adding a "REQUIRED" prefix to their descriptions.
197197
* Takes an IActorInput object and returns a modified Record of SchemaProperties.
198-
*
198+
*
199199
* This is done for maximum compatibility in case where library or agent framework does not consider
200200
* required fields and does not handle the JSON schema properly: we are prepending this to the description
201201
* as a preventive measure.
@@ -219,15 +219,15 @@ function markInputPropertiesAsRequired(input: IActorInputSchema): Record<string,
219219

220220
/**
221221
* Builds nested properties for object types in the schema.
222-
*
222+
*
223223
* Specifically handles special cases like proxy configuration and request list sources
224224
* by adding predefined nested properties to these object types.
225225
* This is necessary for the agent to correctly infer how to structure object inputs
226226
* when passing arguments to the Actor.
227-
*
227+
*
228228
* For proxy objects (type='object', editor='proxy'), adds 'useApifyProxy' property.
229229
* For request list sources (type='array', editor='requestListSources'), adds URL structure to items.
230-
*
230+
*
231231
* @param {Record<string, ISchemaProperties>} properties - The input schema properties
232232
* @returns {Record<string, ISchemaProperties>} Modified properties with nested properties
233233
*/
@@ -280,7 +280,7 @@ function buildNestedProperties(properties: Record<string, ISchemaProperties>): R
280280
* It uses the AJV library to validate the input schemas.
281281
*
282282
* Tool name can't contain /, so it is replaced with _
283-
*
283+
*
284284
* The input schema processing workflow:
285285
* 1. Properties are marked as required using markInputPropertiesAsRequired()
286286
* 2. Nested properties are built by analyzing editor type (proxy, requestListSources) using buildNestedProperties()

0 commit comments

Comments
 (0)