Skip to content

Commit

Permalink
enable noProcessEnv linter rule
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Oct 5, 2024
1 parent ea904dc commit bb6fd2a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
"all": true
},
"nursery": {
"noEnum": "error",
"noExportedImports": "error",
"noProcessEnv": "error",
"noRestrictedImports": {
"level": "error",
"options": {
Expand Down Expand Up @@ -89,6 +92,16 @@
}
}
}
},
{
"include": [".github/**/*"],
"linter": {
"rules": {
"nursery": {
"noProcessEnv": "off"
}
}
}
}
]
}
4 changes: 2 additions & 2 deletions src/pages/api/newsletter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { APIRoute } from 'astro'
const headers = {
'content-type': 'application/json',
authorization: `Basic ${Buffer.from(
`${process.env.MAILJET_API_KEY}:${process.env.MAILJET_SECRET_KEY}`,
`${import.meta.env.MAILJET_API_KEY}:${import.meta.env.MAILJET_SECRET_KEY}`,
'base64',
).toString()}`,
}
Expand Down Expand Up @@ -63,7 +63,7 @@ export const POST: APIRoute = async ({ request }) => {
method: 'POST',
body: JSON.stringify({
ContactID: contactId,
ListID: process.env.MAILJET_CONTACT_LIST_ID ?? '',
ListID: import.meta.env.MAILJET_CONTACT_LIST_ID ?? '',
}),
})
const listJson = await listResponse.json()
Expand Down

0 comments on commit bb6fd2a

Please sign in to comment.