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

@markuplint/ml-config

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markuplint/ml-config - npm Package Compare versions

Comparing version 3.0.0-alpha.0 to 3.0.0-alpha.1

69

lib/types.d.ts

@@ -0,1 +1,2 @@

import type { ParserOptions } from '@markuplint/ml-ast';
import type { RegexSelector } from '@markuplint/selector';

@@ -11,2 +12,3 @@ export type { RegexSelector } from '@markuplint/selector';

excludeFiles?: string[];
pretenders?: Pretender[];
rules?: Rules;

@@ -24,8 +26,69 @@ nodeRules?: NodeRule[];

}
export declare type ParserOptions = {
ignoreFrontMatter?: boolean;
};
export declare type SpecConfig = {
[extensionPattern: string]: string;
};
export declare type Pretender = {
/**
* Target node selectors
*/
selector: string;
/**
* If it is a string, it is resolved as an element name.
* An element has the same attributes as the pretended custom element
* because attributes are just inherited.
*
* If it is an Object, It creates the element by that.
*/
as: string | OriginalNode;
};
export declare type OriginalNode = {
/**
* Element name
*/
element: string;
/**
* Namespace
*
* Supports `"svg"` and `undefined` only.
* If it is `undefined`, the namespace is HTML.
*/
namespace?: 'svg';
/**
* Attributes
*/
attrs?: {
/**
* Attribute name
*/
name: string;
/**
* If it omits this property, the attribute is resolved as a boolean.
*/
value?: string | {
fromAttr: string;
};
}[];
/**
* To have attributes the defined element has.
*/
inheritAttrs?: boolean;
/**
* ARIA properties
*/
aria?: PretenderARIA;
};
/**
* Pretender Node ARIA properties
*/
export declare type PretenderARIA = {
/**
* Accessible name
*
* - If it is `true`, it assumes the element has any text on its accessible name.
* - If it specifies `fromAttr` property, it assumes the accessible name refers to the value of the attribute.
*/
name?: boolean | {
fromAttr: string;
};
};
export declare type Rule<T extends RuleConfigValue, O = void> = RuleConfig<T, O> | T | boolean;

@@ -32,0 +95,0 @@ export declare type AnyRule = Rule<RuleConfigValue, unknown>;

9

package.json
{
"name": "@markuplint/ml-config",
"version": "3.0.0-alpha.0",
"version": "3.0.0-alpha.1",
"description": "JSON Schema and TypeScript types of markuplint configure JSON",

@@ -19,6 +19,7 @@ "repository": "git@github.com:markuplint/markuplint.git",

"devDependencies": {
"@types/mustache": "^4.1.2"
"@markuplint/ml-ast": "3.0.0-alpha.1",
"@types/mustache": "^4.2.1"
},
"dependencies": {
"@markuplint/selector": "3.0.0-alpha.0",
"@markuplint/selector": "3.0.0-alpha.1",
"deepmerge": "^4.2.2",

@@ -28,3 +29,3 @@ "is-plain-object": "^5.0.0",

},
"gitHead": "d32c522e016888e20bcbb5f09352c006b964f193"
"gitHead": "56de89456146a06777eb5b6d4e8ba456147dd18b"
}

Sorry, the diff of this file is not supported yet

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