@stylelint-types/stylelint-stylistic 3.1.3 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.d.ts +53 -58
  2. package/package.json +19 -14
package/lib/index.d.ts CHANGED
@@ -1,10 +1,8 @@
1
- import { RuleConfig, AtRules, RegExpLike, LiteralUnion } from 'stylelint-define-config';
1
+ import { RuleConfig, LiteralUnion, AtRules, RegExpLike } from 'stylelint-define-config';
2
2
 
3
3
  type AtRuleNameCaseOptions = RuleConfig<
4
4
  'lower' | 'upper',
5
- {
6
- message?: string | ((name: string, expectedName: string) => string)
7
- }
5
+ [name: string, expectedName: string]
8
6
  >
9
7
 
10
8
  type AtRuleNameNewlineAfterOptions = RuleConfig<
@@ -25,13 +23,15 @@ type AtRuleSemicolonSpaceBeforeOptions = RuleConfig<
25
23
 
26
24
  type BlockClosingBraceEmptyLineBeforeOptions = RuleConfig<
27
25
  'always-multi-line' | 'never',
26
+ [],
28
27
  {
29
- except?: ('after-closing-brace')[]
28
+ except?: LiteralUnion<'after-closing-brace'>[]
30
29
  }
31
30
  >
32
31
 
33
32
  type BlockClosingBraceNewlineAfterOptions = RuleConfig<
34
33
  'always' | 'always-single-line' | 'never-single-line' | 'always-multi-line' | 'never-multi-line',
34
+ [],
35
35
  {
36
36
  ignoreAtRules?: AtRules[]
37
37
  }
@@ -52,8 +52,9 @@ type BlockClosingBraceSpaceBeforeOptions = RuleConfig<
52
52
 
53
53
  type BlockOpeningBraceNewlineAfterOptions = RuleConfig<
54
54
  'always' | 'always-multi-line' | 'never-multi-line',
55
+ [],
55
56
  {
56
- ignore?: ('rules')[]
57
+ ignore?: LiteralUnion<'rules'>[]
57
58
  }
58
59
  >
59
60
 
@@ -63,24 +64,24 @@ type BlockOpeningBraceNewlineBeforeOptions = RuleConfig<
63
64
 
64
65
  type BlockOpeningBraceSpaceAfterOptions = RuleConfig<
65
66
  'always' | 'never' | 'always-single-line' | 'never-single-line' | 'always-multi-line' | 'never-multi-line',
67
+ [],
66
68
  {
67
- ignore?: ('at-rules')[]
69
+ ignore?: LiteralUnion<'at-rules'>[]
68
70
  }
69
71
  >
70
72
 
71
73
  type BlockOpeningBraceSpaceBeforeOptions = RuleConfig<
72
74
  'always' | 'never' | 'always-single-line' | 'never-single-line' | 'always-multi-line' | 'never-multi-line',
75
+ [],
73
76
  {
74
- ignoreAtRules?: (AtRules | RegExpLike)[]
75
- ignoreSelectors?: (string | RegExp)[]
77
+ ignoreAtRules?: (AtRules | RegExp)[]
78
+ ignoreSelectors?: RegExpLike[]
76
79
  }
77
80
  >
78
81
 
79
82
  type ColorHexCaseOptions = RuleConfig<
80
83
  'lower' | 'upper',
81
- {
82
- message?: string | ((value: string, expected: string) => string)
83
- }
84
+ [value: string, expected: string]
84
85
  >
85
86
 
86
87
  type DeclarationBangSpaceAfterOptions = RuleConfig<
@@ -110,8 +111,9 @@ type DeclarationBlockSemicolonSpaceBeforeOptions = RuleConfig<
110
111
 
111
112
  type DeclarationBlockTrailingSemicolonOptions = RuleConfig<
112
113
  'always' | 'never',
114
+ [],
113
115
  {
114
- ignore?: ('single-declaration')[]
116
+ ignore?: LiteralUnion<'single-declaration'>[]
115
117
  }
116
118
  >
117
119
 
@@ -143,9 +145,10 @@ type FunctionCommaSpaceBeforeOptions = RuleConfig<
143
145
  'always' | 'never' | 'always-single-line' | 'never-single-line'
144
146
  >
145
147
 
146
- type FunctionMaxEmptyLinesOptions = RuleConfig<number, {
147
- message?: string | ((primary: number) => string)
148
- }>
148
+ type FunctionMaxEmptyLinesOptions = RuleConfig<
149
+ number,
150
+ [primary: number]
151
+ >
149
152
 
150
153
  type FunctionParenthesesNewlineInsideOptions = RuleConfig<
151
154
  'always' | 'always-multi-line' | 'never-multi-line'
@@ -153,7 +156,6 @@ type FunctionParenthesesNewlineInsideOptions = RuleConfig<
153
156
 
154
157
  type FunctionParenthesesSpaceInsideOptions = RuleConfig<
155
158
  'always' | 'never' | 'always-single-line' | 'never-single-line'
156
-
157
159
  >
