@markuplint/rules
Advanced tools
Comparing version 4.0.0-alpha.6 to 4.0.0-alpha.7
@@ -6,3 +6,3 @@ import { getContentModel } from '@markuplint/ml-spec'; | ||
el, rules, options) { | ||
const model = createModel(el, rules); | ||
const { model, specs } = createModel(el, rules); | ||
if (model == null) { | ||
@@ -18,3 +18,3 @@ return [ | ||
} | ||
const result = start(model, el, el.ownerMLDocument.specs, options); | ||
const result = start(model, el, specs, options); | ||
return result; | ||
@@ -27,3 +27,6 @@ } | ||
const model = getContentModel(el, specs.specs); | ||
return model; | ||
return { | ||
model, | ||
specs, | ||
}; | ||
} | ||
@@ -30,0 +33,0 @@ const caches = new Map(); |
@@ -1,3 +0,3 @@ | ||
/// <reference types="debug" /> | ||
export declare const cmLog: import("debug").Debugger; | ||
import type { Log } from '../debug.js'; | ||
export declare const cmLog: Log; | ||
export declare const bgGreen: { | ||
@@ -4,0 +4,0 @@ (): void; |
@@ -1,4 +0,4 @@ | ||
/// <reference types="debug" /> | ||
import type { Log } from '../debug.js'; | ||
import color from 'ansi-colors'; | ||
export declare const cmLog: import("debug").Debugger; | ||
export declare const cmLog: Log; | ||
export declare const bgGreen: color.StyleFunction; | ||
@@ -5,0 +5,0 @@ export declare const green: color.StyleFunction; |
@@ -10,5 +10,2 @@ import { createRule, getRoleSpec, getComputedRole } from '@markuplint/ml-core'; | ||
await document.walkOn('Element', el => { | ||
if (el.pretenderContext?.type === 'pretender') { | ||
return; | ||
} | ||
if (accnameMayBeMutable(el, document)) { | ||
@@ -15,0 +12,0 @@ return; |
@@ -78,3 +78,3 @@ import { getComputedRole, isRequiredOwnedElement } from '@markuplint/ml-spec'; | ||
scope: el, | ||
message: t('{0}. Or, {1}', t('require {0}', role.requiredOwnedElements.length === 1 && role.requiredOwnedElements[0] | ||
message: t('{0}. Or, {1}', t('{0} requires {1}', t('the {0}', 'child element'), role.requiredOwnedElements.length === 1 && role.requiredOwnedElements[0] | ||
? t('the "{0*}" {1}', role.requiredOwnedElements[0], 'role') | ||
@@ -81,0 +81,0 @@ : t('the {0}', 'roles') + `: ${t(role.requiredOwnedElements)}`), t('require {0}', 'aria-busy="true"')), |
{ | ||
"name": "@markuplint/rules", | ||
"version": "4.0.0-alpha.6", | ||
"version": "4.0.0-alpha.7", | ||
"description": "Built-in rules of markuplint", | ||
@@ -28,16 +28,16 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"dependencies": { | ||
"@markuplint/html-spec": "4.0.0-alpha.6", | ||
"@markuplint/ml-core": "4.0.0-alpha.6", | ||
"@markuplint/ml-spec": "4.0.0-alpha.6", | ||
"@markuplint/selector": "4.0.0-alpha.6", | ||
"@markuplint/shared": "4.0.0-alpha.6", | ||
"@markuplint/types": "4.0.0-alpha.6", | ||
"@markuplint/html-spec": "4.0.0-alpha.7", | ||
"@markuplint/ml-core": "4.0.0-alpha.7", | ||
"@markuplint/ml-spec": "4.0.0-alpha.7", | ||
"@markuplint/selector": "4.0.0-alpha.7", | ||
"@markuplint/shared": "4.0.0-alpha.7", | ||
"@markuplint/types": "4.0.0-alpha.7", | ||
"@types/debug": "^4.1.12", | ||
"@ungap/structured-clone": "^1.2.0", | ||
"ansi-colors": "^4.1.3", | ||
"chrono-node": "^2.7.3", | ||
"chrono-node": "^2.7.4", | ||
"debug": "^4.3.4", | ||
"type-fest": "^4.8.2" | ||
"type-fest": "^4.9.0" | ||
}, | ||
"gitHead": "06e1242d274c72cf08a10a572b06ac35d1b924a4" | ||
"gitHead": "571129bf6498541125e1e7c3907d5ed9af53459a" | ||
} |
Sorry, the diff of this file is not supported yet
197500
+ Added@markuplint/config-presets@4.0.0-alpha.7(transitive)
+ Added@markuplint/html-parser@4.0.0-alpha.7(transitive)
+ Added@markuplint/html-spec@4.0.0-alpha.7(transitive)
+ Added@markuplint/i18n@4.0.0-alpha.7(transitive)
+ Added@markuplint/ml-ast@4.0.0-alpha.7(transitive)
+ Added@markuplint/ml-config@4.0.0-alpha.7(transitive)
+ Added@markuplint/ml-core@4.0.0-alpha.7(transitive)
+ Added@markuplint/ml-spec@4.0.0-alpha.7(transitive)
+ Added@markuplint/parser-utils@4.0.0-alpha.7(transitive)
+ Added@markuplint/selector@4.0.0-alpha.7(transitive)
+ Added@markuplint/shared@4.0.0-alpha.7(transitive)
+ Added@markuplint/types@4.0.0-alpha.7(transitive)
- Removed@markuplint/config-presets@4.0.0-alpha.6(transitive)
- Removed@markuplint/html-parser@4.0.0-alpha.6(transitive)
- Removed@markuplint/html-spec@4.0.0-alpha.6(transitive)
- Removed@markuplint/i18n@4.0.0-alpha.6(transitive)
- Removed@markuplint/ml-ast@4.0.0-alpha.6(transitive)
- Removed@markuplint/ml-config@4.0.0-alpha.6(transitive)
- Removed@markuplint/ml-core@4.0.0-alpha.6(transitive)
- Removed@markuplint/ml-spec@4.0.0-alpha.6(transitive)
- Removed@markuplint/parser-utils@4.0.0-alpha.6(transitive)
- Removed@markuplint/selector@4.0.0-alpha.6(transitive)
- Removed@markuplint/shared@4.0.0-alpha.6(transitive)
- Removed@markuplint/types@4.0.0-alpha.6(transitive)
Updatedchrono-node@^2.7.4
Updatedtype-fest@^4.9.0