-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
declaration-property-value-no-unknown
rule
- Loading branch information
1 parent
ed48556
commit cbceb16
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import type { CSSPropertiesMap, RuleConfig } from 'stylelint-define-config' | ||
|
||
export type DeclarationPropertyValueNoUnknownOptions = RuleConfig< | ||
true, | ||
{ | ||
/** | ||
* Ignore the specified property and value pairs. | ||
* Keys in the object indicate property names. | ||
* If a string in the object is surrounded with `"/"`, | ||
* it's interpreted as a regular expression. | ||
* | ||
* For example, `"/.+/"` matches any strings. | ||
*/ | ||
ignoreProperties?: Record<CSSPropertiesMap, (string | RegExp)[] | string | RegExp> | ||
/** | ||
* Extend or alter the properties syntax dictionary. | ||
* [CSS Value Definition Syntax](https://github.com/csstree/csstree/blob/master/docs/definition-syntax.md) is used to define a value's syntax. | ||
* If a definition starts with `|` it is added to the [existing definition value](https://csstree.github.io/docs/syntax/) if any. | ||
*/ | ||
propertiesSyntax?: Record<CSSPropertiesMap, string> | ||
|
||
/** | ||
* Extend or alter the types syntax dictionary. | ||
* [CSS Value Definition Syntax](https://github.com/csstree/csstree/blob/master/docs/definition-syntax.md) is used to define a value's syntax. | ||
* If a definition starts with `|` it is added to the [existing definition value](https://csstree.github.io/docs/syntax/) if any. | ||
* | ||
* Types are something like a preset which allows you to reuse a definition across other definitions. So, you'll likely want to also use the `propertiesSyntax` option when using this option. | ||
*/ | ||
typesSyntax?: Record<string, string> | ||
} | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters