Skip to content
On this page

VLS

You can use VLS checker for your Vue2 project. If you're using Vue3, choose vue-tsc checker.

Installation

  1. Make sure vls and vti are installed as peer dependencies, plugin will use vls on dev mode and vti on build mode.

    bash
    pnpm add vls vti -D
  2. Add vls field to plugin config.

    js
    module.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,
          },
        },
      },
    }),
  ],
}

Released under the MIT License.