Registry / testing / pug-lint-config-ctrl

pug-lint-config-ctrl

JSON →
library1.3.0jsnpmunverified

A shareable configuration for pug-lint enforcing coding standards for the ctrl framework. Current version 1.3.0 (no recent updates, appears stable). Defines rules for Pug/Jade templates (indentation, attribute order, etc.). Requires pug-lint ^2.3.0 as a peer dependency. Simple 'extends' usage similar to ESLint configs. Limited adoption; alternatives: pug-lint-config-google or custom configs. Not actively maintained (last update likely 2016).

npm install pug-lint-config-ctrl
INSTALL
IMPORT
SIG · PUG-LINT-CONFIG-CT
P
pug-lint-config-ctrl
testingjavascriptv1.3.0
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.

extends (in .pug-lintrc)
{ "extends": "ctrl" }
{ "extends": ["ctrl"] }
Set extends to a string, not an array; pug-lint expects a single config name.

Install, configure with extends, and run pug-lint programmatically using this config.

// Install: npm install --save-dev pug-lint pug-lint-config-ctrl // Create .pug-lintrc.json in project root: { "extends": "ctrl" } // Run pug-lint: const pugLint = require('pug-lint'); const linter = new pugLint(); linter.configure(require('pug-lint-config-ctrl')); const errors = linter.checkFile('template.pug'); console.log(errors);
Debug
Known issues
gotchaThe config file must be named .pug-lintrc.json or configured via package.json; using a .eslintrc file will not work as shown in README.
fix
Create .pug-lintrc.json in project root with the extends field.
affects: >=1.0.0
deprecatedThis package appears unmaintained since 2016; may not work with newer versions of pug-lint.
fix
Consider migrating to an alternative config or custom rules.
affects: >=1.3.0
Errors
Common errors & fixes
Error: Cannot find module 'pug-lint-config-ctrl'
pug-lint-config-ctrl not installed or missing from node_modules.
fix
Run: npm install --save-dev pug-lint-config-ctrl
Configuration for rule "extends" is invalid: Expected a string but got an array.
Extends set to an array instead of a string.
fix
Change "extends": ["ctrl"] to "extends": "ctrl"
pug-lint: No configuration found
No .pug-lintrc.json file found in project root or parent directories.
fix
Create a .pug-lintrc.json file with at least {"extends": "ctrl"}
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies
pug-lintrequiredpeer dependency required to lint Pug files
Agent activity
2 hits · last 30 days
node
2
Resources
pug-lint-config-ctrl — npm install pug-lint-config-ctrl · libregistry