# noConvexProcessEnv

Rule `biome/noConvexProcessEnv`. Disallow `process.env` in Convex functions.

- Source: biome
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #495 by reach, #130 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noConvexProcessEnv` | yes | unsafe | group nursery, since 2.6.10 | [docs](https://biomejs.dev/linter/rules/no-convex-process-env/) |

## Code examples

### Incorrect: the rule reports this

```json
{
  "dependencies": { "convex": "*" }
}
```

```ts
const apiKey = process.env.GIPHY_KEY;
```

```ts
const { GIPHY_KEY } = process.env;
```

### Correct: the rule accepts this

```json
{
  "dependencies": { "convex": "*" }
}
```

```ts
import { env } from "./_generated/server";

const apiKey = env.GIPHY_KEY;
```

```ts
import { defineApp } from "convex/server";
import { v } from "convex/values";

const app = defineApp({
  env: { GIPHY_KEY: v.string() },
});

export default app;
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noConvexProcessEnv": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noConvexOldRegisteredFunctionSyntax](https://lintradar.dev/rules/biome/noConvexOldRegisteredFunctionSyntax.md): Require the object syntax when registering Convex queries, mutations, and actions.
- [biome/noConvexQueryFilter](https://lintradar.dev/rules/biome/noConvexQueryFilter.md): Disallow calling `.filter()` on a Convex database query.
- [biome/noConvexDuplicateIndexes](https://lintradar.dev/rules/biome/noConvexDuplicateIndexes.md): Disallow Convex database indexes whose fields are the first fields of another index on the same table.
- [biome/noConvexTimeOrRandomInQueries](https://lintradar.dev/rules/biome/noConvexTimeOrRandomInQueries.md): Disallow reading the current time or generating random values in Convex queries.
- [biome/noConstEnum](https://lintradar.dev/rules/biome/noConstEnum.md): Disallow TypeScript `const enum`
- [biome/noConvexTopOfHourCrons](https://lintradar.dev/rules/biome/noConvexTopOfHourCrons.md): Disallow scheduling Convex cron jobs at the start of the hour.

---

Web page: https://lintradar.dev/rules/biome/noConvexProcessEnv. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
