VLS
You can use VLS checker for your Vue2 project. If you're using Vue3, choose vue-tsc checker.
Installation
Make sure vls and vti are installed as peer dependencies, plugin will use vls on dev mode and vti on build mode.
bashpnpm add vls vti -D
Add
vls
field to plugin config.jsmodule.exports = { plugins: [checker({ vls: true })], }
Configuration
Advanced object configuration of options.vls
VLS configuration accepts the same values that can be configured in VS code with keys that start with vetur
. These are configured with nested objects rather than dotted string notation. TypeScript intellisense is available.
See initParams.ts
for a comprehensive list of the defaults that can be overridden. Unfortunately, Vetur does not provide a single comprehensive document of all its options.
For example, to performing checking only the <script>
block:
ts
// e.g.
export default {
plugins: [
checker({
vls: {
vetur: {
validation: {
template: false,
templateProps: false,
interpolation: false,
style: false,
},
},
},
}),
],
}