@markuplint/rules
Advanced tools
Comparing version 4.9.3 to 4.9.4
@@ -6,13 +6,16 @@ # Change Log | ||
## [4.9.3](https://github.com/markuplint/markuplint/compare/@markuplint/rules@4.9.2...@markuplint/rules@4.9.3) (2024-06-25) | ||
## [4.9.4](https://github.com/markuplint/markuplint/compare/@markuplint/rules@4.9.3...@markuplint/rules@4.9.4) (2024-09-02) | ||
**Note:** Version bump only for package @markuplint/rules | ||
### Bug Fixes | ||
* **ml-core:** `localName` returns lowercase when using case-sensitive parser for tag names ([b1acadd](https://github.com/markuplint/markuplint/commit/b1acaddfd6bf939ee809f6419ce85a701033ca4f)) | ||
## [4.9.3](https://github.com/markuplint/markuplint/compare/@markuplint/rules@4.9.2...@markuplint/rules@4.9.3) (2024-06-25) | ||
### Bug Fixes | ||
- **ml-core:** `localName` returns lowercase when using case-sensitive parser for tag names ([b1acadd](https://github.com/markuplint/markuplint/commit/b1acaddfd6bf939ee809f6419ce85a701033ca4f)) | ||
## [4.9.2](https://github.com/markuplint/markuplint/compare/@markuplint/rules@4.9.1...@markuplint/rules@4.9.2) (2024-06-09) | ||
@@ -19,0 +22,0 @@ |
@@ -227,3 +227,3 @@ import { isList, isKeyword, isEnum, isNumber, isDirective } from '@markuplint/types'; | ||
? t('either {0}', t(expectedObject)) | ||
: expectedObject[0] ?? null; | ||
: (expectedObject[0] ?? null); | ||
return expects; | ||
@@ -230,0 +230,0 @@ } |
@@ -70,3 +70,3 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { | ||
const spec = attrSpecs.find(s => s.name.toLowerCase() === name.toLowerCase()); | ||
log && log('Spec of the %s attr: %o', name, spec); | ||
log?.('Spec of the %s attr: %o', name, spec); | ||
invalid = attrCheck(t, name, value, false, spec); | ||
@@ -73,0 +73,0 @@ if (invalid === false && |
@@ -25,3 +25,2 @@ import { cmLog } from './debug.js'; | ||
let loopCount = 0; | ||
// eslint-disable-next-line no-constant-condition | ||
while (true) { | ||
@@ -92,3 +91,3 @@ loopCount++; | ||
? result.type | ||
: missingType ?? 'MISSING_NODE_REQUIRED'; | ||
: (missingType ?? 'MISSING_NODE_REQUIRED'); | ||
ptLog('%s(in %s); Needs %s', resultType, missingType, result.query); | ||
@@ -95,0 +94,0 @@ return compereResult({ |
import color from 'ansi-colors'; | ||
import { log } from '../debug.js'; | ||
export const cmLog = log.extend('content-model'); | ||
/* eslint-disable import/no-named-as-default-member */ | ||
export const bgGreen = color.bgGreen; | ||
@@ -12,2 +11,1 @@ export const green = color.green; | ||
export const cyan = color.cyan; | ||
/* eslint-enable import/no-named-as-default-member */ |
@@ -58,3 +58,3 @@ import { order } from './order.js'; | ||
? el | ||
: result.unmatched[0] ?? el, | ||
: (result.unmatched[0] ?? el), | ||
query: result.query, | ||
@@ -61,0 +61,0 @@ hint: result.hint, |
@@ -19,3 +19,3 @@ import type { ChildNode, Hints, MissingNodeReason, RepeatSign, Specs } from './types.js'; | ||
export declare function normalizeModel(pattern: ReadonlyDeep<PermittedContentRequire> | ReadonlyDeep<PermittedContentOptional> | ReadonlyDeep<PermittedContentOneOrMore> | ReadonlyDeep<PermittedContentZeroOrMore>): { | ||
model: ReadonlyDeep<PermittedContentPattern[] | Model>; | ||
model: ReadonlyDeep<Model | PermittedContentPattern[]>; | ||
min: number; | ||
@@ -35,3 +35,3 @@ max: number; | ||
}>; | ||
export declare function cleanObject<T extends Object>(object: T): Partial<T>; | ||
export declare function cleanObject<T extends object>(object: T): Partial<T>; | ||
export declare class Collection { | ||
@@ -38,0 +38,0 @@ #private; |
@@ -43,3 +43,3 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
const not = selectorResult | ||
.flatMap(r => (r.matched ? [] : r.not ?? [])) | ||
.flatMap(r => (r.matched ? [] : (r.not ?? []))) | ||
.flatMap(descendants) | ||
@@ -46,0 +46,0 @@ .shift(); |
@@ -20,3 +20,3 @@ import { getARIA } from '@markuplint/ml-spec'; | ||
? null | ||
: elAriaSpec?.properties?.without?.find(p => p.name === requiredProp)?.alt ?? null; | ||
: (elAriaSpec?.properties?.without?.find(p => p.name === requiredProp)?.alt ?? null); | ||
if (alt?.method === 'set-attr' && el.hasAttribute(alt.target)) { | ||
@@ -23,0 +23,0 @@ return; |
{ | ||
"name": "@markuplint/rules", | ||
"version": "4.9.3", | ||
"version": "4.9.4", | ||
"description": "Built-in rules of markuplint", | ||
@@ -28,8 +28,8 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"dependencies": { | ||
"@markuplint/html-spec": "4.8.2", | ||
"@markuplint/ml-core": "4.8.2", | ||
"@markuplint/ml-spec": "4.6.3", | ||
"@markuplint/selector": "4.6.5", | ||
"@markuplint/shared": "4.4.3", | ||
"@markuplint/types": "4.5.3", | ||
"@markuplint/html-spec": "4.9.0", | ||
"@markuplint/ml-core": "4.8.3", | ||
"@markuplint/ml-spec": "4.6.4", | ||
"@markuplint/selector": "4.6.6", | ||
"@markuplint/shared": "4.4.4", | ||
"@markuplint/types": "4.5.4", | ||
"@types/debug": "4.1.12", | ||
@@ -39,6 +39,6 @@ "@ungap/structured-clone": "1.2.0", | ||
"chrono-node": "2.7.6", | ||
"debug": "4.3.5", | ||
"type-fest": "4.20.1" | ||
"debug": "4.3.6", | ||
"type-fest": "4.26.0" | ||
}, | ||
"gitHead": "05fdca254661ec335ff0cae4c6a11db164b032b9" | ||
"gitHead": "77cd5a25d5cf28c83253b7bfe02cd25b54e236b0" | ||
} |
233326
237
5910
+ Added@markuplint/config-presets@4.5.5(transitive)
+ Added@markuplint/html-parser@4.6.6(transitive)
+ Added@markuplint/html-spec@4.9.0(transitive)
+ Added@markuplint/i18n@4.5.2(transitive)
+ Added@markuplint/ml-ast@4.4.3(transitive)
+ Added@markuplint/ml-config@4.7.3(transitive)
+ Added@markuplint/ml-core@4.8.3(transitive)
+ Added@markuplint/ml-spec@4.6.4(transitive)
+ Added@markuplint/parser-utils@4.6.6(transitive)
+ Added@markuplint/selector@4.6.6(transitive)
+ Added@markuplint/shared@4.4.4(transitive)
+ Added@markuplint/types@4.5.4(transitive)
+ Addeddebug@4.3.6(transitive)
+ Addeddom-accessibility-api@0.7.0(transitive)
+ Addedpostcss-selector-parser@6.1.2(transitive)
+ Addedtype-fest@4.26.0(transitive)
- Removed@markuplint/config-presets@4.5.4(transitive)
- Removed@markuplint/html-parser@4.6.5(transitive)
- Removed@markuplint/html-spec@4.8.2(transitive)
- Removed@markuplint/i18n@4.5.1(transitive)
- Removed@markuplint/ml-ast@4.4.2(transitive)
- Removed@markuplint/ml-config@4.7.2(transitive)
- Removed@markuplint/ml-core@4.8.2(transitive)
- Removed@markuplint/ml-spec@4.6.3(transitive)
- Removed@markuplint/parser-utils@4.6.5(transitive)
- Removed@markuplint/selector@4.6.5(transitive)
- Removed@markuplint/shared@4.4.3(transitive)
- Removed@markuplint/types@4.5.3(transitive)
- Removeddebug@4.3.5(transitive)
- Removeddom-accessibility-api@0.6.3(transitive)
- Removedpostcss-selector-parser@6.1.0(transitive)
- Removedtype-fest@4.20.1(transitive)
Updated@markuplint/html-spec@4.9.0
Updated@markuplint/ml-core@4.8.3
Updated@markuplint/ml-spec@4.6.4
Updated@markuplint/selector@4.6.6
Updated@markuplint/shared@4.4.4
Updated@markuplint/types@4.5.4
Updateddebug@4.3.6
Updatedtype-fest@4.26.0