158
160
 
159
161
  type FunctionWhitespaceAfterOptions = RuleConfig<
@@ -162,36 +164,35 @@ type FunctionWhitespaceAfterOptions = RuleConfig<
162
164
 
163
165
  type IndentationOptions = RuleConfig<
164
166
  LiteralUnion<2 | 4, number> | 'tab',
167
+ [expectation: string],
165
168
  {
166
169
  baseIndentLevel?: number | 'auto'
167
- indentInsideParens?: 'twice' | 'once-at-root-twice-in-block'
170
+ indentInsideParens?: LiteralUnion<'twice' | 'once-at-root-twice-in-block'>
168
171
  indentClosingBrace?: boolean
169
- except?: ('block' | 'param' | 'value')[]
170
- ignore?: ('inside-parens' | 'param' | 'value')[]
171
- message?: string | ((expectation: string) => string)
172
+ except?: LiteralUnion<'block' | 'param' | 'value'>[]
173
+ ignore?: LiteralUnion<'inside-parens' | 'param' | 'value'>[]
172
174
  }
173
175
  >
174
176
 
175
177
  type LinebreaksOptions = RuleConfig<
176
178
  number,
177
- {
178
- message?: string | ((emptyLines: string) => string)
179
- }
179
+ [emptyLines: string]
180
180
  >
181
181
 
182
182
  type MaxEmptyLinesOptions = RuleConfig<
183
183
  LiteralUnion<1 | 2, number>,
184
+ [],
184
185
  {
185
- ignore?: ('comments')[]
186
+ ignore?: LiteralUnion<'comments'>[]
186
187
  }
187
188
  >
188
189
 
189
190
  type MaxLineLengthOptions = RuleConfig<
190
191
  number,
192
+ [lineLength: number],
191
193
  {
192
- ignore?: ('non-comments' | 'comments')[]
194
+ ignore?: LiteralUnion<'non-comments' | 'comments'>[]
193
195
  ignorePattern?: RegExpLike[]
194
- message?: string | ((lineLength: number) => string)
195
196
  }
196
197
  >
197
198
 
@@ -205,9 +206,7 @@ type MediaFeatureColonSpaceBeforeOptions = RuleConfig<
205
206
 
206
207
  type MediaFeatureNameCaseOptions = RuleConfig<
207
208
  'lower' | 'upper',
208
- {
209
- message?: string | ((name: string, expectedName: string) => string)
210
- }
209
+ [name: string, expectedName: string]
211
210
  >
212
211
 
213
212
  type MediaFeatureParenthesesSpaceInsideOptions = RuleConfig<
@@ -238,18 +237,22 @@ type MediaQueryListCommaSpaceBeforeOptions = RuleConfig<
238
237
  'always' | 'never' | 'always-single-line' | 'never-single-line'
239
238
  >
240
239
 
241
- type NamedGridAreasAlignmentOptions = RuleConfig<true, {
242
- gap?: number
243
- alignQuotes?: boolean
244
- message?: string | (() => string)
245
- }>
240
+ type NamedGridAreasAlignmentOptions = RuleConfig<
241
+ true,
242
+ [],
243
+ {
244
+ gap?: number
245
+ alignQuotes?: boolean
246
+ }
247
+ >
246
248
 
247
249
  type NoEmptyFirstLineOptions = RuleConfig<true>
248
250
 
249
251
  type NoEolWhitespaceOptions = RuleConfig<
250
252
  true,
253
+ [],
251
254
  {
252
- ignore?: ('empty-lines')[]
255
+ ignore?: LiteralUnion<'empty-lines'>[]
253
256
  }
254
257
  >
255
258
 
@@ -265,9 +268,7 @@ type NumberNoTrailingZerosOptions = RuleConfig<true>
265
268
 
266
269
  type PropertyCaseOptions = RuleConfig<
267
270
  'lower' | 'upper',
268
- {
269
- message?: string | ((property: string, expectedProperty: string) => string)
270
- }
271
+ [property: string, expectedProperty: string]
271
272
  >
272
273
 
273
274
  type SelectorAttributeBracketsSpaceInsideOptions = RuleConfig<
@@ -290,9 +291,10 @@ type SelectorCombinatorSpaceBeforeOptions = RuleConfig<
290
291
  'always' | 'never'
291
292
  >
292
293
 
293
- type SelectorDescendantCombinatorNoNonSpaceOptions = RuleConfig<true, {
294
- message?: string | ((value: string) => string)
295
- }>
294
+ type SelectorDescendantCombinatorNoNonSpaceOptions = RuleConfig<
295
+ true,
296
+ [value: string]
297
+ >
296
298
 
297
299
  type SelectorListCommaNewlineAfterOptions = RuleConfig<
298
300
  'always' | 'always-multi-line' | 'never-multi-line'
@@ -312,16 +314,12 @@ type SelectorListCommaSpaceBeforeOptions = RuleConfig<
312
314
 
313
315
  type SelectorMaxEmptyLinesOptions = RuleConfig<
