What is vite-plugin-checker?
vite-plugin-checker is a Vite plugin that provides various types of code checking functionalities, such as TypeScript, VLS (Vetur Language Server), and ESLint. It helps developers catch errors and enforce coding standards during the development process.
What are vite-plugin-checker's main functionalities?
TypeScript Checking
This feature enables TypeScript checking in your Vite project. It ensures that TypeScript errors are caught during the development process.
import { defineConfig } from 'vite';
import Checker from 'vite-plugin-checker';
export default defineConfig({
plugins: [
Checker({ typescript: true })
]
});
VLS (Vetur Language Server) Checking
This feature integrates VLS (Vetur Language Server) checking into your Vite project, which is particularly useful for Vue.js projects. It helps catch errors and enforce coding standards for Vue components.
import { defineConfig } from 'vite';
import Checker from 'vite-plugin-checker';
export default defineConfig({
plugins: [
Checker({ vls: true })
]
});
ESLint Checking
This feature enables ESLint checking in your Vite project. It helps enforce coding standards and catch linting errors in your JavaScript/TypeScript code.
import { defineConfig } from 'vite';
import Checker from 'vite-plugin-checker';
export default defineConfig({
plugins: [
Checker({ eslint: { files: ['./src'] } })
]
});
Other packages similar to vite-plugin-checker
vite-plugin-eslint
vite-plugin-eslint is a Vite plugin that specifically focuses on integrating ESLint into your Vite project. It provides similar ESLint checking functionalities as vite-plugin-checker but does not offer TypeScript or VLS checking.
vite-plugin-ts-checker
vite-plugin-ts-checker is a Vite plugin that focuses on TypeScript type checking. It provides similar TypeScript checking functionalities as vite-plugin-checker but does not offer ESLint or VLS checking.
vite-plugin-vue
vite-plugin-vue is a Vite plugin that provides Vue.js support, including VLS (Vetur Language Server) integration. It offers similar VLS checking functionalities as vite-plugin-checker but does not provide TypeScript or ESLint checking.
A Vite plugin that can run TypeScript, VLS, vue-tsc, ESLint, Stylelint in worker thread.
Online playground
License
MIT License © 2022 fi3ework