# @vue/eslint-config-typescript

> ESLint config for TypeScript + Vue.js projects

Latest version **14.9.0** (published 2026-06-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vue/eslint-config-typescript
pnpm add @vue/eslint-config-typescript
yarn add @vue/eslint-config-typescript
bun add @vue/eslint-config-typescript
```

Provides the command `vue-eslint-config-typescript`.

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 14.9.0 |
| Published | 2026-06-21 |
| First published | 2018-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | ^18.18.0 \|\| ^20.9.0 \|\| >=21.1.0 |
| Dependencies | 4 |
| Unpacked size | 83.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 192 |
| Author | Evan You |
| Maintainers | akryum, yyx990803, soda, michalsnik, mysticatea |
| Keywords | vue, create-vue, create-eslint-config, eslint, typescript |

## Links

- npm: https://www.npmjs.com/package/@vue/eslint-config-typescript
- Repository: https://github.com/vuejs/eslint-config-typescript
- Homepage: https://github.com/vuejs/eslint-config-typescript#readme
- Issues: https://github.com/vuejs/eslint-config-typescript/issues
- npm.io page: https://npm.io/package/@vue/eslint-config-typescript

## Dependencies (4)

- [fast-glob](https://npm.io/package/fast-glob.md) ^3.3.3
- [typescript-eslint](https://npm.io/package/typescript-eslint.md) ^8.60.0
- [vue-eslint-parser](https://npm.io/package/vue-eslint-parser.md) ^10.4.0
- [@typescript-eslint/utils](https://npm.io/package/@typescript-eslint/utils.md) ^8.60.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 14.9.0 (latest) — 2026-06-21
- 14.5.1 (flat-config) — 2025-06-17
- 13.0.0 (legacy-eslintrc) — 2024-03-08
- 14.8.0 — 2026-06-04
- 14.7.0 — 2026-02-17
- 14.6.0 — 2025-07-02
- 14.5.0 — 2025-03-06
- 14.4.0 — 2025-02-09
- 14.3.0 — 2025-01-14
- 14.2.0 — 2024-12-25
- 14.1.4 — 2024-11-25
- 14.1.3 — 2024-10-23
- 14.1.2 — 2024-10-22
- 14.1.1 — 2024-10-15
- 14.1.0 — 2024-10-14
- … 64 more at https://npm.io/package/@vue/eslint-config-typescript/versions

## README

# @vue/eslint-config-typescript

ESLint configuration for Vue 3 + TypeScript projects.

See [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/rules/) for available rules.

This config is designed for `create-vue` setups.
Other projects can use it, but may need project-specific adjustments.

It may rely on other `create-vue` defaults, such as `eslint-plugin-vue`
being extended in the same final config.

> [!NOTE]
> The current version doesn't support the legacy `.eslintrc*` configuration format. Use version 13 or earlier for that format. See the [corresponding README](https://www.npmjs.com/package/@vue/eslint-config-typescript/v/legacy-eslintrc) for more usage instructions.

## Installation

```sh
npm add --dev @vue/eslint-config-typescript
```

Please also make sure that you have `typescript` and `eslint` installed.

## Usage

For new flat configs, use these two exports:

- `withVueTs`, a helper that builds a flat ESLint config for Vue.js + TypeScript. It accepts either `withVueTs(...configs)` or `withVueTs(options, ...configs)`.
- `vueTsConfigs`, the [shared configurations from `typescript-eslint`](https://typescript-eslint.io/users/configs) adapted for `.vue` files in addition to TypeScript files. The names are in camel case, such as `vueTsConfigs.recommendedTypeChecked`.

The helper APIs used before v14.9 remain available for existing projects. See [Helper APIs Before v14.9](#helper-apis-before-v149).

### Recommended

`withVueTs(...)` is available in v14.9 and later. Export the `withVueTs(...)` call from `eslint.config.js`, `eslint.config.mjs`, or `eslint.config.ts`.

```js
// eslint.config.mjs
import pluginVue from 'eslint-plugin-vue'
import { withVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'

export default withVueTs(
  pluginVue.configs['flat/essential'],
  vueTsConfigs.recommended,
)
```

The above configuration enables [the essential rules for Vue 3](https://eslint.vuejs.org/rules/#priority-a-essential-error-prevention) and [the recommended rules for TypeScript](https://typescript-eslint.io/rules/?=recommended).

All the `<script>` blocks in `.vue` files _MUST_ be written in TypeScript (should be either `<script setup lang="ts">` or `<script lang="ts">`).

`withVueTs(...)` accepts config objects, config arrays, and promises. This matches the input style used by [`eslint-flat-config-utils`](https://github.com/antfu/eslint-flat-config-utils), so configs built with Antfu's or Nuxt's ESLint config utilities can be passed to `withVueTs(...)` for Vue + TypeScript resolution.

### Linting with Type Information

Some `typescript-eslint` rules use type information to provide deeper insights into the project code.
Type-checking is much slower than linting with syntax information only.
Setting up typed linting for ESLint without severe performance penalties can be difficult.

We don't recommend configuring individual type-aware rules and the corresponding language options manually.
Start with the `recommendedTypeChecked` configuration, then turn rules on or off as needed.

```js
// eslint.config.mjs
import pluginVue from 'eslint-plugin-vue'
import { withVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'

export default withVueTs(
  pluginVue.configs['flat/essential'],
  vueTsConfigs.recommendedTypeChecked,
)
```

### Project Options

`withVueTs(...)` accepts options for this config as the first argument. These are the same options accepted by `configureVueProject(...)` in the helper APIs before v14.9.

Only pass the options that differ from the defaults. This example lists all available options:

```js
// eslint.config.mjs
import pluginVue from 'eslint-plugin-vue'
import { withVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'

export default withVueTs(
  {
    // Whether to parse TypeScript syntax in Vue templates.
    // Defaults to `true`.
    // Setting it to `false` could improve performance.
    // But TypeScript syntax in Vue templates will then lead to syntax errors.
    // Also, type-aware rules won't be applied to expressions in templates in that case.
    tsSyntaxInTemplates: true,

    // Specify the script langs in `.vue` files
    // Defaults to `['ts']`.
    scriptLangs: [
      'ts',

      // [!DISCOURAGED]
      // Include 'js' to allow plain `<script>` or `<script setup>` blocks.
      // This might result-in false positive or negatives in some rules for `.vue` files.
      // Note you also need to configure `allowJs: true` and `checkJs: true`
      // in corresponding `tsconfig.json` files.
      // 'js',

      // [!STRONGLY DISCOURAGED]
      // Include 'tsx' to allow `<script lang="tsx">` blocks.
      // This would be in conflict with all type-aware rules.
      // 'tsx',

      // [!STRONGLY DISCOURAGED]
      // Include 'jsx' to allow `<script lang="jsx">` blocks.
      // This would be in conflict with all type-aware rules and may result in false positives.
      // 'jsx',
    ],

    // Whether to override some `no-unsafe-*` rules to avoid false positives on Vue component operations.
    // Defaults to `true`.
    // Usually you should keep this enabled,
    // but if you're using a metaframework or in a TSX-only project
    // where you're certain you won't operate on `.vue` components in a way that violates the rules,
    // and you want the strictest rules (e.g. when extending from `strictTypeChecked`),
    // you can set this to `false` to ensure the strictest rules apply to all files.
    allowComponentTypeUnsafety: true,

    // The root directory to resolve the `.vue` files.
    // Defaults to `process.cwd()`.
    // More info: <https://github.com/vuejs/eslint-plugin-vue/issues/1910#issuecomment-1819993961>
    // You may need to set this to the root directory of your project if you have a monorepo.
    // This is useful when you allow any other languages than `ts` in `.vue` files.
    // Our config helper would resolve and parse all the `.vue` files under `rootDir`,
    // and only apply the loosened rules to the files that do need them.
    rootDir: import.meta.dirname,

    // Whether to include dot folders when resolving `.vue` files under `rootDir`.
    // Defaults to `false`.
    // You may need to set this to `true` if your project stores Vue components
    // under folders such as `.vitepress`.
    includeDotFolders: false,
  },
  pluginVue.configs['flat/essential'],
  vueTsConfigs.recommendedTypeChecked,
)
```

### Helper APIs Before v14.9

Configs written before v14.9 usually use `defineConfigWithVueTs(...)` as the final config helper, with `configureVueProject(...)` for the same project options.

Both APIs remain supported. `defineConfigWithVueTs(...)` accepts flat config entries and applies the final Vue + TypeScript resolution. `configureVueProject(...)` sets the project options used by `defineConfigWithVueTs(...)`.

The pre-v14.9 API shape:

```js
configureVueProject(options)
export default defineConfigWithVueTs(...configs)
```

maps to:

```js
export default withVueTs(options, ...configs)
```

```js
// eslint.config.mjs
import pluginVue from 'eslint-plugin-vue'
import {
  defineConfigWithVueTs,
  vueTsConfigs,
  configureVueProject,
} from '@vue/eslint-config-typescript'

configureVueProject({
  rootDir: import.meta.dirname,
  scriptLangs: ['ts', 'js'],
})

export default defineConfigWithVueTs(
  pluginVue.configs['flat/essential'],
  vueTsConfigs.recommended,
)
```

### Migration

To migrate an existing flat config from `defineConfigWithVueTs(...)` / `configureVueProject(...)` to `withVueTs(...)`, use:

```sh
npx @vue/eslint-config-typescript migrate-to-with-vue-ts
```

This command is interactive by default. It discovers `eslint.config.{js,mjs,ts,mts}`, shows the planned changes, and asks before writing files.

The codemod is conservative. It auto-fixes common top-level helper patterns, and reports unusual cases such as non-top-level `configureVueProject(...)` calls or ambiguous first arguments for manual migration.

Explicit paths and non-interactive runs are also supported:

```sh
npx @vue/eslint-config-typescript migrate-to-with-vue-ts eslint.config.ts
npx @vue/eslint-config-typescript migrate-to-with-vue-ts "packages/*/eslint.config.ts" --yes
```

There is also a versioned alias:

```sh
npx @vue/eslint-config-typescript migrate-14.9
```

Use `migrate-to-with-vue-ts` as the primary interface. The alias is only a convenience for this specific migration and future releases may add other migrations.

## Use As a Normal Shared ESLint Config (Not Recommended)

This package can be used as a normal ESLint config, without `withVueTs` or `defineConfigWithVueTs`. In that setup, overriding the rules for `.vue` files is more difficult and comes with many nuances. Use this mode with caution.

See [the documentation for 14.1 and earlier versions](https://github.com/vuejs/eslint-config-typescript/tree/v14.1.4#usage) for more information.

## Further Reading

- [All the extendable configurations from `typescript-eslint`](https://typescript-eslint.io/users/configs).
- [All the available rules from `typescript-eslint`](https://typescript-eslint.io/rules/).

---
_Source: https://npm.io/package/@vue/eslint-config-typescript · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
