Provides a pug-lint configuration preset that helps migrate Pug templates from v1 to v2 by enabling rules that detect deprecated or incompatible patterns. Version 1.0.2 is the latest stable release, updated infrequently. Key differentiator: this is an official preset from the Pug team, ensuring accurate migration checks for breaking changes between Pug v1 and v2, such as attribute syntax and iteration.
npm install pug-lint-config-migration-v2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install pug-lint and the migration config, add .pug-lintrc.json with extends, then run the linter on your Pug files.
Replace attribute values with template literals or string expressions, e.g., a(href=`/${user.id}`) Profile.Use div(attributes) or spread attributes with the rest syntax: div(...attrs).
Replace mixins with includes or composition patterns.
Update iteration order: 'each value, index in array' (value first, then index).
Convert style objects to CSS strings: style="color: red; font-size: 14px" or use a helper.
Run 'npm install --save-dev pug-lint' in your project root.
Ensure your .pug-lintrc.json contains: { "extends": "migration-v2" } and run 'npm install --save-dev pug-lint-config-migration-v2'.Update pug-lint to version >=2.3.0 as specified in peer dependencies.