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 2.0.0 to 2.0.1-dev.20220307.0

136

lib/types.d.ts
export interface Config {
$schema?: string;
extends?: string | string[];
plugins?: (PluginConfig | string)[];
parser?: ParserConfig;
parserOptions?: ParserOptions;
specs?: SpecConfig | SpecConfig_v1;
excludeFiles?: string[];
rules?: Rules;
nodeRules?: NodeRule[];
childNodeRules?: ChildNodeRule[];
$schema?: string;
extends?: string | string[];
plugins?: (PluginConfig | string)[];
parser?: ParserConfig;
parserOptions?: ParserOptions;
specs?: SpecConfig | SpecConfig_v1;
excludeFiles?: string[];
rules?: Rules;
nodeRules?: NodeRule[];
childNodeRules?: ChildNodeRule[];
}
export declare type PluginConfig = {
name: string;
settings: Record<string, any>;
name: string;
settings: Record<string, any>;
};
export interface ParserConfig {
[extensionPattern: string]: string;
[extensionPattern: string]: string;
}
export declare type ParserOptions = {
ignoreFrontMatter?: boolean;
ignoreFrontMatter?: boolean;
};
export declare type SpecConfig = {
[extensionPattern: string]: string;
[extensionPattern: string]: string;
};

@@ -33,9 +33,9 @@ /**

export interface Rules {
[ruleName: string]: AnyRule;
[ruleName: string]: AnyRule;
}
export declare type RuleConfig<T extends RuleConfigValue, O = void> = {
severity?: Severity;
value?: T;
option?: O;
reason?: string;
severity?: Severity;
value?: T;
option?: O;
reason?: string;
};

@@ -45,71 +45,71 @@ export declare type Severity = 'error' | 'warning' | 'info';

export interface NodeRule {
/**
* @deprecated
*/
tagName?: string;
selector?: string;
regexSelector?: RegexSelector;
categories?: string[];
roles?: string[];
obsolete?: boolean;
rules?: Rules;
/**
* @deprecated
*/
tagName?: string;
selector?: string;
regexSelector?: RegexSelector;
categories?: string[];
roles?: string[];
obsolete?: boolean;
rules?: Rules;
}
export interface ChildNodeRule {
/**
* @deprecated
*/
tagName?: string;
selector?: string;
regexSelector?: RegexSelector;
inheritance?: boolean;
rules?: Rules;
/**
* @deprecated
*/
tagName?: string;
selector?: string;
regexSelector?: RegexSelector;
inheritance?: boolean;
rules?: Rules;
}
export declare type RegexSelector = RegexSelectorWithoutCompination & {
combination?: {
combinator: RegexSelectorCombinator;
} & RegexSelector;
combination?: {
combinator: RegexSelectorCombinator;
} & RegexSelector;
};
export declare type RegexSelectorCombinator = ' ' | '>' | '+' | '~' | ':has(+)' | ':has(~)';
export declare type RegexSelectorWithoutCompination = {
nodeName?: string;
attrName?: string;
attrValue?: string;
nodeName?: string;
attrName?: string;
attrValue?: string;
};
export declare type Report<T extends RuleConfigValue, O = null> = Report1<T, O> | Report2 | (Report1<T, O> & Report2);
export declare type Report1<T extends RuleConfigValue, O = null> = {
message: string;
scope: Scope<T, O>;
message: string;
scope: Scope<T, O>;
};
export declare type Report2 = {
message: string;
line: number;
col: number;
raw: string;
message: string;
line: number;
col: number;
raw: string;
};
export declare type Scope<T extends RuleConfigValue, O = null> = {
rule: RuleInfo<T, O>;
startLine: number;
startCol: number;
raw: string;
rule: RuleInfo<T, O>;
startLine: number;
startCol: number;
raw: string;
};
export interface Violation {
ruleId: string;
severity: Severity;
message: string;
reason?: string;
line: number;
col: number;
raw: string;
ruleId: string;
severity: Severity;
message: string;
reason?: string;
line: number;
col: number;
raw: string;
}
export interface RuleInfo<T extends RuleConfigValue, O = null> {
disabled: boolean;
severity: Severity;
value: T;
option: O;
reason?: string;
disabled: boolean;
severity: Severity;
value: T;
option: O;
reason?: string;
}
export declare type GlobalRuleInfo<T extends RuleConfigValue, O = null> = RuleInfo<T, O> & {
nodeRules: RuleInfo<T, O>[];
childNodeRules: RuleInfo<T, O>[];
nodeRules: RuleInfo<T, O>[];
childNodeRules: RuleInfo<T, O>[];
};
export declare type Nullable<T> = T | null | undefined;
import type { AnyRule } from './types';
export declare function toRegxp(pattern: string): string | RegExp;
export declare function regexSelectorMatches(
reg: string,
raw: string,
): {
[x: string]: string;
export declare function regexSelectorMatches(reg: string, raw: string): {
[x: string]: string;
} | null;

@@ -9,0 +6,0 @@ /**

{
"name": "@markuplint/ml-config",
"version": "2.0.0",
"version": "2.0.1-dev.20220307.0",
"description": "JSON Schema and TypeScript types of markuplint configure JSON",

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

},
"gitHead": "de81fc514acdf472f87184e3499e9364258f9b66"
"gitHead": "c0a9d36c32ae278bd2fdb9ec9434fd4af46918c3"
}
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