@voicenter-team/eslint-config-vue

Shared vue eslint config
12,953
Install
npm install @voicenter-team/eslint-config-vue
Latest Version:3.0.0
Vue:3
License:ISC
Last Updated:Oct 20, 2026
Links: npm
Maintainer: tzachish

An eslint configuration for vue

Shared ESLint config for Vue 3 + TypeScript projects. Ships as a flat config array and supports ESLint 9 and 10.

Versions 2.x and 3.x require ESLint >= 9 (flat config). For legacy .eslintrc projects on ESLint 8, stay on version 1.x.

This single package includes everything a Vue project needs — eslint:recommended, typescript-eslint recommended, eslint-plugin-vue strongly-recommended, @vue/eslint-config-typescript and @voicenter-team/eslint-config-ts — so nothing else has to be added.

Usage

  1. Install dependencies
    npm i eslint @voicenter-team/eslint-config-vue --save-dev
    
  2. Create eslint.config.mjs in the project root:
    import voicenterVue from '@voicenter-team/eslint-config-vue'
    
    export default [
        ...voicenterVue,
        // project-specific overrides go here
    ]
    
    or CommonJS (eslint.config.js):
    const voicenterVue = require('@voicenter-team/eslint-config-vue')
    
    module.exports = [
        ...voicenterVue
    ]
    

Strict TypeScript rules

In script code, @voicenter-team/eslint-config-ts bans type assertions (x as Foo, <Foo>x), non-null assertions (x!), // @ts-ignore, // @ts-expect-error and // @ts-nocheck comments, and explicit any; as const and // @ts-check are allowed. Its README lists the rules and what replaces each construct: unknown instead of any, type guards, explicit checks, generics, annotations and satisfies.

Those rules see script code only. In <template> expressions, vue/no-restricted-syntax bans the same syntax: TSAsExpression, TSTypeAssertion and TSNonNullExpression. In a template every as is reported, as const included. A value the template needs narrowed is narrowed by a v-if with a type guard, or in the script, for example in a computed.

Migrating from 2.x

3.x depends on @voicenter-team/eslint-config-ts 3.x and completes the strict TypeScript rules: it bans type assertions and non-null assertions in script code and in templates, and // @ts-expect-error comments with a description, which 2.x allowed. // @ts-ignore, // @ts-nocheck and explicit any were already errors in 2.x. Every other rule and option is unchanged. A project that upgrades fails lint at each newly banned construct it uses.

Migrating from 1.x

The old .eslintrc setup:

{
    "extends": [
        "plugin:@typescript-eslint/recommended",
        "plugin:vue/vue3-strongly-recommended",
        "@vue/typescript/recommended",
        "eslint:recommended",
        "@voicenter-team/vue"
    ]
}

becomes just the eslint.config.mjs shown above — all of those presets are already composed into this package.

All custom rules and options are preserved. What changed under the hood:

1.x (eslintrc) 2.x (flat config)
plugin:vue/vue3-strongly-recommended eslint-plugin-vue v10 flat/strongly-recommended
@vue/typescript/recommended @vue/eslint-config-typescript v14 (defineConfigWithVueTs)
vue/component-tags-order vue/block-order (rule was renamed in eslint-plugin-vue v10; same template → script → style order)
env: { 'vue/setup-compiler-macros': true } compiler macro globals baked in (now also covers defineModel, defineOptions, defineSlots)
@voicenter-team/eslint-config-ts 1.x 2.x — see its migration notes

Things to check in consuming projects:

  • Inline disable comments for formatting rules need the new prefix: // eslint-disable-next-line semi becomes // eslint-disable-next-line @stylistic/semi. vue/* and @typescript-eslint/* rule names are unchanged, except vue/component-tags-order → vue/block-order.
  • <script> blocks may use ts, tsx, js or jsx, same as 1.x. To restrict to TypeScript only, the consuming project can add a vue/block-lang override.
  • Remove --ext flags from lint scripts — flat config handles file matching itself.

Related Packages

@voicenter-team/umbraco-headless-nuxt

Nuxt module that helps you to easily load your Umbraco data directly into your g...

6,834
@voicenter-team/stream-vue-3

A Vue 3 component for cloudflare streaming

4,600
@voicenter-team/umbraco-headless

Nuxt module that helps you to easily load your Umbraco data directly into your g...

925
@voicenter-team/voicenter-ui-plus

This is Vue 3.x + Typescript component library made for Voicenter systems.

37,359
@voicenter-team/nuxt-llms-generator

Nuxt 3/4 module that renders AI-optimized documentation files (llms.txt, llms-fu...

6,444

Version History

Version Released License
3.0.0 ISC
2.0.1 ISC
2.0.0 ISC
1.0.26 ISC
1.0.25 ISC