{"id":26120,"library":"pug-lint","title":"pug-lint","description":"An unopinionated and configurable linter and style checker for Pug (formerly Jade). Current stable version is 2.7.0, released in 2016 with no further updates. The project is effectively abandoned; no releases since 2016. It provides a CLI, configuration via .pug-lintrc files or package.json, and supports extending configs from npm packages. Key differentiators: highly configurable with many rules, but no longer maintained, so use with caution.","status":"abandoned","version":"2.7.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/pugjs/pug-lint","tags":["javascript","puglint","jadelint","pug-lint","jade-lint","pug","jade","lint","code style"],"install":[{"cmd":"npm install pug-lint","lang":"bash","label":"npm"},{"cmd":"yarn add pug-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add pug-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Parses Pug templates into tokens for linting.","package":"pug-lexer","optional":false}],"imports":[{"note":"Correct import for the Linter class in modern usage.","wrong":"const Linter = require('pug-lint').Linter","symbol":"Linter","correct":"import { Linter } from 'pug-lint'"},{"note":"Default export is the Linter constructor.","wrong":"const pugLint = require('pug-lint').default","symbol":"default","correct":"import pugLint from 'pug-lint'"},{"note":"Internal helper; not part of public API but sometimes used.","wrong":"","symbol":"ConfigFile","correct":"import { loadConfig } from 'pug-lint/lib/config'"}],"quickstart":{"code":"const pugLint = require('pug-lint');\nconst linter = new pugLint();\nlinter.configure({\n  rules: {\n    'disallowIdLiterals': true\n  }\n});\nconst results = linter.checkString('div#my-id');\nconsole.log(results);","lang":"javascript","description":"Shows how to create a linter instance, configure it with rules, and lint a Pug string."},"warnings":[{"fix":"Use extends property in config file instead of preset.","message":"Deprecated preset configuration option in favour of extends.","severity":"deprecated","affected_versions":">=2.2.0"},{"fix":"Ensure .pug-lintrc.js exports a config object via module.exports.","message":"Configuration file loading can be inconsistent with .pug-lintrc.js needing module.exports.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Update to v2.1.8+ or adjust error parsing.","message":"Some rules like 'validateIndentation' may not report correct column numbers in older versions.","severity":"gotcha","affected_versions":"<2.1.8"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install pug-lexer: npm install pug-lexer","cause":"Missing peer dependency pug-lexer.","error":"Error: Cannot find module 'pug-lexer'"},{"fix":"Use const linter = new pugLint.Linter() or import { Linter } from 'pug-lint' and then new Linter().","cause":"Using default import incorrectly (e.g. import pugLint from 'pug-lint' without calling new).","error":"TypeError: linter.configure is not a function"},{"fix":"Create a .pug-lintrc file or add pugLintConfig to package.json.","cause":"Missing .pug-lintrc or package.json pugLintConfig.","error":"Error: No configuration found for pug-lint"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}