diff --git a/biome.json b/biome.json new file mode 100644 index 0000000000..971da26dbc --- /dev/null +++ b/biome.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://biomejs.dev/schemas/latest/schema.json", + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "formatter": { + "enabled": true + }, + "javascript": { + "formatter": { + "enabled": true + } + } +} diff --git a/examples/scrape_and_analyze_airbnb_data_e2b/model.ts b/examples/scrape_and_analyze_airbnb_data_e2b/model.ts index 19f6350fc4..aa1a1f99ea 100644 --- a/examples/scrape_and_analyze_airbnb_data_e2b/model.ts +++ b/examples/scrape_and_analyze_airbnb_data_e2b/model.ts @@ -1,4 +1,4 @@ -import { Tool } from '@anthropic-ai/sdk/src/resources/beta/tools' +import type { Tool } from '@anthropic-ai/sdk/src/resources/beta/tools' export const MODEL_NAME = 'claude-3-opus-20240229' diff --git a/examples/scrape_and_analyze_airbnb_data_e2b/scraping.ts b/examples/scrape_and_analyze_airbnb_data_e2b/scraping.ts index 9c1ab6fafc..505ab59a2c 100644 --- a/examples/scrape_and_analyze_airbnb_data_e2b/scraping.ts +++ b/examples/scrape_and_analyze_airbnb_data_e2b/scraping.ts @@ -1,5 +1,5 @@ -//@ts-ignore -import * as fs from 'fs' +//@ts-expect-error +import * as fs from 'node:fs' import FirecrawlApp from '@mendable/firecrawl-js' import 'dotenv/config' import { config } from 'dotenv' @@ -38,9 +38,9 @@ export async function scrapeAirbnb() { // Start crawling to get pagination links const linksData = await app.scrapeUrl(listingsUrl, params2) - console.log(linksData.data['llm_extraction']) + console.log(linksData.data.llm_extraction) - let paginationLinks = linksData.data['llm_extraction'].page_links.map( + let paginationLinks = linksData.data.llm_extraction.page_links.map( (link) => baseUrl + link.link ) @@ -74,7 +74,7 @@ export async function scrapeAirbnb() { // Function to scrape a single URL const scrapeListings = async (url) => { const result = await app.scrapeUrl(url, params) - return result.data['llm_extraction'].listings + return result.data.llm_extraction.listings } // Scrape all pagination links in parallel