Skip to content

Checkers overview ​

vite-plugin-checker includes seven checkers. Each one wraps an existing tool, so it uses the same configuration files and reports the same diagnostics as running that tool yourself.

CheckerOptionPackages to installAccepts true
TypeScripttypescripttypescriptYes
vue-tscvueTscvue-tsc, typescriptYes
svelte-checksvelteChecksvelte-check, typescriptYes
ESLinteslinteslintNo
Biomebiome@biomejs/biomeYes
oxlintoxlintoxlintYes
Stylelintstylelintstylelint, meowNo

Enable a checker ​

Every checker is off by default. To enable one:

  1. Install the packages it needs, listed in the table above, as dev dependencies of your project.
  2. Set its option in the plugin config:
    • true uses the default configuration, for checkers that support it.
    • An object configures the checker. ESLint and Stylelint require an object with a lintCommand.
    • false, or leaving the option out, disables the checker.
ts
checker({
  typescript: true,
  eslint: {
    lintCommand: 'eslint "./src/**/*.{ts,tsx}"',
  },
})

Options that apply to all checkers, such as overlay and enableBuild, are described in Shared options.

Choose between checkers ​

  • For type checking, use one of the type checkers: typescript for plain TypeScript and React, vueTsc for Vue, or svelteCheck for Svelte. vueTsc and svelteCheck also check .ts files, so you don't need to enable the typescript checker as well.
  • For linting, use the linter your project already runs. The checker uses its configuration file, so the results match your editor and CI.

Next steps ​

Released under the MIT License.