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.6.0 to 3.6.1

272

lib/types.d.ts

@@ -6,90 +6,82 @@ import type { ParserOptions } from '@markuplint/ml-ast';

export type Config = {
readonly $schema?: string;
readonly extends?: string | readonly string[];
readonly plugins?: readonly (PluginConfig | string)[];
readonly parser?: ParserConfig;
readonly parserOptions?: ParserOptions;
readonly specs?: SpecConfig;
readonly excludeFiles?: readonly string[];
readonly pretenders?: readonly Pretender[];
readonly rules?: Rules;
readonly nodeRules?: readonly NodeRule[];
readonly childNodeRules?: readonly ChildNodeRule[];
readonly overrides?: Readonly<Record<string, OverrideConfig>>;
readonly $schema?: string;
readonly extends?: string | readonly string[];
readonly plugins?: readonly (PluginConfig | string)[];
readonly parser?: ParserConfig;
readonly parserOptions?: ParserOptions;
readonly specs?: SpecConfig;
readonly excludeFiles?: readonly string[];
readonly pretenders?: readonly Pretender[];
readonly rules?: Rules;
readonly nodeRules?: readonly NodeRule[];
readonly childNodeRules?: readonly ChildNodeRule[];
readonly overrides?: Readonly<Record<string, OverrideConfig>>;
};
export type PrimitiveScalar = string | number | boolean;
export type PlainData =
| Nullable<PrimitiveScalar>
| readonly PlainData[]
| {
readonly [key: string]: PlainData | any;
};
export type NonNullablePlainData =
| PrimitiveScalar
| readonly NonNullablePlainData[]
| {
readonly [key: string]: NonNullablePlainData;
};
export type PlainData = Nullable<PrimitiveScalar> | readonly PlainData[] | {
readonly [key: string]: PlainData | any;
};
export type NonNullablePlainData = PrimitiveScalar | readonly NonNullablePlainData[] | {
readonly [key: string]: NonNullablePlainData;
};
export type OverrideConfig = Omit<Config, '$schema' | 'extends' | 'overrides'>;
export type PluginConfig = {
readonly name: string;
readonly settings: Readonly<Record<string, NonNullablePlainData>>;
readonly name: string;
readonly settings: Readonly<Record<string, NonNullablePlainData>>;
};
export type ParserConfig = {
readonly [extensionPattern: string]: string;
readonly [extensionPattern: string]: string;
};
export type SpecConfig = {
readonly [extensionPattern: string]: string;
readonly [extensionPattern: string]: string;
};
export type Pretender = {
/**
* Target node selectors
*/
readonly 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.
*/
readonly as: string | OriginalNode;
/**
* Target node selectors
*/
readonly 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.
*/
readonly as: string | OriginalNode;
};
export type OriginalNode = {
/**
* Element name
*/
readonly element: string;
/**
* Namespace
*
* Supports `"svg"` and `undefined` only.
* If it is `undefined`, the namespace is HTML.
*/
readonly namespace?: 'svg';
/**
* Attributes
*/
readonly attrs?: readonly {
/**
* Attribute name
*/
readonly name: string;
/**
* If it omits this property, the attribute is resolved as a boolean.
*/
readonly value?:
| string
| {
readonly fromAttr: string;
};
}[];
/**
* To have attributes the defined element has.
*/
readonly inheritAttrs?: boolean;
/**
* ARIA properties
*/
readonly aria?: PretenderARIA;
/**
* Element name
*/
readonly element: string;
/**
* Namespace
*
* Supports `"svg"` and `undefined` only.
* If it is `undefined`, the namespace is HTML.
*/
readonly namespace?: 'svg';
/**
* Attributes
*/
readonly attrs?: readonly {
/**
* Attribute name
*/
readonly name: string;
/**
* If it omits this property, the attribute is resolved as a boolean.
*/
readonly value?: string | {
readonly fromAttr: string;
};
}[];
/**
* To have attributes the defined element has.
*/
readonly inheritAttrs?: boolean;
/**
* ARIA properties
*/
readonly aria?: PretenderARIA;
};

@@ -100,13 +92,11 @@ /**

export 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.
*/
readonly name?:
| boolean
| {
readonly fromAttr: string;
};
/**
* 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.
*/
readonly name?: boolean | {
readonly fromAttr: string;
};
};

@@ -117,6 +107,3 @@ export type Rule<T extends RuleConfigValue, O extends PlainData = undefined> = RuleConfig<T, O> | Readonly<T> | boolean;

*/
export type RuleV2<T extends RuleConfigValue, O extends PlainData = undefined> =
| RuleConfigV2<T, O>
| Readonly<T>
| boolean;
export type RuleV2<T extends RuleConfigValue, O extends PlainData = undefined> = RuleConfigV2<T, O> | Readonly<T> | boolean;
export type AnyRule = Rule<RuleConfigValue, PlainData>;