314
316
  LiteralUnion<0 | 1, number>,
315
- {
316
- message?: string | ((max: number) => string)
317
- }
317
+ [max: number]
318
318
  >
319
319
 
320
320
  type SelectorPseudoClassCaseOptions = RuleConfig<
321
321
  'lower' | 'upper',
322
- {
323
- message?: string | ((pseudoClass: string, expectedPseudoClass: string) => string)
324
- }
322
+ [pseudoClass: string, expectedPseudoClass: string]
325
323
  >
326
324
 
327
325
  type SelectorPseudoClassParenthesesSpaceInsideOptions = RuleConfig<
@@ -330,16 +328,14 @@ type SelectorPseudoClassParenthesesSpaceInsideOptions = RuleConfig<
330
328
 
331
329
  type SelectorPseudoElementCaseOptions = RuleConfig<
332
330
  'lower' | 'upper',
333
- {
334
- message?: string | ((pseudoElement: string, expectedPseudoElement: string) => string)
335
- }
331
+ [pseudoElement: string, expectedPseudoElement: string]
336
332
  >
337
333
 
338
334
  type StringQuotesOptions = RuleConfig<
339
335
  'single' | 'double',
336
+ [quotes: string],
340
337
  {
341
338
  avoidEscape?: boolean
342
- message: string | ((quotes: string) => string)
343
339
  }
344
340
  >
345
341
 
@@ -349,9 +345,7 @@ type UnicodeBomOptions = RuleConfig<
349
345
 
350
346
  type UnitCaseOptions = RuleConfig<
351
347
  'lower' | 'upper',
352
- {
353
- message?: string | ((unit: string, expectedUnit: string) => string)
354
- }
348
+ [unit: string, expectedUnit: string]
355
349
  >
356
350
 
357
351
  type ValueListCommaNewlineAfterOptions = RuleConfig<
@@ -370,9 +364,10 @@ type ValueListCommaSpaceBeforeOptions = RuleConfig<
370
364
  'always' | 'never' | 'always-single-line' | 'never-single-line'
371
365
  >
372
366
 
373
- type ValueListMaxEmptyLinesOptions = RuleConfig<number, {
374
- message?: string | ((max: number) => string)
375
- }>
367
+ type ValueListMaxEmptyLinesOptions = RuleConfig<
368
+ number,
369
+ [max: number]
370
+ >
376
371
 
377
372
  interface Extends {
378
373
  '@stylistic/stylelint-config': void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stylelint-types/stylelint-stylistic",
3
3
  "type": "module",
4
- "version": "3.1.3",
4
+ "version": "5.0.0",
5
5
  "description": "TypeScript definitions for stylelint-define-config",
6
6
  "author": "pengzhanbo <volodymyr@foxmail.com> (https://github.com/pengzhanbo)",
7
7
  "license": "MIT",
@@ -37,13 +37,13 @@
37
37
  "lib"
38
38
  ],
39
39
  "engines": {
40
- "node": ">=18.0.0",
40
+ "node": ">=20.19.0",
41
41
  "npm": ">=9.0.0",
42
- "pnpm": ">=8.6.0"
42
+ "pnpm": ">=9.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "stylelint": ">=16.0.0",
46
- "stylelint-define-config": ">=1.0.0"
45
+ "stylelint": ">=17",
46
+ "stylelint-define-config": ">=17"
47
47
  },
48
48
  "peerDependenciesMeta": {
49
49
  "stylelint": {
@@ -51,20 +51,25 @@
51
51
  }
52
52
  },
53
53
  "devDependencies": {
54
- "@pengzhanbo/eslint-config": "^1.29.0",
55
- "@stylistic/stylelint-plugin": "^3.1.2",
56
- "bumpp": "^10.1.0",
54
+ "@pengzhanbo/eslint-config": "^1.45.0",
55
+ "@stylistic/stylelint-plugin": "^5.0.0",
56
+ "bumpp": "^10.4.0",
57
57
  "conventional-changelog-cli": "^5.0.0",
58
- "eslint": "^9.25.0",
59
- "stylelint": "^16.18.0",
60
- "stylelint-define-config": "^16.18.0",
61
- "tsup": "^8.4.0",
62
- "typescript": "^5.8.3"
58
+ "eslint": "^9.39.2",
59
+ "stylelint": "^17.0.0",
60
+ "stylelint-define-config": "^17.0.0",
61
+ "tsup": "^8.5.1",
62
+ "typescript": "^5.9.3"
63
+ },
64
+ "publishConfig": {
65
+ "access": "public",
66
+ "provenance": true
63
67
  },
64
68
  "scripts": {
65
69
  "lint": "eslint .",
66
70
  "build": "tsup",
71
+ "release:publish": "pnpm publish",
67
72
  "release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
68
- "release": "bumpp package.json --execute=\"pnpm release:changelog\" --commit --all --push --tag && pnpm publish --access public"
73
+ "release": "bumpp package.json --execute=\"pnpm release:changelog\" --commit --all --push --tag"
69
74
  }
70
75
  }