stylelint-declaration-strict-value
Version:
Specify properties for which a variable, function, keyword or value must be used
32 lines (31 loc) • 1.24 kB
TypeScript
import stylelint, { Rule, RuleMeta } from 'stylelint';
import { customExpected, expected } from './lib/validation';
import { ruleName, SecondaryOptions, RegExpString } from './defaults';
declare const meta: RuleMeta;
declare const messages: {
expected: typeof expected;
customExpected: typeof customExpected;
};
/**
* A string or regular expression matching a CSS property name.
*/
type CSSPropertyName = string | RegExpString;
/**
* Primary options, a CSS property or list of CSS properties to lint.
* - Regular Expression strings are supported
*/
type PrimaryOptions = CSSPropertyName | CSSPropertyName[];
/**
* Stylelint declaration strict value rule function.
*
* @see https://stylelint.io/developer-guide/plugins
* @param properties - Primary options, a CSS property or list of CSS properties to lint.
* @param options- Secondary options, configure edge cases.
*
* @returns Returns a PostCSS Plugin.
*/
type StylelintPlugin<P = unknown, S = unknown> = Rule<P, S>;
declare const ruleFunction: StylelintPlugin<PrimaryOptions, SecondaryOptions>;
declare const declarationStrictValuePlugin: stylelint.Plugin;
export default declarationStrictValuePlugin;
export { ruleName, messages, meta, ruleFunction as rule };