# no-process-env

Rule `eslint/no-process-env`. Disallow the use of `process.env`

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Deprecated: yes
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1703 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `no-process-env` | no | no | package `eslint` | [docs](https://eslint.org/docs/latest/rules/no-process-env) |
| Biome | `style/noProcessEnv` | no | no | group style, since 1.9.1 | [docs](https://biomejs.dev/linter/rules/no-process-env/) |

## Code examples

### Incorrect: the rule reports this

```js
if(process.env.NODE_ENV === "development") {
    //...
}
```

### Correct: the rule accepts this

```js
var config = require("./config");

if(config.env === "development") {
    //...
}
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
export default [
  {
    rules: {
      "no-process-env": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "noProcessEnv": "error"
      }
    }
  }
}
```

## Related rules

- [node/no-process-env](https://lintradar.dev/rules/node/no-process-env.md): Disallow the use of `process.env`
- [eslint/sort-keys](https://lintradar.dev/rules/eslint/sort-keys.md): Require object keys to be sorted
- [eslint/sort-imports](https://lintradar.dev/rules/eslint/sort-imports.md): Enforce sorted `import` declarations within modules
- [eslint/no-undefined](https://lintradar.dev/rules/eslint/no-undefined.md): Disallow the use of `undefined` as an identifier
- [eslint/id-length](https://lintradar.dev/rules/eslint/id-length.md): Enforce minimum and maximum identifier lengths
- [eslint/no-ternary](https://lintradar.dev/rules/eslint/no-ternary.md): Disallow ternary operators

---

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