Registry / testing / fly-pug-lint

fly-pug-lint

JSON →
library0.0.11jsnpmunverified

fly-pug-lint is a plugin for the Fly task runner (version 0.0.11) that integrates pug-lint for linting Pug (formerly Jade) templates. It allows developers to lint Pug files using Fly's streaming API, supporting both async/await and generator function syntax. The plugin delegates to pug-lint for configuration, typically using a .pug-lintrc.js file. It requires Fly ^1.3.1 as a peer dependency. Compared to standalone pug-lint, it offers seamless integration with Fly workflows but is limited by Fly's maintenance status.

npm install fly-pug-lint
INSTALL
IMPORT
SIG · FLY-PUG-LINT
F
fly-pug-lint
testingjavascriptv0.0.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

puglint
import { puglint } from 'fly-pug-lint'
const { puglint } = require('fly-pug-lint')
The plugin exports a named function 'puglint'. In CJS, require works but import is preferred for ESM projects.
puglint (default)
import puglint from 'fly-pug-lint'
const puglint = require('fly-pug-lint').default
The package does not have a default export; only named export 'puglint' is available.
CommonJS require
const puglint = require('fly-pug-lint').puglint
const puglint = require('fly-pug-lint')
Direct require returns an object with the puglint property, so destructuring is required.

Shows how to lint Pug files using fly-pug-lint with custom options in an async task.

import { puglint } from 'fly-pug-lint'; export async function lintPug() { await this .source('src/**/*.pug') .puglint({ extends: '.pug-lintrc.js', disallowIdAttributeWithStaticValue: true }); }
Debug
Known issues
deprecatedFly task runner is no longer actively maintained.
fix
Migrate to another task runner like Gulp or use standalone pug-lint.
affects: >=0.0.1
gotchaThe plugin exports only named export 'puglint', not default. Using import default will result in undefined.
fix
Use import { puglint } from 'fly-pug-lint' or require('fly-pug-lint').puglint.
affects: >=0.0.0
gotchaRequiring the package directly returns an object, not a function. Developers may mistakenly use require('fly-pug-lint') as a function.
fix
Use require('fly-pug-lint').puglint or import { puglint } from 'fly-pug-lint'.
affects: >=0.0.0
breakingThe plugin requires Fly ^1.3.1 and may not work with older versions of Fly due to API changes.
fix
Ensure Fly version is >=1.3.1.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: this.source(...).puglint is not a function
The plugin is not properly installed or imported as a Fly plugin. The function 'puglint' must be imported and used as a method on the Fly instance.
fix
Ensure fly-pug-lint is installed (npm install -D fly-pug-lint) and import { puglint } from 'fly-pug-lint' in your Flyfile.
Cannot find module 'pug-lint'
pug-lint is not automatically installed; it is a peer dependency of fly-pug-lint.
fix
Install pug-lint: npm install -D pug-lint
Cannot find module 'fly'
Fly is not installed or not in the project's dependencies.
fix
Install Fly: npm install -D fly@^1.3.1
Upgrade
Version history
0.0.11latest on npm
Audit
Dependencies
flyrequiredpeer dependency required for running tasks
Agent activity
2 hits · last 30 days
node
2
Resources
fly-pug-lint — npm install fly-pug-lint · libregistry