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.
Selected when
Section titled “Selected when”A scope has a file extension .vue, or a dependency on vue.
Checks
Section titled “Checks”vue-tsc
Section titled “vue-tsc”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.
What to do
Section titled “What to do”Fix the first error vue-tsc prints; later errors often come from the same mistake.
Example
Section titled “Example”const count: number = 'one'; in a component script reports an incompatible assignment. Assign a number, such as const count: number = 1;.
Turn it off
Section titled “Turn it off”gspot ignore vue/vue-tsc --paths "<path>" --reason "<why>"gspot ignore vue/vue-tsc --rule <rule> --reason "<why>"Lint rules turned off
Section titled “Lint rules turned off”| Lint rules | Files | Why |
|---|---|---|
import-x/no-default-export |
**/*.vue |
Vue compiles each component to a default export. |
Defaults set for other configurations
Section titled “Defaults set for other configurations”| Setting | Value |
|---|---|
javascript.import_extension |
"extensionless" |
Rules for coding agents
Section titled “Rules for coding agents”| Rule file | Installed when |
|---|---|
.gspot/rules/VUE.md |
Always |
Tools and versions
Section titled “Tools and versions”| 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 |