@stylelint-types/stylelint-stylistic 3.0.1 → 3.1.1

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.
package/README.md CHANGED
@@ -27,7 +27,7 @@ module.exports = defineConfig({
27
27
  })
28
28
  ```
29
29
 
30
- ![](./static/demo.png)
30
+ ![demo](./static/demo.png)
31
31
 
32
32
  ## Credits
33
33
 
@@ -1,5 +1,8 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
3
  export type AtRuleNameCaseOptions = RuleConfig<
4
- 'lower' | 'upper'
4
+ 'lower' | 'upper',
5
+ {
6
+ message?: string | ((name: string, expectedName: string) => string)
7
+ }
5
8
  >
@@ -1,5 +1,8 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
3
  export type ColorHexCaseOptions = RuleConfig<
4
- 'lower' | 'upper'
4
+ 'lower' | 'upper',
5
+ {
6
+ message?: string | ((value: string, expected: string) => string)
7
+ }
5
8
  >
@@ -1,3 +1,5 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
- export type FunctionMaxEmptyLinesOptions = RuleConfig<number>
3
+ export type FunctionMaxEmptyLinesOptions = RuleConfig<number, {
4
+ message?: string | ((primary: number) => string)
5
+ }>
@@ -8,5 +8,6 @@ export type IndentationOptions = RuleConfig<
8
8
  indentClosingBrace?: boolean
9
9
  except?: ('block' | 'param' | 'value')[]
10
10
  ignore?: ('inside-parens' | 'param' | 'value')[]
11
+ message?: string | ((expectation: string) => string)
11
12
  }
12
13
  >
@@ -1,5 +1,8 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
3
  export type LinebreaksOptions = RuleConfig<
4
- 'unix' | 'windows'
4
+ number,
5
+ {
6
+ message?: string | ((emptyLines: string) => string)
7
+ }
5
8
  >
@@ -5,5 +5,6 @@ export type MaxLineLengthOptions = RuleConfig<
5
5
  {
6
6
  ignore?: ('non-comments' | 'comments')[]
7
7
  ignorePattern?: RegExpLike[]
8
+ message?: string | ((lineLength: number) => string)
8
9
  }
9
10
  >
@@ -1,5 +1,8 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
3
  export type MediaFeatureNameCaseOptions = RuleConfig<
4
- 'lower' | 'upper'
4
+ 'lower' | 'upper',
5
+ {
6
+ message?: string | ((name: string, expectedName: string) => string)
7
+ }
5
8
  >
@@ -0,0 +1,7 @@
1
+ import type { RuleConfig } from 'stylelint-define-config'
2
+
3
+ export type NamedGridAreasAlignmentOptions = RuleConfig<true, {
4
+ gap?: number
5
+ alignQuotes?: boolean
6
+ message?: string | (() => string)
7
+ }>
@@ -1,5 +1,8 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
3
  export type PropertyCaseOptions = RuleConfig<
4
- 'lower' | 'upper'
4
+ 'lower' | 'upper',
5
+ {
6
+ message?: string | ((property: string, expectedProperty: string) => string)
7
+ }
5
8
  >
@@ -1,3 +1,5 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
- export type SelectorDescendantCombinatorNoNonSpaceOptions = RuleConfig<true>
3
+ export type SelectorDescendantCombinatorNoNonSpaceOptions = RuleConfig<true, {
4
+ message?: string | ((value: string) => string)
5
+ }>
@@ -1,5 +1,8 @@
1
1
  import type { LiteralUnion, RuleConfig } from 'stylelint-define-config'
2
2
 
3
3
  export type SelectorMaxEmptyLinesOptions = RuleConfig<
4
- LiteralUnion<0 | 1, number>
4
+ LiteralUnion<0 | 1, number>,
5
+ {
6
+ message?: string | ((max: number) => string)
7
+ }
5
8
  >
@@ -1,5 +1,8 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
3
  export type SelectorPseudoClassCaseOptions = RuleConfig<
4
- 'lower' | 'upper'
4
+ 'lower' | 'upper',
5
+ {
6
+ message?: string | ((pseudoClass: string, expectedPseudoClass: string) => string)
7
+ }
5
8
  >
@@ -1,5 +1,8 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
3
  export type SelectorPseudoElementCaseOptions = RuleConfig<
4
- 'lower' | 'upper'
4
+ 'lower' | 'upper',
5
+ {
6
+ message?: string | ((pseudoElement: string, expectedPseudoElement: string) => string)
7
+ }
5
8
  >
@@ -4,5 +4,6 @@ export type StringQuotesOptions = RuleConfig<
4
4
  'single' | 'double',
5
5
  {
6
6
  avoidEscape?: boolean
7
+ message: string | ((quotes: string) => string)
7
8
  }
8
9
  >
@@ -1,5 +1,8 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
3
  export type UnitCaseOptions = RuleConfig<
4
- 'lower' | 'upper'
4
+ 'lower' | 'upper',
5
+ {
6
+ message?: string | ((unit: string, expectedUnit: string) => string)
7
+ }
5
8
  >
@@ -1,3 +1,5 @@
1
1
  import type { RuleConfig } from 'stylelint-define-config'
2
2
 
3
- export type ValueListMaxEmptyLinesOptions = RuleConfig<number>
3
+ export type ValueListMaxEmptyLinesOptions = RuleConfig<number, {
4
+ message?: string | ((max: number) => string)
5
+ }>
package/lib/types.d.ts CHANGED
@@ -1,9 +1,9 @@
1
+ import type { AtRuleNameCaseOptions } from './rules/at-rule-name-case'
1
2
  import type { AtRuleNameNewlineAfterOptions } from './rules/at-rule-name-newline-after'
2
3
  import type { AtRuleNameSpaceAfterOptions } from './rules/at-rule-name-space-after'
3
- import type { AtRuleNameCaseOptions } from './rules/at-rule-name-case'
4
+ import type { AtRuleSemicolonNewlineAfterOptions } from './rules/at-rule-semicolon-newline-after'
4
5
  import type { AtRuleSemicolonSpaceBeforeOptions } from './rules/at-rule-semicolon-space-before'
5
6
  import type { BlockClosingBraceEmptyLineBeforeOptions } from './rules/block-closing-brace-empty-line-before'
6
- import type { AtRuleSemicolonNewlineAfterOptions } from './rules/at-rule-semicolon-newline-after'
7
7
  import type { BlockClosingBraceNewlineAfterOptions } from './rules/block-closing-brace-newline-after'
8
8
  import type { BlockClosingBraceNewlineBeforeOptions } from './rules/block-closing-brace-newline-before'
9
9
  import type { BlockClosingBraceSpaceAfterOptions } from './rules/block-closing-brace-space-after'
@@ -20,11 +20,11 @@ import type { DeclarationBlockSemicolonNewlineBeforeOptions } from './rules/decl
20
20
  import type { DeclarationBlockSemicolonSpaceAfterOptions } from './rules/declaration-block-semicolon-space-after'
21
21
  import type { DeclarationBlockSemicolonSpaceBeforeOptions } from './rules/declaration-block-semicolon-space-before'
22
22
  import type { DeclarationBlockTrailingSemicolonOptions } from './rules/declaration-block-trailing-semicolon'
23
+ import type { DeclarationColonNewlineAfterOptions } from './rules/declaration-colon-newline-after'
23
24
  import type { DeclarationColonSpaceAfterOptions } from './rules/declaration-colon-space-after'
24
25
  import type { DeclarationColonSpaceBeforeOptions } from './rules/declaration-colon-space-before'
25
26
  import type { FunctionCommaNewlineAfterOptions } from './rules/function-comma-newline-after'
26
27
  import type { FunctionCommaNewlineBeforeOptions } from './rules/function-comma-newline-before'
27
- import type { DeclarationColonNewlineAfterOptions } from './rules/declaration-colon-newline-after'
28
28
  import type { FunctionCommaSpaceAfterOptions } from './rules/function-comma-space-after'
29
29
  import type { FunctionCommaSpaceBeforeOptions } from './rules/function-comma-space-before'
30
30
  import type { FunctionMaxEmptyLinesOptions } from './rules/function-max-empty-lines'
@@ -45,14 +45,15 @@ import type { MediaQueryListCommaNewlineAfterOptions } from './rules/media-query
45
45
  import type { MediaQueryListCommaNewlineBeforeOptions } from './rules/media-query-list-comma-newline-before'
46
46
  import type { MediaQueryListCommaSpaceAfterOptions } from './rules/media-query-list-comma-space-after'
47
47
  import type { MediaQueryListCommaSpaceBeforeOptions } from './rules/media-query-list-comma-space-before'
48
+ import type { NamedGridAreasAlignmentOptions } from './rules/named-grid-areas-alignment'
48
49
  import type { NoEmptyFirstLineOptions } from './rules/no-empty-first-line'
49
50
  import type { NoEolWhitespaceOptions } from './rules/no-eol-whitespace'
50
51
  import type { NoExtraSemicolonsOptions } from './rules/no-extra-semicolons'
51
52
  import type { NoMissingEndOfSourceNewlineOptions } from './rules/no-missing-end-of-source-newline'
52
53
  import type { NumberLeadingZeroOptions } from './rules/number-leading-zero'
53
54
  import type { NumberNoTrailingZerosOptions } from './rules/number-no-trailing-zeros'
54
- import type { SelectorAttributeBracketsSpaceInsideOptions } from './rules/selector-attribute-brackets-space-inside'
55
55
  import type { PropertyCaseOptions } from './rules/property-case'
56
+ import type { SelectorAttributeBracketsSpaceInsideOptions } from './rules/selector-attribute-brackets-space-inside'
56
57
  import type { SelectorAttributeOperatorSpaceAfterOptions } from './rules/selector-attribute-operator-space-after'
57
58
  import type { SelectorAttributeOperatorSpaceBeforeOptions } from './rules/selector-attribute-operator-space-before'
58
59
  import type { SelectorCombinatorSpaceAfterOptions } from './rules/selector-combinator-space-after'
@@ -64,8 +65,8 @@ import type { SelectorListCommaSpaceAfterOptions } from './rules/selector-list-c
64
65
  import type { SelectorListCommaSpaceBeforeOptions } from './rules/selector-list-comma-space-before'
65
66
  import type { SelectorMaxEmptyLinesOptions } from './rules/selector-max-empty-lines'
66
67
  import type { SelectorPseudoClassCaseOptions } from './rules/selector-pseudo-class-case'
67
- import type { SelectorPseudoElementCaseOptions } from './rules/selector-pseudo-element-case'
68
68
  import type { SelectorPseudoClassParenthesesSpaceInsideOptions } from './rules/selector-pseudo-class-parentheses-space-inside'
69
+ import type { SelectorPseudoElementCaseOptions } from './rules/selector-pseudo-element-case'
69
70
  import type { StringQuotesOptions } from './rules/string-quotes'
70
71
  import type { UnicodeBomOptions } from './rules/unicode-bom'
71
72
  import type { UnitCaseOptions } from './rules/unit-case'
@@ -415,6 +416,12 @@ export interface RuleOptions {
415
416
  */
416
417
  '@stylistic/media-query-list-comma-space-before': MediaQueryListCommaSpaceBeforeOptions
417
418
 
419
+ /**
420
+ * Require cell tokens (and optionally ending quotes) within grid-template-areas to be aligned.
421
+ *
422
+ * @see [value-list-max-empty-lines](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/named-grid-areas-alignment)
423
+ */
424
+ '@stylistic/named-grid-areas-alignment': NamedGridAreasAlignmentOptions
418
425
  /**
419
426
  * Disallow empty first lines.
420
427
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stylelint-types/stylelint-stylistic",
3
3
  "type": "module",
4
- "version": "3.0.1",
4
+ "version": "3.1.1",
5
5
  "description": "TypeScript definitions for stylelint-define-config",
6
6
  "author": "pengzhanbo <volodymyr@foxmail.com> (https://github.com/pengzhanbo)",
7
7
  "license": "MIT",
@@ -51,14 +51,14 @@
51
51
  }
52
52
  },
53
53
  "devDependencies": {
54
- "@pengzhanbo/eslint-config": "^1.12.0",
55
- "@stylistic/stylelint-plugin": "^3.0.1",
56
- "bumpp": "^9.5.1",
54
+ "@pengzhanbo/eslint-config": "^1.22.0",
55
+ "@stylistic/stylelint-plugin": "^3.1.1",
56
+ "bumpp": "^9.9.2",
57
57
  "conventional-changelog-cli": "^5.0.0",
58
- "eslint": "^9.9.0",
59
- "stylelint": "^16.8.2",
60
- "stylelint-define-config": "^1.6.0",
61
- "typescript": "^5.5.4"
58
+ "eslint": "^9.17.0",
59
+ "stylelint": "^16.12.0",
60
+ "stylelint-define-config": "^1.8.1",
61
+ "typescript": "^5.7.2"
62
62
  },
63
63
  "scripts": {
64
64
  "lint": "eslint .",