Skip to content

Commit 962efb7

Browse files
committed
fix: replace StandardPropertiesMap to KebabCaseStandardPropertiesMap, close #1
1 parent f0b8ed0 commit 962efb7

7 files changed

+14
-14
lines changed

src/rules/stylelint/declaration-property-max-values.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { StandardPropertiesMap } from '../../types'
1+
import type { KebabCaseStandardPropertiesMap } from '../../types'
22
import type { RuleConfig } from '../rule-config'
33

44
export type DeclarationPropertyMaxValuesOptions = RuleConfig<
5-
Record<StandardPropertiesMap | `/${string}/`, number> | Record<string, number>,
5+
Record<KebabCaseStandardPropertiesMap | `/${string}/`, number> | Record<string, number>,
66
{
77
message?: string | ((property: string, max: number) => string)
88
}

src/rules/stylelint/declaration-property-unit-allowed-list.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { StandardPropertiesMap, Unit } from '../../types'
1+
import type { KebabCaseStandardPropertiesMap, Unit } from '../../types'
22
import type { RuleConfig } from '../rule-config'
33

44
export type DeclarationPropertyUnitAllowedListOptions = RuleConfig<
5-
Record<StandardPropertiesMap | `/${string}/`, Unit | Unit[]>,
5+
Record<KebabCaseStandardPropertiesMap | `/${string}/`, Unit | Unit[]>,
66
{
77
ignore?: ['inside-function']
88
message?: string | ((property: string, unit: string) => string)

src/rules/stylelint/declaration-property-unit-disallowed-list.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { StandardPropertiesMap, Unit } from '../../types'
1+
import type { KebabCaseStandardPropertiesMap, Unit } from '../../types'
22
import type { RuleConfig } from '../rule-config'
33

44
export type DeclarationPropertyUnitDisallowedListOptions = RuleConfig<
5-
Record<StandardPropertiesMap | `/${string}/`, Unit | Unit[]>,
5+
Record<KebabCaseStandardPropertiesMap | `/${string}/`, Unit | Unit[]>,
66
{
77
message?: string | ((property: string, unit: string) => string)
88
}

src/rules/stylelint/declaration-property-value-allowed-list.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { StandardPropertiesMap } from '../../types'
1+
import type { KebabCaseStandardPropertiesMap } from '../../types'
22
import type { RegExpLike } from '../../utils'
33
import type { RuleConfig } from '../rule-config'
44

55
export type DeclarationPropertyValueAllowedListOptions = RuleConfig<
6-
Record<StandardPropertiesMap | `/${string}/`, RegExpLike | RegExpLike[]>
6+
Record<KebabCaseStandardPropertiesMap | `/${string}/`, RegExpLike | RegExpLike[]>
77
| Record<string, RegExpLike | RegExpLike[]>,
88
{
99
message?: string | ((property: string, value: string) => string)

src/rules/stylelint/declaration-property-value-disallowed-list.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { StandardPropertiesMap } from '../../types'
1+
import type { KebabCaseStandardPropertiesMap } from '../../types'
22
import type { RegExpLike } from '../../utils'
33
import type { RuleConfig } from '../rule-config'
44

55
export type DeclarationPropertyValueDisallowedListOptions = RuleConfig<
6-
Record<StandardPropertiesMap | `/${string}/`, RegExpLike | RegExpLike[]>
6+
Record<KebabCaseStandardPropertiesMap | `/${string}/`, RegExpLike | RegExpLike[]>
77
| Record<string, RegExpLike | RegExpLike[]>,
88
{
99
message?: string | ((property: string, value: string) => string)

src/rules/stylelint/declaration-property-value-no-unknown.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import type { StandardPropertiesMap } from '../../types'
1+
import type { KebabCaseStandardPropertiesMap } from '../../types'
22
import type { RegExpLike } from '../../utils'
33
import type { RuleConfig } from '../rule-config'
44

55
export type DeclarationPropertyValueNoUnknownOptions = RuleConfig<true, {
6-
ignoreProperties?: Record<StandardPropertiesMap, RegExpLike | RegExpLike[]> | Record<string, RegExpLike | RegExpLike[]>
6+
ignoreProperties?: Record<KebabCaseStandardPropertiesMap, RegExpLike | RegExpLike[]> | Record<string, RegExpLike | RegExpLike[]>
77
/**
88
* Extend or alter the properties syntax dictionary.
99
* {@link https://github.com/csstree/csstree/blob/master/docs/definition-syntax.md CSS Value Definition Syntax} is used to define a value's syntax.
1010
* If a definition starts with `|` it is added to the {@link https://csstree.github.io/docs/syntax/ existing definition value} if any.
1111
*/
12-
propertiesSyntax?: Record<StandardPropertiesMap, string> | Record<string, string>
12+
propertiesSyntax?: Record<KebabCaseStandardPropertiesMap, string> | Record<string, string>
1313
/**
1414
* Extend or alter the types syntax dictionary.
1515
* {@link https://github.com/csstree/csstree/blob/master/docs/definition-syntax.md CSS Value Definition Syntax} is used to define a value's syntax.

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type LiteralUnion<Union extends Base, Base = string> =
2222
| Union
2323
| (Base & { zz_IGNORE_ME?: never })
2424

25-
export type RegExpLike = RegExp | `/${string}/`
25+
export type RegExpLike = RegExp | `/${string}/` | string
2626

2727
export type KebabCase<S extends string, B extends boolean = true> =
2828
S extends `${infer F}${infer O}`

0 commit comments

Comments
 (0)