File tree Expand file tree Collapse file tree 5 files changed +7
-9
lines changed
Expand file tree Collapse file tree 5 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ function ensureGlobals(window) {
2626}
2727function audit ( html , options = { } ) {
2828 const config = {
29- componentMode : options . componentMode ?? false
29+ componentMode : options . componentMode ?? isHTMLFragment ( html )
3030 } ;
3131 if ( options . includeAAA )
3232 config . includeAAA = true ;
Original file line number Diff line number Diff line change @@ -7766,11 +7766,11 @@ function ensureGlobals(window) {
77667766 globalsRegistered = true ;
77677767}
77687768function audit ( html , options = { } ) {
7769- const config = { } ;
7769+ const config = {
7770+ componentMode : options . componentMode ?? isHTMLFragment ( html )
7771+ } ;
77707772 if ( options . includeAAA )
77717773 config . includeAAA = true ;
7772- if ( options . componentMode )
7773- config . componentMode = true ;
77747774 if ( options . disabledRules ?. length )
77757775 config . disabledRules = options . disabledRules ;
77767776 Bn ( config ) ;
@@ -7868,7 +7868,6 @@ var main = defineCommand({
78687868 const disabledRules = args . disable ? args . disable . split ( "," ) . map ( ( s2 ) => s2 . trim ( ) ) : undefined ;
78697869 const result = audit ( html , {
78707870 includeAAA : args [ "include-aaa" ] ,
7871- componentMode : isHTMLFragment ( html ) ,
78727871 disabledRules
78737872 } ) ;
78747873 console . log ( format ( result , args . format ) ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @accesslint/cli" ,
3- "version" : " 0.3.1 " ,
3+ "version" : " 0.3.2 " ,
44 "repository" : {
55 "type" : " git" ,
66 "url" : " https://github.com/AccessLint/cli"
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ function ensureGlobals(window: typeof globalThis): void {
3838
3939export function audit ( html : string , options : AuditOptions = { } ) : AuditResult {
4040 const config : ConfigureOptions = {
41- componentMode : options . componentMode ?? false ,
41+ componentMode : options . componentMode ?? isHTMLFragment ( html ) ,
4242 } ;
4343 if ( options . includeAAA ) config . includeAAA = true ;
4444 if ( options . disabledRules ?. length ) config . disabledRules = options . disabledRules ;
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22import { defineCommand , runMain } from "citty" ;
33import { resolveInput } from "./input.js" ;
4- import { audit , isHTMLFragment } from "./audit.js" ;
4+ import { audit } from "./audit.js" ;
55import { format } from "./format.js" ;
66
77const main = defineCommand ( {
@@ -42,7 +42,6 @@ const main = defineCommand({
4242
4343 const result = audit ( html , {
4444 includeAAA : args [ "include-aaa" ] ,
45- componentMode : isHTMLFragment ( html ) ,
4645 disabledRules,
4746 } ) ;
4847
You can’t perform that action at this time.
0 commit comments