Skip to content

Commit

Permalink
chore: activate linting for vnet and fork api (#507)
Browse files Browse the repository at this point in the history
* add linting to fork api, fix issues

* add linting to vnet api, fix issues
  • Loading branch information
frontendphil authored Jan 10, 2025
1 parent fe7db09 commit 4f043f7
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 12 deletions.
3 changes: 3 additions & 0 deletions deployables/fork-api/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import zodiacEslintConfig from '@zodiac/eslint-config'

export default zodiacEslintConfig
5 changes: 4 additions & 1 deletion deployables/fork-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
"version": "1.0.0",
"devDependencies": {
"@cloudflare/workers-types": "^4.0.0",
"@zodiac/eslint-config": "workspace:*",
"@zodiac/typescript-config": "workspace:*",
"env-cmd": "^10.1.0",
"eslint": "^9.7.0",
"typescript": "^5.0.0",
"wrangler": "3.101.0"
},
"private": true,
"scripts": {
"start": "env-cmd wrangler dev",
"deploy": "wrangler publish",
"check-types": "tsc --noEmit"
"check-types": "tsc --noEmit",
"lint": "eslint . --max-warnings=0"
},
"packageManager": "[email protected]"
}
6 changes: 1 addition & 5 deletions deployables/fork-api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import type { Env } from './types'

export default {
async fetch(
request: Request,
env: Env,
ctx: ExecutionContext,
): Promise<Response> {
async fetch(request: Request, env: Env): Promise<Response> {
const { pathname } = new URL(request.url)
const tenderlyForkApi = `https://api.tenderly.co/api/v1/account/${env.TENDERLY_USER}/project/${env.TENDERLY_PROJECT}/fork`

Expand Down
3 changes: 3 additions & 0 deletions deployables/vnet-api/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import zodiacEslintConfig from '@zodiac/eslint-config'

export default zodiacEslintConfig
5 changes: 4 additions & 1 deletion deployables/vnet-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
"version": "1.0.0",
"devDependencies": {
"@cloudflare/workers-types": "^4.0.0",
"@zodiac/eslint-config": "workspace:*",
"@zodiac/typescript-config": "workspace:*",
"env-cmd": "^10.1.0",
"eslint": "^9.7.0",
"typescript": "^5.0.0",
"wrangler": "3.101.0"
},
"private": true,
"scripts": {
"start": "env-cmd wrangler dev",
"deploy": "wrangler publish",
"check-types": "tsc --noEmit"
"check-types": "tsc --noEmit",
"lint": "eslint . --max-warnings=0"
},
"packageManager": "[email protected]"
}
6 changes: 1 addition & 5 deletions deployables/vnet-api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import type { Env } from './types'

export default {
async fetch(
request: Request,
env: Env,
ctx: ExecutionContext,
): Promise<Response> {
async fetch(request: Request, env: Env): Promise<Response> {
const { pathname } = new URL(request.url)
const tenderlyForkApi = `https://api.tenderly.co/api/v1/account/${env.TENDERLY_USER}/project/${env.TENDERLY_PROJECT}/vnets`

Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4f043f7

Please sign in to comment.