Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@markuplint/rules

Package Overview
Dependencies
Maintainers
0
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markuplint/rules - npm Package Compare versions

Comparing version 4.9.4 to 4.10.0

17

CHANGELOG.md

@@ -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 @@

2

lib/heading-levels/index.js

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc