first commit
This commit is contained in:
+133
@@ -0,0 +1,133 @@
|
||||
declare namespace _default {
|
||||
namespace meta {
|
||||
let type: "problem";
|
||||
namespace docs {
|
||||
let description: string;
|
||||
let recommended: boolean;
|
||||
let url: string;
|
||||
}
|
||||
let schema: {
|
||||
type: "object";
|
||||
properties: {
|
||||
maxIds: {
|
||||
type: "integer";
|
||||
minimum: number;
|
||||
};
|
||||
maxClasses: {
|
||||
type: "integer";
|
||||
minimum: number;
|
||||
};
|
||||
maxTypes: {
|
||||
type: "integer";
|
||||
minimum: number;
|
||||
};
|
||||
maxAttributes: {
|
||||
type: "integer";
|
||||
minimum: number;
|
||||
};
|
||||
maxPseudoClasses: {
|
||||
type: "integer";
|
||||
minimum: number;
|
||||
};
|
||||
maxUniversals: {
|
||||
type: "integer";
|
||||
minimum: number;
|
||||
};
|
||||
maxCompounds: {
|
||||
type: "integer";
|
||||
minimum: number;
|
||||
};
|
||||
maxCombinators: {
|
||||
type: "integer";
|
||||
minimum: number;
|
||||
};
|
||||
disallowCombinators: {
|
||||
type: "array";
|
||||
items: {
|
||||
type: "string";
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
disallowPseudoClasses: {
|
||||
type: "array";
|
||||
items: {
|
||||
type: "string";
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
disallowPseudoElements: {
|
||||
type: "array";
|
||||
items: {
|
||||
type: "string";
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
disallowAttributes: {
|
||||
type: "array";
|
||||
items: {
|
||||
type: "string";
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
disallowAttributeMatchers: {
|
||||
type: "array";
|
||||
items: {
|
||||
type: "string";
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
};
|
||||
additionalProperties: false;
|
||||
}[];
|
||||
let defaultOptions: [{
|
||||
maxIds: number;
|
||||
maxClasses: number;
|
||||
maxTypes: number;
|
||||
maxAttributes: number;
|
||||
maxPseudoClasses: number;
|
||||
maxUniversals: number;
|
||||
maxCompounds: number;
|
||||
maxCombinators: number;
|
||||
disallowCombinators: any[];
|
||||
disallowPseudoClasses: any[];
|
||||
disallowPseudoElements: any[];
|
||||
disallowAttributes: any[];
|
||||
disallowAttributeMatchers: any[];
|
||||
}];
|
||||
namespace messages {
|
||||
let maxSelectors: string;
|
||||
let disallowedSelectors: string;
|
||||
}
|
||||
}
|
||||
function create(context: import("@eslint/core").RuleContext<{
|
||||
LangOptions: import("../index.js").CSSLanguageOptions;
|
||||
Code: import("../index.js").CSSSourceCode;
|
||||
RuleOptions: SelectorComplexityOptions;
|
||||
Node: import("@eslint/css-tree").CssNodePlain;
|
||||
MessageIds: SelectorComplexityMessageIds;
|
||||
}>): {
|
||||
Selector(node: import("@eslint/css-tree").SelectorPlain): void;
|
||||
};
|
||||
}
|
||||
export default _default;
|
||||
export type SelectorComplexityMessageIds = "maxSelectors" | "disallowedSelectors";
|
||||
export type SelectorComplexityOptions = [{
|
||||
maxIds?: number;
|
||||
maxClasses?: number;
|
||||
maxTypes?: number;
|
||||
maxAttributes?: number;
|
||||
maxPseudoClasses?: number;
|
||||
maxUniversals?: number;
|
||||
maxCompounds?: number;
|
||||
maxCombinators?: number;
|
||||
disallowCombinators?: string[];
|
||||
disallowPseudoClasses?: string[];
|
||||
disallowPseudoElements?: string[];
|
||||
disallowAttributes?: string[];
|
||||
disallowAttributeMatchers?: string[];
|
||||
}];
|
||||
export type SelectorComplexityRuleDefinition = CSSRuleDefinition<{
|
||||
RuleOptions: SelectorComplexityOptions;
|
||||
MessageIds: SelectorComplexityMessageIds;
|
||||
}>;
|
||||
import type { CSSRuleDefinition } from "../types.js";
|
||||
Reference in New Issue
Block a user