capsule-lint
Advanced tools
Comparing version 0.4.11 to 0.4.12
@@ -7,5 +7,5 @@ import { Hint, Rule, Ruleset } from 'htmlhint/types'; | ||
export type CapsuleRuleset = Ruleset & { | ||
'html-valid-children': HeadValidChildrenOptions; | ||
'valid-path-format': ValidPathFormatOptions; | ||
'html-valid-children'?: HeadValidChildrenOptions; | ||
'valid-path-format'?: ValidPathFormatOptions; | ||
}; | ||
export declare function lint(html: string, config?: Ruleset): Hint[]; | ||
export declare function lint(html: string, ruleset?: CapsuleRuleset): Hint[]; |
{ | ||
"name": "capsule-lint", | ||
"version": "0.4.11", | ||
"version": "0.4.12", | ||
"description": "The official Capsule linting package.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -21,8 +21,8 @@ import { HTMLHint } from 'htmlhint'; | ||
export type CapsuleRuleset = Ruleset & { | ||
'html-valid-children': HeadValidChildrenOptions, | ||
'valid-path-format': ValidPathFormatOptions | ||
'html-valid-children'?: HeadValidChildrenOptions, | ||
'valid-path-format'?: ValidPathFormatOptions | ||
} | ||
export function lint(html: string, config?: Ruleset): Hint[] { | ||
return HTMLHint.verify(html, config ?? defaultConfig).map(error => { | ||
export function lint(html: string, ruleset?: CapsuleRuleset): Hint[] { | ||
return HTMLHint.verify(html, ruleset ?? defaultConfig).map(error => { | ||
error.rule.link = error.rule.link.replace( | ||
@@ -29,0 +29,0 @@ 'https://htmlhint.com/docs/user-guide/rules/', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1009013