@@ -128,9 +115,9 @@ /**

export type Rules = {
readonly [ruleName: string]: AnyRule;
readonly [ruleName: string]: AnyRule;
};
export type RuleConfig<T extends RuleConfigValue, O extends PlainData = undefined> = {
readonly severity?: Severity;
readonly value?: Readonly<T>;
readonly options?: Readonly<O>;
readonly reason?: string;
readonly severity?: Severity;
readonly value?: Readonly<T>;
readonly options?: Readonly<O>;
readonly reason?: string;
};

@@ -141,12 +128,12 @@ /**

export type RuleConfigV2<T extends RuleConfigValue, O extends PlainData = undefined> = {
readonly severity?: Severity;
readonly value?: Readonly<T>;
readonly reason?: string;
/**
* Old property
*
* @deprecated
* @see {this.options}
*/
readonly option?: Readonly<O>;
readonly severity?: Severity;
readonly value?: Readonly<T>;
readonly reason?: string;
/**
* Old property
*
* @deprecated
* @see {this.options}
*/
readonly option?: Readonly<O>;
};

@@ -156,54 +143,51 @@ export type Severity = 'error' | 'warning' | 'info';

export type NodeRule = {
readonly selector?: string;
readonly regexSelector?: RegexSelector;
readonly categories?: readonly string[];
readonly roles?: readonly string[];
readonly obsolete?: boolean;
readonly rules?: Rules;
readonly selector?: string;
readonly regexSelector?: RegexSelector;
readonly categories?: readonly string[];
readonly roles?: readonly string[];
readonly obsolete?: boolean;
readonly rules?: Rules;
};
export type ChildNodeRule = {
readonly selector?: string;
readonly regexSelector?: RegexSelector;
readonly inheritance?: boolean;
readonly rules?: Rules;
readonly selector?: string;
readonly regexSelector?: RegexSelector;
readonly inheritance?: boolean;
readonly rules?: Rules;
};
export type Report<T extends RuleConfigValue, O extends PlainData = undefined> =
| Report1<T, O>
| Report2
| (Report1<T, O> & Report2);
export type Report<T extends RuleConfigValue, O extends PlainData = undefined> = Report1<T, O> | Report2 | (Report1<T, O> & Report2);
export type Report1<T extends RuleConfigValue, O extends PlainData = undefined> = {
readonly message: string;
readonly scope: Scope<T, O>;
readonly message: string;
readonly scope: Scope<T, O>;
};
export type Report2 = {
readonly message: string;
readonly line: number;
readonly col: number;
readonly raw: string;
readonly message: string;
readonly line: number;
readonly col: number;
readonly raw: string;
};
export type Scope<T extends RuleConfigValue, O extends PlainData = undefined> = {
readonly rule: RuleInfo<T, O>;
readonly startLine: number;
readonly startCol: number;
readonly raw: string;
readonly rule: RuleInfo<T, O>;
readonly startLine: number;
readonly startCol: number;
readonly raw: string;
};
export type Violation = {
readonly ruleId: string;
readonly severity: Severity;
readonly message: string;
readonly reason?: string;
readonly line: number;
readonly col: number;
readonly raw: string;
readonly ruleId: string;
readonly severity: Severity;
readonly message: string;
readonly reason?: string;
readonly line: number;
readonly col: number;
readonly raw: string;
};
export type RuleInfo<T extends RuleConfigValue, O extends PlainData = undefined> = {
readonly disabled: boolean;
readonly severity: Severity;
readonly value: Readonly<T>;
readonly options: Readonly<O>;
readonly reason?: string;
readonly disabled: boolean;
readonly severity: Severity;
readonly value: Readonly<T>;
readonly options: Readonly<O>;
readonly reason?: string;
};
export type GlobalRuleInfo<T extends RuleConfigValue, O extends PlainData = undefined> = RuleInfo<T, O> & {
nodeRules: RuleInfo<T, O>[];
childNodeRules: RuleInfo<T, O>[];
nodeRules: RuleInfo<T, O>[];
childNodeRules: RuleInfo<T, O>[];
};
{
"name": "@markuplint/ml-config",
"version": "3.6.0",
"version": "3.6.1",
"description": "JSON Schema and TypeScript types of markuplint configure JSON",

@@ -27,3 +27,3 @@ "repository": "git@github.com:markuplint/markuplint.git",

"dependencies": {
"@markuplint/selector": "3.6.0",
"@markuplint/selector": "3.6.1",
"deepmerge": "^4.2.2",

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

},
"gitHead": "715dd53d3b1064a9bcf616c1533921cad9e3b187"
"gitHead": "3cdf5a088b2da03773d5d4461d0e65ec32290a00"
}
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