{"id":26603,"library":"vite-plugin-vue-pug-lint","title":"Vite Plugin Vue Pug Lint","description":"vite-plugin-vue-pug-lint is a Vite plugin that integrates pug-lint into Vue single file components (SFCs), providing linting for Pug templates during development and build. The current version 1.1.0 is stable and supports Vite 2.x and pug-lint 2.6.0 as peer dependencies. It is a direct replacement for the Webpack-based vue-pug-lint-loader, offering similar functionality with a simple plugin API. The plugin allows custom configuration via configFile option and filter patterns for include/exclude. It ships TypeScript types and is actively maintained.","status":"active","version":"1.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/brzezinskimarcin/vite-plugin-vue-pug-lint","tags":["javascript","vite-plugin","vue","pug","pug-lint","typescript"],"install":[{"cmd":"npm install vite-plugin-vue-pug-lint","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-vue-pug-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-vue-pug-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, required for plugin to work","package":"vite","optional":true},{"reason":"peer dependency, provides the linting engine","package":"pug-lint","optional":true}],"imports":[{"note":"ESM-only; no CommonJS export","wrong":"const pugLint = require('vite-plugin-vue-pug-lint')","symbol":"default","correct":"import pugLint from 'vite-plugin-vue-pug-lint'"},{"note":"Default export, not named export","wrong":"const { pugLint } = require('vite-plugin-vue-pug-lint')","symbol":"default","correct":"import pugLint from 'vite-plugin-vue-pug-lint'"},{"note":"Named export also available since v1.0.0","wrong":"import pugLint from 'vite-plugin-vue-pug-lint'","symbol":"pugLint","correct":"import { pugLint } from 'vite-plugin-vue-pug-lint'"}],"quickstart":{"code":"// vite.config.js\nimport { defineConfig } from 'vite';\nimport vue from '@vitejs/plugin-vue';\nimport pugLint from 'vite-plugin-vue-pug-lint';\n\nexport default defineConfig({\n  plugins: [\n    pugLint({\n      configFile: 'path/to/.pug-lintrc', // optional\n      include: /\\.vue$/, // default\n      exclude: /node_modules/, // default\n    }),\n    vue(),\n  ],\n});\n\n// Then configure pug-lint rules as usual, e.g., .pug-lintrc.json:\n// { \"disallowIdLiterals\": true }","lang":"javascript","description":"Shows how to install and configure vite-plugin-vue-pug-lint with custom options in a Vite project using Vue."},"warnings":[{"fix":"Upgrade to a newer version if available, or stay on Vite 2","message":"Requires Vite 2.x; not compatible with Vite 3+","severity":"breaking","affected_versions":"<=1.1.0"},{"fix":"Evaluate alternatives like eslint-plugin-vue-pug","message":"pug-lint itself is no longer actively maintained; consider using pug-lexer and custom scripts","severity":"deprecated","affected_versions":">=2.6.0"},{"fix":"Use include option to add extra patterns: /\\.pug$/","message":"The plugin only lints .vue files; it ignores .pug standalone files","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure pugLint() is called before vue()","message":"Plugin must be placed before @vitejs/plugin-vue in plugins array","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install pug-lint --save-dev","cause":"pug-lint not installed as devDependency","error":"Cannot find module 'pug-lint'"},{"fix":"Use default import: import pugLint from 'vite-plugin-vue-pug-lint'","cause":"Importing the plugin incorrectly, using named export as default","error":"TypeError: pugLint is not a function"},{"fix":"Check the path or remove configFile option to use default lookup","cause":"Specified configFile path does not exist","error":"Error: The configuration file was not found at path/to/.pug-lintrc"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}