# no-implied-eval

Rule `typescript/no-implied-eval`. Disallow the use of `eval()`-like functions

- Source: typescript
- Technologies: TypeScript
- Kind: correctness
- Needs type information: yes
- Autofix: no
- Reach: 98.9M weekly downloads of presets that enable it
- Trend: +80.9% last quarter
- Rank: #184 by reach, #444 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/no-implied-eval` | no | no | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/no-implied-eval) |
| Oxlint | `typescript/no-implied-eval` | yes | no | plugin `typescript`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-implied-eval.html) |
| Biome | `nursery/noImpliedEval` | yes | no | group nursery, since 2.4.10 | [docs](https://biomejs.dev/linter/rules/no-implied-eval/) |

## Code examples

### Incorrect: the rule reports this

```ts
setTimeout('alert(`Hi!`);', 100);

setInterval('alert(`Hi!`);', 100);

setImmediate('alert(`Hi!`)');

execScript('alert(`Hi!`)');

window.setTimeout('count = 5', 10);

window.setInterval('foo = bar', 10);

const fn = '() = {}';
setTimeout(fn, 100);

const fn = () => {
  return 'x = 10';
};
setTimeout(fn(), 100);

const fn = new Function('a', 'b', 'return a + b');
```

### Correct: the rule accepts this

```ts
setTimeout(function () {
  alert('Hi!');
}, 100);

setInterval(function () {
  alert('Hi!');
}, 100);

setImmediate(function () {
  alert('Hi!');
});

execScript(function () {
  alert('Hi!');
});

const fn = () => {};
setTimeout(fn, 100);

const foo = {
  fn: function () {},
};
setTimeout(foo.fn, 100);
setTimeout(foo.fn.bind(this), 100);

class Foo {
  static fn = () => {};
}

setTimeout(Foo.fn, 100);
```

Examples from the ESLint documentation.

## Enable it

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

```js
import tseslint from "typescript-eslint";

export default [
  {
    plugins: { "@typescript-eslint": tseslint.plugin },
    rules: {
      "@typescript-eslint/no-implied-eval": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "typescript/no-implied-eval": "error"
  }
}
```

### Biome: `biome.json`

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

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Oxlint default](https://lintradar.dev/presets/oxlint-default.md) | Oxlint | `oxlint` | 111 | 50.8M | +183.6% |
| [typescript-eslint strict type-checked](https://lintradar.dev/presets/typescript-eslint-strict-type-checked.md) | ESLint | `@typescript-eslint/eslint-plugin` | 75 | 175.9M | +29.5% |
| [typescript-eslint recommended type-checked](https://lintradar.dev/presets/typescript-eslint-recommended-type-checked.md) | ESLint | `@typescript-eslint/eslint-plugin` | 47 | 175.9M | +29.5% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [Airbnb TypeScript](https://lintradar.dev/presets/airbnb-typescript.md) | ESLint | `eslint-config-airbnb-typescript` | 19 | 1.8M | +1.2% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [eslint/no-implied-eval](https://lintradar.dev/rules/eslint/no-implied-eval.md): Disallow the use of `eval()`-like methods
- [typescript/no-for-in-array](https://lintradar.dev/rules/typescript/no-for-in-array.md): Disallow iterating over an array with a for-in loop
- [typescript/no-base-to-string](https://lintradar.dev/rules/typescript/no-base-to-string.md): Require `.toString()` and `.toLocaleString()` to only be called on objects which provide useful information when stringified
- [typescript/await-thenable](https://lintradar.dev/rules/typescript/await-thenable.md): Disallow awaiting a value that is not a Thenable
- [typescript/restrict-template-expressions](https://lintradar.dev/rules/typescript/restrict-template-expressions.md): Enforce template literal expressions to be of `string` type
- [typescript/no-meaningless-void-operator](https://lintradar.dev/rules/typescript/no-meaningless-void-operator.md): Disallow the `void` operator except when used to discard a value

---

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