first commit
This commit is contained in:
+138
@@ -0,0 +1,138 @@
|
||||
declare namespace _default {
|
||||
namespace meta {
|
||||
let type: "problem";
|
||||
namespace docs {
|
||||
let description: string;
|
||||
let recommended: boolean;
|
||||
let url: string;
|
||||
}
|
||||
let schema: {
|
||||
type: "object";
|
||||
properties: {
|
||||
available: {
|
||||
anyOf: ({
|
||||
enum: string[];
|
||||
type?: undefined;
|
||||
minimum?: undefined;
|
||||
maximum?: undefined;
|
||||
} | {
|
||||
type: "integer";
|
||||
minimum: number;
|
||||
maximum: number;
|
||||
enum?: undefined;
|
||||
})[];
|
||||
};
|
||||
allowAtRules: {
|
||||
type: "array";
|
||||
items: {
|
||||
enum: string[];
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
allowFunctions: {
|
||||
type: "array";
|
||||
items: {
|
||||
enum: string[];
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
allowMediaConditions: {
|
||||
type: "array";
|
||||
items: {
|
||||
enum: string[];
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
allowProperties: {
|
||||
type: "array";
|
||||
items: {
|
||||
enum: string[];
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
allowPropertyValues: {
|
||||
type: "object";
|
||||
properties: {
|
||||
[k: string]: {
|
||||
type: "array";
|
||||
items: {
|
||||
enum: string[];
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
};
|
||||
additionalProperties: false;
|
||||
};
|
||||
allowSelectors: {
|
||||
type: "array";
|
||||
items: {
|
||||
enum: string[];
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
allowUnits: {
|
||||
type: "array";
|
||||
items: {
|
||||
enum: string[];
|
||||
};
|
||||
uniqueItems: true;
|
||||
};
|
||||
};
|
||||
additionalProperties: false;
|
||||
}[];
|
||||
let defaultOptions: [{
|
||||
available: "widely";
|
||||
allowAtRules: any[];
|
||||
allowFunctions: any[];
|
||||
allowMediaConditions: any[];
|
||||
allowProperties: any[];
|
||||
allowPropertyValues: {};
|
||||
allowSelectors: any[];
|
||||
allowUnits: any[];
|
||||
}];
|
||||
namespace messages {
|
||||
let notBaselineProperty: string;
|
||||
let notBaselinePropertyValue: string;
|
||||
let notBaselineAtRule: string;
|
||||
let notBaselineFunction: string;
|
||||
let notBaselineMediaCondition: string;
|
||||
let notBaselineSelector: string;
|
||||
let notBaselineUnit: string;
|
||||
}
|
||||
}
|
||||
function create(context: import("@eslint/core").RuleContext<{
|
||||
LangOptions: import("../index.js").CSSLanguageOptions;
|
||||
Code: import("../index.js").CSSSourceCode;
|
||||
RuleOptions: UseBaselineOptions;
|
||||
Node: import("@eslint/css-tree").CssNodePlain;
|
||||
MessageIds: UseBaselineMessageIds;
|
||||
}>): {
|
||||
"Atrule[name=/^supports$/i]"(): void;
|
||||
"Atrule[name=/^supports$/i] > AtrulePrelude > Condition"(node: any): void;
|
||||
"Rule > Block > Declaration"(node: any): void;
|
||||
"Atrule[name=/^supports$/i]:exit"(): void;
|
||||
"Atrule[name=/^media$/i] > AtrulePrelude > MediaQueryList > MediaQuery > Condition"(node: any): void;
|
||||
Atrule(node: import("@eslint/css-tree").AtrulePlain): void;
|
||||
"PseudoClassSelector,PseudoElementSelector"(node: any): void;
|
||||
NestingSelector(node: import("@eslint/css-tree").NestingSelector): void;
|
||||
};
|
||||
}
|
||||
export default _default;
|
||||
export type UseBaselineMessageIds = "notBaselineProperty" | "notBaselinePropertyValue" | "notBaselineAtRule" | "notBaselineFunction" | "notBaselineMediaCondition" | "notBaselineSelector" | "notBaselineUnit";
|
||||
export type UseBaselineOptions = [{
|
||||
available?: "widely" | "newly" | number;
|
||||
allowAtRules?: string[];
|
||||
allowFunctions?: string[];
|
||||
allowMediaConditions?: string[];
|
||||
allowProperties?: string[];
|
||||
allowPropertyValues?: {
|
||||
[property: string]: string[];
|
||||
};
|
||||
allowSelectors?: string[];
|
||||
allowUnits?: string[];
|
||||
}];
|
||||
export type UseBaselineRuleDefinition = CSSRuleDefinition<{
|
||||
RuleOptions: UseBaselineOptions;
|
||||
MessageIds: UseBaselineMessageIds;
|
||||
}>;
|
||||
import type { CSSRuleDefinition } from "../types.js";
|
||||
Reference in New Issue
Block a user