gulp-pug-lint

raw JSON →
0.1.6 verified Fri May 01 auth: no javascript deprecated

Gulp plugin for pug-lint, version 0.1.6, originally released as a wrapper to integrate pug-lint into Gulp build pipelines. It lints Pug (formerly Jade) templates against configurable rules defined in a .pug-lintrc file. The package has seen no updates since 2016, and both pug-lint and gulp ecosystems have evolved significantly. No TypeScript types are provided. Key differentiator: Gulp-specific streaming integration. Alternatives exist as standalone ESLint plugins or direct pug-lint CLI.

error Error: Cannot find module 'gulp-pug-lint'
cause Package not installed.
fix
npm install --save-dev gulp-pug-lint
error TypeError: puglint is not a function
cause Incorrect import (e.g., using default export with require).
fix
Use const puglint = require('gulp-pug-lint'); not require('gulp-pug-lint').default.
error Error: No configuration file found. Please create a .pug-lintrc file.
cause Missing .pug-lintrc configuration.
fix
Create a .pug-lintrc file in your project root with pug-lint rules.
deprecated Package has not been updated since 2016. pug-lint itself is no longer actively maintained.
fix Consider using eslint-plugin-pug or direct pug-lint CLI via gulp-shell.
gotcha By default, only files with .jade extension are linted; .pug files require explicit globbing or rename.
fix Use glob 'views/**/*.pug' in gulp.src().
gotcha No TypeScript type definitions available.
fix Create custom .d.ts or use @ts-ignore.
npm install gulp-pug-lint
yarn add gulp-pug-lint
pnpm add gulp-pug-lint

Defines a Gulp task that lints all Pug files in the views directory using pug-lint configuration from .pug-lintrc.

var gulp = require('gulp');
var puglint = require('gulp-pug-lint');

gulp.task('lint-pug', function() {
  return gulp.src('views/**/*.pug')
    .pipe(puglint())
    .pipe(gulp.dest('./dist'));
});