@markuplint/rules
Advanced tools
Comparing version 4.9.4 to 4.10.0
@@ -6,2 +6,19 @@ # Change Log | ||
# [4.10.0](https://github.com/markuplint/markuplint/compare/@markuplint/rules@4.9.4...@markuplint/rules@4.10.0) (2024-09-23) | ||
### Bug Fixes | ||
* **rules:** excluded cases where the element is palpable from the `no-empty-palpable-content` rule ([6071c51](https://github.com/markuplint/markuplint/commit/6071c5133b7c5d52d8e052ac9f39fb5b10c38b8e)) | ||
* **rules:** fix the message of the `heading-levels` rule and add to translate in Japanese ([ec57e1e](https://github.com/markuplint/markuplint/commit/ec57e1e5ff4549ee5574928ad20fd461d87974a5)) | ||
### Features | ||
* **types:** avoid parsing and simply accept any value when the CSS includes `var()` ([5817693](https://github.com/markuplint/markuplint/commit/5817693cfcd1a253c627db323505e4b515f69395)) | ||
## [4.9.4](https://github.com/markuplint/markuplint/compare/@markuplint/rules@4.9.3...@markuplint/rules@4.9.4) (2024-09-02) | ||
@@ -8,0 +25,0 @@ |
@@ -15,3 +15,3 @@ import { createRule } from '@markuplint/ml-core'; | ||
scope: heading, | ||
message: t('Heading levels should not be skipped'), | ||
message: t('{0} must not be skipped', t('Heading levels')), | ||
}); | ||
@@ -18,0 +18,0 @@ } |
import { createRule } from '@markuplint/ml-core'; | ||
import { isNothingContentModel, isPalpableElement } from '@markuplint/ml-spec'; | ||
import meta from './meta.js'; | ||
const allowedElements = new Set([ | ||
// These elements are possibly empty because it to be filled by user interaction. | ||
'textarea', | ||
'output', | ||
// Since the element itself is palpable, there is no need to determine whether its content is empty. | ||
'audio', | ||
'canvas', | ||
'video', | ||
'img', | ||
]); | ||
export default createRule({ | ||
@@ -13,8 +23,3 @@ meta: meta, | ||
await document.walkOn('Element', el => { | ||
/** | ||
* Exception | ||
* | ||
* - The `textarea` element is possibly empty because a user inputs it. | ||
*/ | ||
if (el.localName === 'textarea') { | ||
if (allowedElements.has(el.localName)) { | ||
return; | ||
@@ -21,0 +26,0 @@ } |
@@ -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<Model | PermittedContentPattern[]>; | ||
model: ReadonlyDeep<PermittedContentPattern[] | Model>; | ||
min: number; | ||
@@ -22,0 +22,0 @@ max: number; |
{ | ||
"name": "@markuplint/rules", | ||
"version": "4.9.4", | ||
"version": "4.10.0", | ||
"description": "Built-in rules of markuplint", | ||
@@ -28,16 +28,16 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"dependencies": { | ||
"@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", | ||
"@markuplint/html-spec": "4.9.1", | ||
"@markuplint/ml-core": "4.9.0", | ||
"@markuplint/ml-spec": "4.7.0", | ||
"@markuplint/selector": "4.6.7", | ||
"@markuplint/shared": "4.4.5", | ||
"@markuplint/types": "4.6.0", | ||
"@types/debug": "4.1.12", | ||
"@ungap/structured-clone": "1.2.0", | ||
"ansi-colors": "4.1.3", | ||
"chrono-node": "2.7.6", | ||
"debug": "4.3.6", | ||
"type-fest": "4.26.0" | ||
"chrono-node": "2.7.7", | ||
"debug": "4.3.7", | ||
"type-fest": "4.26.1" | ||
}, | ||
"gitHead": "77cd5a25d5cf28c83253b7bfe02cd25b54e236b0" | ||
"gitHead": "05d2eabfcc41b67847c24049f12dd2b9f5ca6485" | ||
} |
234240
5915
+ Added@markuplint/config-presets@4.5.6(transitive)
+ Added@markuplint/html-parser@4.6.7(transitive)
+ Added@markuplint/html-spec@4.9.1(transitive)
+ Added@markuplint/i18n@4.5.3(transitive)
+ Added@markuplint/ml-ast@4.4.4(transitive)
+ Added@markuplint/ml-config@4.7.4(transitive)
+ Added@markuplint/ml-core@4.9.0(transitive)
+ Added@markuplint/ml-spec@4.7.0(transitive)
+ Added@markuplint/parser-utils@4.6.7(transitive)
+ Added@markuplint/selector@4.6.7(transitive)
+ Added@markuplint/shared@4.4.5(transitive)
+ Added@markuplint/types@4.6.0(transitive)
+ Addedchrono-node@2.7.7(transitive)
+ Addedcss-tree@3.0.0(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addedmdn-data@2.10.0(transitive)
+ Addedms@2.1.3(transitive)
+ Addedtype-fest@4.26.1(transitive)
- Removed@markuplint/config-presets@4.5.5(transitive)
- Removed@markuplint/html-parser@4.6.6(transitive)
- Removed@markuplint/html-spec@4.9.0(transitive)
- Removed@markuplint/i18n@4.5.2(transitive)
- Removed@markuplint/ml-ast@4.4.3(transitive)
- Removed@markuplint/ml-config@4.7.3(transitive)
- Removed@markuplint/ml-core@4.8.3(transitive)
- Removed@markuplint/ml-spec@4.6.4(transitive)
- Removed@markuplint/parser-utils@4.6.6(transitive)
- Removed@markuplint/selector@4.6.6(transitive)
- Removed@markuplint/shared@4.4.4(transitive)
- Removed@markuplint/types@4.5.4(transitive)
- Removedchrono-node@2.7.6(transitive)
- Removedcss-tree@2.3.1(transitive)
- Removeddebug@4.3.6(transitive)
- Removedmdn-data@2.0.30(transitive)
- Removedms@2.1.2(transitive)
- Removedtype-fest@4.26.0(transitive)
Updated@markuplint/html-spec@4.9.1
Updated@markuplint/ml-core@4.9.0
Updated@markuplint/ml-spec@4.7.0
Updated@markuplint/selector@4.6.7
Updated@markuplint/shared@4.4.5
Updated@markuplint/types@4.6.0
Updatedchrono-node@2.7.7
Updateddebug@4.3.7
Updatedtype-fest@4.26.1