# no-console

Rule `vue/no-console`. Disallow the use of `console` in `<template>`

- Source: vue
- Technologies: Vue
- Kind: suspicious
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1823 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/no-console` | no | suggestion | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/no-console.html) |
| Biome | `suspicious/noConsole` | no | unsafe | group suspicious, since 1.6.0 | [docs](https://biomejs.dev/linter/rules/no-console/) |

## Code examples

### Incorrect: the rule reports this

```js
console.error('hello world')
```

Examples from the Biome documentation.

## Enable it

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

```js
import vue from "eslint-plugin-vue";

export default [
  {
    plugins: { vue },
    rules: {
      "vue/no-console": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noConsole": "error"
      }
    }
  }
}
```

## Related rules

- [eslint/no-console](https://lintradar.dev/rules/eslint/no-console.md): Disallow the use of `console`
- [vue/match-component-file-name](https://lintradar.dev/rules/vue/match-component-file-name.md): Require component name property to match its file name
- [vue/no-constant-condition](https://lintradar.dev/rules/vue/no-constant-condition.md): Disallow constant expressions in conditions in `<template>`
- [vue/html-button-has-type](https://lintradar.dev/rules/vue/html-button-has-type.md): Disallow usage of button without an explicit type attribute
- [vue/no-content-outside-block](https://lintradar.dev/rules/vue/no-content-outside-block.md): Disallow content outside of the top-level blocks
- [vue/component-api-style](https://lintradar.dev/rules/vue/component-api-style.md): Enforce component API style

---

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