Skip to content

Commit 38d91ac

Browse files
committed
Revert "fix(types): use readonly arrays for "as const" compatibility"
This reverts commit fdcf183.
1 parent fdcf183 commit 38d91ac

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

@commitlint/types/src/rules.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ export type RuleConfig<
7878

7979
export type CaseRuleConfig<V = RuleConfigQuality.User> = RuleConfig<
8080
V,
81-
TargetCaseType | readonly TargetCaseType[]
81+
TargetCaseType | TargetCaseType[]
8282
>;
8383
export type LengthRuleConfig<V = RuleConfigQuality.User> = RuleConfig<
8484
V,
8585
number
8686
>;
8787
export type EnumRuleConfig<V = RuleConfigQuality.User> = RuleConfig<
8888
V,
89-
readonly string[]
89+
string[]
9090
>;
9191
export type ObjectRuleConfig<
9292
V = RuleConfigQuality.User,
@@ -115,18 +115,12 @@ export type RulesConfig<V = RuleConfigQuality.User> = {
115115
"references-empty": RuleConfig<V>;
116116
"scope-case":
117117
| CaseRuleConfig<V>
118-
| ObjectRuleConfig<
119-
V,
120-
{ cases: readonly TargetCaseType[]; delimiters?: readonly string[] }
121-
>;
118+
| ObjectRuleConfig<V, { cases: TargetCaseType[]; delimiters?: string[] }>;
122119
"scope-delimiter-style": EnumRuleConfig<V>;
123120
"scope-empty": RuleConfig<V>;
124121
"scope-enum":
125122
| EnumRuleConfig<V>
126-
| ObjectRuleConfig<
127-
V,
128-
{ scopes: readonly string[]; delimiters?: readonly string[] }
129-
>;
123+
| ObjectRuleConfig<V, { scopes: string[]; delimiters?: string[] }>;
130124
"scope-max-length": LengthRuleConfig<V>;
131125
"scope-min-length": LengthRuleConfig<V>;
132126
"signed-off-by": RuleConfig<V, string>;

0 commit comments

Comments
 (0)