markuplint-angular-parser is an official parser plugin for the `markuplint` HTML linter, specifically designed to understand Angular template syntax. It enables `markuplint` to accurately parse and lint `.html` files containing Angular-specific constructs such as interpolations (`{{...}}`), property bindings (`[...]`), event bindings (`(...)`), and structural directives (`*ngIf`, `*ngFor`). The current stable version is `3.0.2`, and its release cycle is closely tied to the major versions of `markuplint`, with patch releases addressing bug fixes. A key differentiator is its deep integration with `markuplint`'s architecture, providing robust linting capabilities for Angular projects by correctly interpreting template expressions and preventing false positives or missed errors that generic HTML parsers might encounter. It primarily serves as a configuration entry for `markuplint`, rather than a library for direct programmatic use.
npm install markuplint-angular-parserVerified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic linting of an Angular HTML template using markuplint-angular-parser and common rules.
Migrate your project to use ECMAScript Modules (ESM) syntax (`import/export`) or configure your environment to load ESM. Ensure your `package.json` specifies `"type": "module"` or use `.mjs` file extensions for ESM files.
Review the `markuplint` v4 changelog and migration guide. Update `markuplint` and any related plugins or configurations to ensure compatibility with the new major version.
If upgrading from `markuplint-angular-parser` v1.x, consult the `markuplint` v3 migration guide and update your configurations accordingly.
Ensure `markuplint` is installed (`npm i -D markuplint`) and configured in your project's `.markuplintrc.*` file to use this parser for Angular HTML files.
Verify that your `.markuplintrc` file correctly maps your Angular template file extensions (e.g., `.html$`) to `"markuplint-angular-parser"` in the `parser` option.
Run `npm install markuplint-angular-parser` or `yarn add markuplint-angular-parser` in your project.
Use `import AngularParser from 'markuplint-angular-parser';` instead. Ensure your project's `package.json` has `"type": "module"` or your file uses the `.mjs` extension for ESM.
Check your `.markuplintrc.*` file. Ensure the `parser` option has an entry like `".html$": "markuplint-angular-parser"` to correctly associate HTML files with the Angular parser.