@html-eslint/core
v0.58.1
Published
Core HTML validation logic for html-eslint
Maintainers
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/coreUsage
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
