ESLint plugin for linting inline JavaScript in Pug template files, currently at version 1.2.7. It extracts script tags without a type attribute or with type text/javascript and lints them using ESLint rules. The plugin processes .pug and .jade files, creating virtual files for linting. It has a simple setup with both processor and rules config. Alternative: eslint-plugin-html for HTML. Released under Unlicense with no dependencies.
npm install eslint-plugin-pugVerified import paths — ran on the pinned version, not inferred.
Shows minimal ESLint flat config to lint inline scripts in .pug files with a processeor and custom rule.
Use flat config with processor and rules separate sections; import default export.
Ensure your script tags have no type attribute or type='text/javascript'.
Set files in rules config to ['**/*.pug.js', '**/*.pug.mjs'] (or similar).
Migrate to flat config (eslint.config.js).
Use a separate tool like pug-lint for Pug syntax validation.
npm install --save-dev eslint-plugin-pug
import pug from 'eslint-plugin-pug' not import { pug } from ...Set processor: 'pug/pug' after adding plugin with key 'pug'.
No dependency data recorded yet.