Skip to content

Commit

Permalink
test: fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bent10 committed Dec 4, 2024
1 parent bfb1c35 commit afa2bfb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 2 additions & 0 deletions examples/express/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import express from 'express'
import { ungzip } from 'pako'
import defineBooxConfig from './boox.config.js'

// eslint-disable-next-line no-undef
const PORT = process.env.PORT || 3000

/** @type {Boox<Pokemon>} */
Expand Down Expand Up @@ -47,5 +48,6 @@ app.get('/search', async (req, res) => {
})

app.listen(PORT, () => {
// eslint-disable-next-line no-undef
console.log(`Server is running on http://localhost:${PORT}`)
})
14 changes: 5 additions & 9 deletions examples/vanilla/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,11 @@ const boox = new Boox<Pokemon>({
* @returns A promise that resolves to an array of Pokemon objects.
*/
async function fetchData(): Promise<Pokemon[]> {
try {
const response = await fetch(
'https://stilearning.com/boox/demo/datasets/pokemon-100r.json',
{ cache: 'default' }
)
return await response.json()
} catch (error) {
throw error
}
const response = await fetch(
'https://stilearning.com/boox/demo/datasets/pokemon-100r.json',
{ cache: 'default' }
)
return await response.json()
}

fetchData().then(async pokemons => {
Expand Down

0 comments on commit afa2bfb

Please sign in to comment.