Skip to content

vue

Vue components: template, script, and accessibility rules, HTML injection checks at both levels, and naming and ordering rules at level all. It requires javascript. Guide: Vue.

A scope has a file extension .vue, or a dependency on vue.

Type-checks every Vue component and TypeScript file of the scope with the strict compiler options.

Runs at the push stage, once per scope. It runs only in a scope that selects the typescript configuration.

tsc cannot parse a component file, so a type error inside one ships unless vue-tsc catches it.

Fix the first error vue-tsc prints; later errors often come from the same mistake.

const count: number = 'one'; in a component script reports an incompatible assignment. Assign a number, such as const count: number = 1;.

gspot ignore vue/vue-tsc --paths "<path>" --reason "<why>"
gspot ignore vue/vue-tsc --rule <rule> --reason "<why>"
Lint rules Files Why
import-x/no-default-export **/*.vue Vue compiles each component to a default export.
Setting Value
javascript.import_extension "extensionless"
Rule file Installed when
.gspot/rules/VUE.md Always
Tool Version
eslint-plugin-vue 10.11.1
vue-eslint-parser 10.4.1
eslint-plugin-vuejs-accessibility 2.6.2
vue-tsc 3.3.13