JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 59735
  • Score
    100M100P100Q146116F
  • License MIT

Core HTML validation logic for html-eslint

Package Exports

  • @html-eslint/core

Readme

@html-eslint/core

Core HTML validation logic for html-eslint.

Overview

This package provides framework-agnostic HTML validation utilities that can be used across different ESLint plugins (Angular, Svelte, etc.).

Installation

npm install @html-eslint/core

Usage

import { noInvalidAttrValue } from "@html-eslint/core";

// Create a rule instance with options
const rule = noInvalidAttrValue({
  allow: [{ tag: "img", attr: "src", valuePattern: "^https://.*" }],
});

// Validate attributes using an adapter
const result = rule.checkAttributes(elementAdapter);

License

MIT