@alexlit/lint-kit 182.2.0 → 182.3.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.
- package/package.json +1 -1
- package/packages/config-eslint/package.json +3 -3
- package/packages/config-hooks/package.json +2 -2
- package/packages/config-stylelint/package.json +2 -2
- package/packages/config-stylelint/node_modules/ansi-regex/index.d.ts +0 -33
- package/packages/config-stylelint/node_modules/ansi-regex/index.js +0 -14
- package/packages/config-stylelint/node_modules/ansi-regex/license +0 -9
- package/packages/config-stylelint/node_modules/ansi-regex/package.json +0 -61
- package/packages/config-stylelint/node_modules/ansi-regex/readme.md +0 -66
- package/packages/config-stylelint/node_modules/file-entry-cache/LICENSE +0 -19
- package/packages/config-stylelint/node_modules/file-entry-cache/README.md +0 -630
- package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.cjs +0 -559
- package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.d.cts +0 -304
- package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.d.ts +0 -304
- package/packages/config-stylelint/node_modules/file-entry-cache/dist/index.js +0 -525
- package/packages/config-stylelint/node_modules/file-entry-cache/package.json +0 -62
- package/packages/config-stylelint/node_modules/flat-cache/LICENSE +0 -19
- package/packages/config-stylelint/node_modules/flat-cache/README.md +0 -235
- package/packages/config-stylelint/node_modules/flat-cache/dist/index.cjs +0 -495
- package/packages/config-stylelint/node_modules/flat-cache/dist/index.d.cts +0 -255
- package/packages/config-stylelint/node_modules/flat-cache/dist/index.d.ts +0 -255
- package/packages/config-stylelint/node_modules/flat-cache/dist/index.js +0 -455
- package/packages/config-stylelint/node_modules/flat-cache/package.json +0 -87
- package/packages/config-stylelint/node_modules/globby/ignore.js +0 -337
- package/packages/config-stylelint/node_modules/globby/index.d.ts +0 -394
- package/packages/config-stylelint/node_modules/globby/index.js +0 -488
- package/packages/config-stylelint/node_modules/globby/license +0 -9
- package/packages/config-stylelint/node_modules/globby/package.json +0 -94
- package/packages/config-stylelint/node_modules/globby/readme.md +0 -388
- package/packages/config-stylelint/node_modules/globby/utilities.js +0 -382
- package/packages/config-stylelint/node_modules/meow/build/dependencies.js +0 -7347
- package/packages/config-stylelint/node_modules/meow/build/index.d.ts +0 -2684
- package/packages/config-stylelint/node_modules/meow/build/index.js +0 -185
- package/packages/config-stylelint/node_modules/meow/build/licenses.md +0 -1254
- package/packages/config-stylelint/node_modules/meow/build/options.js +0 -147
- package/packages/config-stylelint/node_modules/meow/build/parser.js +0 -113
- package/packages/config-stylelint/node_modules/meow/build/utils.js +0 -7
- package/packages/config-stylelint/node_modules/meow/build/validate.js +0 -145
- package/packages/config-stylelint/node_modules/meow/license +0 -9
- package/packages/config-stylelint/node_modules/meow/package.json +0 -103
- package/packages/config-stylelint/node_modules/meow/readme.md +0 -387
- package/packages/config-stylelint/node_modules/postcss-safe-parser/LICENSE +0 -20
- package/packages/config-stylelint/node_modules/postcss-safe-parser/README.md +0 -25
- package/packages/config-stylelint/node_modules/postcss-safe-parser/lib/safe-parse.js +0 -12
- package/packages/config-stylelint/node_modules/postcss-safe-parser/lib/safe-parser.js +0 -100
- package/packages/config-stylelint/node_modules/postcss-safe-parser/package.json +0 -36
- package/packages/config-stylelint/node_modules/slash/index.d.ts +0 -23
- package/packages/config-stylelint/node_modules/slash/index.js +0 -9
- package/packages/config-stylelint/node_modules/slash/license +0 -9
- package/packages/config-stylelint/node_modules/slash/package.json +0 -39
- package/packages/config-stylelint/node_modules/slash/readme.md +0 -36
- package/packages/config-stylelint/node_modules/string-width/index.d.ts +0 -39
- package/packages/config-stylelint/node_modules/string-width/index.js +0 -119
- package/packages/config-stylelint/node_modules/string-width/license +0 -9
- package/packages/config-stylelint/node_modules/string-width/package.json +0 -65
- package/packages/config-stylelint/node_modules/string-width/readme.md +0 -66
- package/packages/config-stylelint/node_modules/strip-ansi/index.d.ts +0 -15
- package/packages/config-stylelint/node_modules/strip-ansi/index.js +0 -19
- package/packages/config-stylelint/node_modules/strip-ansi/license +0 -9
- package/packages/config-stylelint/node_modules/strip-ansi/package.json +0 -59
- package/packages/config-stylelint/node_modules/strip-ansi/readme.md +0 -37
- package/packages/config-stylelint/node_modules/stylelint/LICENSE +0 -20
- package/packages/config-stylelint/node_modules/stylelint/README.md +0 -113
- package/packages/config-stylelint/node_modules/stylelint/bin/stylelint.mjs +0 -7
- package/packages/config-stylelint/node_modules/stylelint/lib/assignDisabledRanges.mjs +0 -483
- package/packages/config-stylelint/node_modules/stylelint/lib/augmentConfig.mjs +0 -586
- package/packages/config-stylelint/node_modules/stylelint/lib/cli.mjs +0 -746
- package/packages/config-stylelint/node_modules/stylelint/lib/constants.mjs +0 -25
- package/packages/config-stylelint/node_modules/stylelint/lib/createPartialStylelintResult.mjs +0 -114
- package/packages/config-stylelint/node_modules/stylelint/lib/createPlugin.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/createStylelint.mjs +0 -37
- package/packages/config-stylelint/node_modules/stylelint/lib/descriptionlessDisables.mjs +0 -51
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/calcSeverityCounts.mjs +0 -21
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/compactFormatter.mjs +0 -23
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/index.mjs +0 -23
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/jsonFormatter.mjs +0 -10
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/preprocessWarnings.mjs +0 -74
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/stringFormatter.mjs +0 -308
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/tapFormatter.mjs +0 -85
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/terminalLink.mjs +0 -21
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/unixFormatter.mjs +0 -32
- package/packages/config-stylelint/node_modules/stylelint/lib/formatters/verboseFormatter.mjs +0 -175
- package/packages/config-stylelint/node_modules/stylelint/lib/getConfigForFile.mjs +0 -110
- package/packages/config-stylelint/node_modules/stylelint/lib/getPostcssResult.mjs +0 -130
- package/packages/config-stylelint/node_modules/stylelint/lib/index.mjs +0 -38
- package/packages/config-stylelint/node_modules/stylelint/lib/invalidScopeDisables.mjs +0 -41
- package/packages/config-stylelint/node_modules/stylelint/lib/isPathIgnored.mjs +0 -48
- package/packages/config-stylelint/node_modules/stylelint/lib/lintPostcssResult.mjs +0 -172
- package/packages/config-stylelint/node_modules/stylelint/lib/lintSource.mjs +0 -135
- package/packages/config-stylelint/node_modules/stylelint/lib/needlessDisables.mjs +0 -91
- package/packages/config-stylelint/node_modules/stylelint/lib/normalizeAllRuleSettings.mjs +0 -29
- package/packages/config-stylelint/node_modules/stylelint/lib/normalizeRuleSettings.mjs +0 -56
- package/packages/config-stylelint/node_modules/stylelint/lib/postcssPlugin.mjs +0 -50
- package/packages/config-stylelint/node_modules/stylelint/lib/prepareReturnValue.mjs +0 -63
- package/packages/config-stylelint/node_modules/stylelint/lib/printConfig.mjs +0 -44
- package/packages/config-stylelint/node_modules/stylelint/lib/reference/atKeywords.mjs +0 -83
- package/packages/config-stylelint/node_modules/stylelint/lib/reference/functions.mjs +0 -96
- package/packages/config-stylelint/node_modules/stylelint/lib/reference/keywords.mjs +0 -663
- package/packages/config-stylelint/node_modules/stylelint/lib/reference/mediaFeatures.mjs +0 -115
- package/packages/config-stylelint/node_modules/stylelint/lib/reference/mediaTypes.mjs +0 -14
- package/packages/config-stylelint/node_modules/stylelint/lib/reference/prefixes.mjs +0 -17
- package/packages/config-stylelint/node_modules/stylelint/lib/reference/properties.mjs +0 -1112
- package/packages/config-stylelint/node_modules/stylelint/lib/reference/selectors.mjs +0 -472
- package/packages/config-stylelint/node_modules/stylelint/lib/reference/units.mjs +0 -82
- package/packages/config-stylelint/node_modules/stylelint/lib/reportDisables.mjs +0 -48
- package/packages/config-stylelint/node_modules/stylelint/lib/reportUnknownRuleNames.mjs +0 -76
- package/packages/config-stylelint/node_modules/stylelint/lib/resolveConfig.mjs +0 -43
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/alpha-value-notation/index.mjs +0 -207
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/annotation-no-unknown/index.mjs +0 -88
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-allowed-list/index.mjs +0 -62
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-descriptor-no-unknown/index.mjs +0 -108
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-descriptor-value-no-unknown/index.mjs +0 -64
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-disallowed-list/index.mjs +0 -62
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-empty-line-before/index.mjs +0 -178
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-no-deprecated/index.mjs +0 -86
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-no-unknown/index.mjs +0 -80
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-no-vendor-prefix/index.mjs +0 -82
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-prelude-no-invalid/index.mjs +0 -76
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/at-rule-property-required-list/index.mjs +0 -92
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/block-no-empty/index.mjs +0 -116
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/block-no-redundant-nested-style-rules/index.mjs +0 -52
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-function-alias-notation/index.mjs +0 -87
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-function-notation/index.mjs +0 -168
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-hex-alpha/index.mjs +0 -75
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-hex-length/index.mjs +0 -128
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-named/colordUtils.mjs +0 -109
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-named/index.mjs +0 -183
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-no-hex/index.mjs +0 -69
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/color-no-invalid-hex/index.mjs +0 -68
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-empty-line-before/index.mjs +0 -131
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-no-empty/index.mjs +0 -50
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-pattern/index.mjs +0 -51
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-whitespace-inside/index.mjs +0 -149
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/comment-word-disallowed-list/index.mjs +0 -63
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/container-name-pattern/index.mjs +0 -107
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-media-pattern/index.mjs +0 -61
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-property-empty-line-before/index.mjs +0 -156
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-property-no-missing-var-function/index.mjs +0 -148
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/custom-property-pattern/index.mjs +0 -100
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-custom-properties/index.mjs +0 -82
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-properties/index.mjs +0 -301
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-redundant-longhand-properties/index.mjs +0 -411
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-no-shorthand-property-overrides/index.mjs +0 -74
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-block-single-line-max-declarations/index.mjs +0 -62
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-empty-line-before/index.mjs +0 -160
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-no-important/index.mjs +0 -51
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-max-values/index.mjs +0 -79
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-unit-allowed-list/index.mjs +0 -108
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-unit-disallowed-list/index.mjs +0 -94
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-allowed-list/index.mjs +0 -66
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-disallowed-list/index.mjs +0 -66
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-keyword-no-deprecated/index.mjs +0 -203
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/declaration-property-value-no-unknown/index.mjs +0 -424
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/display-notation/index.mjs +0 -225
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-family-name-quotes/index.mjs +0 -243
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-family-no-duplicate-names/index.mjs +0 -122
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-family-no-missing-generic-family-keyword/index.mjs +0 -122
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/font-weight-notation/index.mjs +0 -221
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-allowed-list/index.mjs +0 -114
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-calc-no-unspaced-operator/index.mjs +0 -589
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-disallowed-list/index.mjs +0 -73
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-linear-gradient-no-nonstandard-direction/index.mjs +0 -145
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-name-case/index.mjs +0 -120
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-no-unknown/index.mjs +0 -83
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-no-scheme-relative/index.mjs +0 -67
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-quotes/index.mjs +0 -230
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-scheme-allowed-list/index.mjs +0 -70
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/function-url-scheme-disallowed-list/index.mjs +0 -70
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/hue-degree-notation/index.mjs +0 -123
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/import-notation/index.mjs +0 -104
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/index.mjs +0 -180
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframe-block-no-duplicate-selectors/index.mjs +0 -68
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframe-declaration-no-important/index.mjs +0 -54
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframe-selector-notation/index.mjs +0 -202
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/keyframes-name-pattern/index.mjs +0 -63
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/layer-name-pattern/index.mjs +0 -91
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/length-zero-no-unit/index.mjs +0 -221
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/lightness-notation/index.mjs +0 -165
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/max-nesting-depth/index.mjs +0 -195
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-allowed-list/index.mjs +0 -67
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-disallowed-list/index.mjs +0 -67
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-no-unknown/index.mjs +0 -79
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-no-vendor-prefix/index.mjs +0 -94
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-unit-allowed-list/index.mjs +0 -110
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-value-allowed-list/index.mjs +0 -100
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-name-value-no-unknown/index.mjs +0 -277
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-feature-range-notation/index.mjs +0 -187
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-query-no-invalid/index.mjs +0 -193
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/media-type-no-deprecated/index.mjs +0 -82
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/index.mjs +0 -117
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/utils/findNotContiguousOrRectangular.mjs +0 -57
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/nesting-selector-no-missing-scoping-root/index.mjs +0 -165
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-descending-specificity/index.mjs +0 -200
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-duplicate-at-import-rules/index.mjs +0 -156
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-duplicate-selectors/index.mjs +0 -218
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-empty-source/index.mjs +0 -61
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-invalid-double-slash-comments/index.mjs +0 -77
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-invalid-position-at-import-rule/index.mjs +0 -76
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-invalid-position-declaration/index.mjs +0 -86
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-irregular-whitespace/index.mjs +0 -236
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-unknown-animations/index.mjs +0 -71
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-unknown-custom-media/index.mjs +0 -77
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/no-unknown-custom-properties/index.mjs +0 -72
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/number-max-precision/index.mjs +0 -209
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-allowed-list/index.mjs +0 -58
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-disallowed-list/index.mjs +0 -58
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-no-deprecated/index.mjs +0 -143
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-no-unknown/index.mjs +0 -126
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/property-no-vendor-prefix/index.mjs +0 -100
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/rule-empty-line-before/index.mjs +0 -156
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/rule-nesting-at-rule-required-list/index.mjs +0 -85
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/rule-selector-property-disallowed-list/index.mjs +0 -119
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-anb-no-unmatchable/index.mjs +0 -121
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-name-disallowed-list/index.mjs +0 -69
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-operator-allowed-list/index.mjs +0 -70
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-operator-disallowed-list/index.mjs +0 -70
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-attribute-quotes/index.mjs +0 -107
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-class-pattern/index.mjs +0 -71
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-combinator-allowed-list/index.mjs +0 -81
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-combinator-disallowed-list/index.mjs +0 -81
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-disallowed-list/index.mjs +0 -115
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-id-pattern/index.mjs +0 -66
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-attribute/index.mjs +0 -92
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-class/index.mjs +0 -75
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-combinators/index.mjs +0 -77
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-compound-selectors/index.mjs +0 -123
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-id/index.mjs +0 -107
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-pseudo-class/index.mjs +0 -85
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-specificity/index.mjs +0 -146
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-type/index.mjs +0 -219
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-max-universal/index.mjs +0 -95
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-nested-pattern/index.mjs +0 -95
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-no-qualifying-type/index.mjs +0 -323
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-no-vendor-prefix/index.mjs +0 -92
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-not-notation/index.mjs +0 -217
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-class-allowed-list/index.mjs +0 -84
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-class-disallowed-list/index.mjs +0 -84
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-class-no-unknown/index.mjs +0 -179
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-allowed-list/index.mjs +0 -75
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-colon-notation/index.mjs +0 -93
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-disallowed-list/index.mjs +0 -74
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-pseudo-element-no-unknown/index.mjs +0 -91
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-type-case/index.mjs +0 -118
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/selector-type-no-unknown/index.mjs +0 -148
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/shorthand-property-no-redundant-values/index.mjs +0 -359
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/string-no-newline/index.mjs +0 -120
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/syntax-string-no-invalid/index.mjs +0 -80
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/time-min-milliseconds/index.mjs +0 -167
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/unit-allowed-list/index.mjs +0 -116
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/unit-disallowed-list/index.mjs +0 -211
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/unit-no-unknown/index.mjs +0 -207
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/value-keyword-case/index.mjs +0 -253
- package/packages/config-stylelint/node_modules/stylelint/lib/rules/value-no-vendor-prefix/index.mjs +0 -92
- package/packages/config-stylelint/node_modules/stylelint/lib/standalone.mjs +0 -381
- package/packages/config-stylelint/node_modules/stylelint/lib/timing.mjs +0 -134
- package/packages/config-stylelint/node_modules/stylelint/lib/unscopedDisables.mjs +0 -66
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/FileCache.mjs +0 -115
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/addEmptyLineBefore.mjs +0 -21
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/addSemicolonForEditInfo.mjs +0 -35
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/appendRuleName.mjs +0 -13
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/arrayEqual.mjs +0 -14
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/beforeBlockString.mjs +0 -28
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/blockString.mjs +0 -19
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/blurInterpolation.mjs +0 -8
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/cachedImport.mjs +0 -68
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/checkAgainstRule.mjs +0 -71
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/checkInvalidCLIOptions.mjs +0 -105
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/configurationComment.mjs +0 -74
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/containsString.mjs +0 -52
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/createMapWithSet.mjs +0 -19
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/dynamicImport.mjs +0 -13
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/eachDeclarationBlock.mjs +0 -59
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/eachNodeUpToRoot.mjs +0 -22
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/emitWarning.mjs +0 -83
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/errors.mjs +0 -55
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/filterFilePaths.mjs +0 -17
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/findAnimationName.mjs +0 -74
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/findAtRuleContext.mjs +0 -27
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/findFontFamily.mjs +0 -148
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/findMediaFeatureNames.mjs +0 -151
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/findNodeUpToRoot.mjs +0 -25
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/fixEmptyLinesBefore.mjs +0 -26
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/functionArgumentsSearch.mjs +0 -64
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getAtRuleParams.mjs +0 -7
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getDeclarationValue.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getDimension.mjs +0 -62
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getFileIgnorer.mjs +0 -41
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getFormatter.mjs +0 -43
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getFormatterOptionsText.mjs +0 -12
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getImportantPosition.mjs +0 -15
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getLexer.mjs +0 -39
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getModulePath.mjs +0 -35
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getNextNonSharedLineCommentNode.mjs +0 -34
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getPreviousNonSharedLineCommentNode.mjs +0 -36
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getRelativePath.mjs +0 -12
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getRuleSelector.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getSchemeFromUrl.mjs +0 -36
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getSelectorSourceIndex.mjs +0 -12
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getStrippedSelectorSource.mjs +0 -47
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/getStylelintRule.mjs +0 -22
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasBlock.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasEmptyLine.mjs +0 -13
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasInterpolation.mjs +0 -24
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasLessInterpolation.mjs +0 -11
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasPsvInterpolation.mjs +0 -11
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasScssInterpolation.mjs +0 -11
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/hasTplInterpolation.mjs +0 -11
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/hash.mjs +0 -10
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterBlock.mjs +0 -15
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterComment.mjs +0 -15
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterSingleLineComment.mjs +0 -19
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAfterStandardPropertyDeclaration.mjs +0 -19
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isAutoprefixable.mjs +0 -364
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isBlocklessAtRuleAfterBlocklessAtRule.mjs +0 -21
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isBlocklessAtRuleAfterSameNameBlocklessAtRule.mjs +0 -21
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isContextFunctionalPseudoClass.mjs +0 -24
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCounterIncrementCustomIdentValue.mjs +0 -19
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCounterResetCustomIdentValue.mjs +0 -19
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomElement.mjs +0 -34
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomFunction.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomMediaQuery.mjs +0 -8
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomProperty.mjs +0 -8
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isCustomSelector.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isDescriptorDeclaration.mjs +0 -22
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isFirstNested.mjs +0 -83
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isFirstNodeOfRoot.mjs +0 -17
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isHexColor.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isInDocument.mjs +0 -32
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isKeyframeRule.mjs +0 -17
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isKeyframeSelector.mjs +0 -29
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isMathFunction.mjs +0 -11
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isNonNegativeInteger.mjs +0 -6
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isNumbery.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isOnlyWhitespace.mjs +0 -17
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isPathNotFoundError.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isScssVariable.mjs +0 -19
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isSharedLineComment.mjs +0 -53
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isSingleLineString.mjs +0 -10
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxAtRule.mjs +0 -32
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxColorFunction.mjs +0 -24
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxCombinator.mjs +0 -32
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxComment.mjs +0 -13
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxDeclaration.mjs +0 -57
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxFunction.mjs +0 -28
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxHexColor.mjs +0 -14
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxKeyframesName.mjs +0 -15
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxProperty.mjs +0 -32
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxRule.mjs +0 -24
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxSelector.mjs +0 -56
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxTypeSelector.mjs +0 -56
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxUrl.mjs +0 -49
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isStandardSyntaxValue.mjs +0 -51
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isUnicodeRangeDescriptor.mjs +0 -24
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isUnicodeSupported.mjs +0 -26
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isUrlFunction.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isValidFontSize.mjs +0 -38
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isValidHex.mjs +0 -11
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isValidIdentifier.mjs +0 -39
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isVarFunction.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isVariable.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/isWhitespace.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/matchesStringOrRegExp.mjs +0 -97
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/mergeSyntaxDefinitions.mjs +0 -137
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/narrowFixRange.mjs +0 -68
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/nodeContextLookup.mjs +0 -41
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/nodeFieldIndices.mjs +0 -119
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/normalizeFilePath.mjs +0 -26
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/normalizeFixMode.mjs +0 -22
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/normalizeSelector.mjs +0 -166
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/optionsMatches.mjs +0 -20
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/parseCustomMediaQuery.mjs +0 -15
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/parseMediaQuery.mjs +0 -15
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/parseSelector.mjs +0 -19
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/pathExists.mjs +0 -16
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/pluralize.mjs +0 -10
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/putIfAbsent.mjs +0 -20
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/rangesOverlap.mjs +0 -19
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/rawNodeString.mjs +0 -29
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/regexes.mjs +0 -135
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/removeEmptyLinesBefore.mjs +0 -13
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/report.mjs +0 -321
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/reportCommentProblem.mjs +0 -39
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/resolveFilePath.mjs +0 -38
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/resolveNestedSelectorsForRule.mjs +0 -108
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/resolveOptionValue.mjs +0 -30
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/resolveSilent.mjs +0 -144
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/ruleMessages.mjs +0 -18
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/setAtRuleParams.mjs +0 -18
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/setDeclarationValue.mjs +0 -18
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/suppressionsService.mjs +0 -317
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/toPath.mjs +0 -23
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/typeGuards.mjs +0 -90
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/uniteSets.mjs +0 -9
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/validateObjectWithArrayProps.mjs +0 -29
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/validateObjectWithProps.mjs +0 -28
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/validateOptions.mjs +0 -176
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/validateTypes.mjs +0 -148
- package/packages/config-stylelint/node_modules/stylelint/lib/utils/vendor.mjs +0 -43
- package/packages/config-stylelint/node_modules/stylelint/lib/validateDisableSettings.mjs +0 -67
- package/packages/config-stylelint/node_modules/stylelint/lib/writeOutputFile.mjs +0 -15
- package/packages/config-stylelint/node_modules/stylelint/package.json +0 -212
- package/packages/config-stylelint/node_modules/stylelint/types/stylelint/index.d.ts +0 -1590
- package/packages/config-stylelint/node_modules/unicorn-magic/default.d.ts +0 -13
- package/packages/config-stylelint/node_modules/unicorn-magic/default.js +0 -14
- package/packages/config-stylelint/node_modules/unicorn-magic/license +0 -9
- package/packages/config-stylelint/node_modules/unicorn-magic/node.d.ts +0 -125
- package/packages/config-stylelint/node_modules/unicorn-magic/node.js +0 -49
- package/packages/config-stylelint/node_modules/unicorn-magic/package.json +0 -68
- package/packages/config-stylelint/node_modules/unicorn-magic/readme.md +0 -31
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_CACHE_LOCATION = './.stylelintcache';
|
|
2
|
-
export const CACHE_STRATEGY_METADATA = 'metadata';
|
|
3
|
-
export const CACHE_STRATEGY_CONTENT = 'content';
|
|
4
|
-
export const DEFAULT_CACHE_STRATEGY = CACHE_STRATEGY_METADATA;
|
|
5
|
-
|
|
6
|
-
export const DEFAULT_IGNORE_FILENAME = '.stylelintignore';
|
|
7
|
-
|
|
8
|
-
export const DEFAULT_SUPPRESSION_FILENAME = 'stylelint-suppressions.json';
|
|
9
|
-
|
|
10
|
-
export const DEFAULT_FORMATTER = 'string';
|
|
11
|
-
|
|
12
|
-
// NOTE: Partially based on `sysexits.h`.
|
|
13
|
-
export const EXIT_CODE_SUCCESS = 0;
|
|
14
|
-
export const EXIT_CODE_FATAL_ERROR = 1;
|
|
15
|
-
export const EXIT_CODE_LINT_PROBLEM = 2;
|
|
16
|
-
export const EXIT_CODE_INVALID_USAGE = 64;
|
|
17
|
-
export const EXIT_CODE_INVALID_CONFIG = 78;
|
|
18
|
-
|
|
19
|
-
export const RULE_NAME_ALL = 'all';
|
|
20
|
-
|
|
21
|
-
export const SEVERITY_ERROR = 'error';
|
|
22
|
-
export const SEVERITY_WARNING = 'warning';
|
|
23
|
-
export const DEFAULT_SEVERITY = SEVERITY_ERROR;
|
|
24
|
-
|
|
25
|
-
export const DEFAULT_FIX_MODE = 'strict';
|
package/packages/config-stylelint/node_modules/stylelint/lib/createPartialStylelintResult.mjs
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { SEVERITY_ERROR } from './constants.mjs';
|
|
2
|
-
import process from 'node:process';
|
|
3
|
-
|
|
4
|
-
/** @import {LintResult as StylelintResult, PostcssResult} from 'stylelint' */
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @param {PostcssResult} [postcssResult]
|
|
8
|
-
* @param {import('stylelint').CssSyntaxError} [cssSyntaxError]
|
|
9
|
-
* @returns {StylelintResult}
|
|
10
|
-
*/
|
|
11
|
-
export default function createPartialStylelintResult(postcssResult, cssSyntaxError) {
|
|
12
|
-
/** @type {StylelintResult} */
|
|
13
|
-
let stylelintResult;
|
|
14
|
-
/** @type {string | undefined} */
|
|
15
|
-
let source;
|
|
16
|
-
|
|
17
|
-
if (postcssResult && postcssResult.root) {
|
|
18
|
-
if (postcssResult.root.source) {
|
|
19
|
-
source = postcssResult.root.source.input.file;
|
|
20
|
-
|
|
21
|
-
if (!source && 'id' in postcssResult.root.source.input) {
|
|
22
|
-
source = postcssResult.root.source.input.id;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// @ts-expect-error -- TS2339: Property 'noDeprecation' does not exist on type 'Process'.
|
|
27
|
-
// https://github.com/nodejs/node/blob/main/doc/api/process.md#processnodeprecation
|
|
28
|
-
const includeDeprecations = !process.noDeprecation;
|
|
29
|
-
const deprecationMessages = includeDeprecations
|
|
30
|
-
? postcssResult.messages.filter((message) => message.stylelintType === 'deprecation')
|
|
31
|
-
: [];
|
|
32
|
-
const deprecations = deprecationMessages.map((deprecationMessage) => {
|
|
33
|
-
return {
|
|
34
|
-
text: deprecationMessage.text,
|
|
35
|
-
reference: deprecationMessage.stylelintReference,
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const invalidOptionMessages = postcssResult.messages.filter(
|
|
40
|
-
(message) => message.stylelintType === 'invalidOption',
|
|
41
|
-
);
|
|
42
|
-
const invalidOptionWarnings = invalidOptionMessages.map((invalidOptionMessage) => {
|
|
43
|
-
return {
|
|
44
|
-
text: invalidOptionMessage.text,
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
const parseErrors = postcssResult.messages.filter(
|
|
49
|
-
(message) => message.stylelintType === 'parseError',
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
// Remove deprecation warnings, invalid options, and parse errors from the messages
|
|
53
|
-
postcssResult.messages = postcssResult.messages.filter(
|
|
54
|
-
(message) =>
|
|
55
|
-
message.stylelintType !== 'deprecation' &&
|
|
56
|
-
message.stylelintType !== 'invalidOption' &&
|
|
57
|
-
message.stylelintType !== 'parseError',
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
// This defines the stylelint result object that formatters receive
|
|
61
|
-
stylelintResult = {
|
|
62
|
-
source,
|
|
63
|
-
deprecations,
|
|
64
|
-
invalidOptionWarnings,
|
|
65
|
-
// @ts-expect-error -- TS2322: Type 'Message[]' is not assignable to type '(Warning & { stylelintType: string; })[]'.
|
|
66
|
-
parseErrors,
|
|
67
|
-
errored: postcssResult.stylelint.stylelintError,
|
|
68
|
-
warnings: postcssResult.messages.map((message) => {
|
|
69
|
-
return {
|
|
70
|
-
line: message.line,
|
|
71
|
-
column: message.column,
|
|
72
|
-
endLine: message.endLine,
|
|
73
|
-
endColumn: message.endColumn,
|
|
74
|
-
fix: message.fix,
|
|
75
|
-
rule: message.rule,
|
|
76
|
-
severity: message.severity,
|
|
77
|
-
text: message.text,
|
|
78
|
-
url: message.url,
|
|
79
|
-
};
|
|
80
|
-
}),
|
|
81
|
-
ignored: postcssResult.stylelint.ignored,
|
|
82
|
-
_postcssResult: postcssResult,
|
|
83
|
-
};
|
|
84
|
-
} else if (cssSyntaxError) {
|
|
85
|
-
if (cssSyntaxError.name !== 'CssSyntaxError') {
|
|
86
|
-
throw cssSyntaxError;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
stylelintResult = {
|
|
90
|
-
source: cssSyntaxError.file || '<input css 1>',
|
|
91
|
-
deprecations: [],
|
|
92
|
-
invalidOptionWarnings: [],
|
|
93
|
-
parseErrors: [],
|
|
94
|
-
errored: true,
|
|
95
|
-
warnings: [
|
|
96
|
-
{
|
|
97
|
-
line: cssSyntaxError.line,
|
|
98
|
-
column: cssSyntaxError.column,
|
|
99
|
-
endLine: cssSyntaxError.endLine,
|
|
100
|
-
endColumn: cssSyntaxError.endColumn,
|
|
101
|
-
rule: cssSyntaxError.name,
|
|
102
|
-
severity: SEVERITY_ERROR,
|
|
103
|
-
text: `${cssSyntaxError.reason} (${cssSyntaxError.name})`,
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
};
|
|
107
|
-
} else {
|
|
108
|
-
throw new Error(
|
|
109
|
-
'createPartialStylelintResult must be called with either postcssResult or CssSyntaxError',
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return stylelintResult;
|
|
114
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import process from 'node:process';
|
|
2
|
-
|
|
3
|
-
import { cosmiconfig } from 'cosmiconfig';
|
|
4
|
-
|
|
5
|
-
import FileCache from './utils/FileCache.mjs';
|
|
6
|
-
import { augmentConfigExtended } from './augmentConfig.mjs';
|
|
7
|
-
|
|
8
|
-
const IS_TEST = process.env.NODE_ENV === 'test';
|
|
9
|
-
const STOP_DIR = IS_TEST ? process.cwd() : undefined;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @type {import('stylelint').PublicApi['_createLinter']}
|
|
13
|
-
*/
|
|
14
|
-
export default function createStylelint(options = {}) {
|
|
15
|
-
const cwd = options.cwd || process.cwd();
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
_options: { ...options, cwd },
|
|
19
|
-
|
|
20
|
-
_extendExplorer: cosmiconfig('', {
|
|
21
|
-
transform: augmentConfigExtended(cwd),
|
|
22
|
-
stopDir: STOP_DIR,
|
|
23
|
-
searchStrategy: 'global', // for backward compatibility
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
_configExplorer: cosmiconfig('stylelint', {
|
|
27
|
-
stopDir: STOP_DIR,
|
|
28
|
-
searchStrategy: 'global', // for backward compatibility
|
|
29
|
-
}),
|
|
30
|
-
|
|
31
|
-
_specifiedConfigCache: new Map(),
|
|
32
|
-
_augmentedConfigCache: new Map(),
|
|
33
|
-
_postcssResultCache: new Map(),
|
|
34
|
-
_compiledOverridesCache: new Map(),
|
|
35
|
-
_fileCache: new FileCache(options.cacheLocation, options.cacheStrategy, cwd),
|
|
36
|
-
};
|
|
37
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { RULE_NAME_ALL } from './constants.mjs';
|
|
2
|
-
|
|
3
|
-
import optionsMatches from './utils/optionsMatches.mjs';
|
|
4
|
-
import reportCommentProblem from './utils/reportCommentProblem.mjs';
|
|
5
|
-
import validateDisableSettings from './validateDisableSettings.mjs';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @param {import('stylelint').PostcssResult} postcssResult
|
|
9
|
-
* @returns {void}
|
|
10
|
-
*/
|
|
11
|
-
export default function descriptionlessDisables(postcssResult) {
|
|
12
|
-
const [enabled, options] = validateDisableSettings(
|
|
13
|
-
postcssResult,
|
|
14
|
-
'reportDescriptionlessDisables',
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
if (!options) return;
|
|
18
|
-
|
|
19
|
-
/** @type {Set<import('postcss').Node>} */
|
|
20
|
-
const alreadyReported = new Set();
|
|
21
|
-
|
|
22
|
-
for (const [rule, ruleRanges] of Object.entries(postcssResult.stylelint.disabledRanges)) {
|
|
23
|
-
for (const range of ruleRanges) {
|
|
24
|
-
if (range.description) continue;
|
|
25
|
-
|
|
26
|
-
const node = range.node;
|
|
27
|
-
|
|
28
|
-
if (alreadyReported.has(node)) continue;
|
|
29
|
-
|
|
30
|
-
if (enabled === optionsMatches(options, 'except', rule)) {
|
|
31
|
-
// An 'all' rule will get copied for each individual rule. If the
|
|
32
|
-
// configuration is `[false, {except: ['specific-rule']}]`, we
|
|
33
|
-
// don't want to report the copies that match except, so we record
|
|
34
|
-
// the comment as already reported.
|
|
35
|
-
if (!enabled && rule === RULE_NAME_ALL) alreadyReported.add(node);
|
|
36
|
-
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
alreadyReported.add(node);
|
|
41
|
-
|
|
42
|
-
reportCommentProblem({
|
|
43
|
-
rule: '--report-descriptionless-disables',
|
|
44
|
-
message: `Disable for "${rule}" is missing a description`,
|
|
45
|
-
severity: options.severity,
|
|
46
|
-
node,
|
|
47
|
-
postcssResult,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
package/packages/config-stylelint/node_modules/stylelint/lib/formatters/calcSeverityCounts.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SEVERITY_ERROR, SEVERITY_WARNING } from '../constants.mjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @import {Severity} from 'stylelint'
|
|
5
|
-
*
|
|
6
|
-
* @param {Severity} severity
|
|
7
|
-
* @param {Record<Severity, number>} counts
|
|
8
|
-
* @returns {void}
|
|
9
|
-
*/
|
|
10
|
-
export default function calcSeverityCounts(severity, counts) {
|
|
11
|
-
switch (severity) {
|
|
12
|
-
case SEVERITY_ERROR:
|
|
13
|
-
counts.error += 1;
|
|
14
|
-
break;
|
|
15
|
-
case SEVERITY_WARNING:
|
|
16
|
-
counts.warning += 1;
|
|
17
|
-
break;
|
|
18
|
-
default:
|
|
19
|
-
throw new Error(`Unknown severity: "${severity}"`);
|
|
20
|
-
}
|
|
21
|
-
}
|
package/packages/config-stylelint/node_modules/stylelint/lib/formatters/compactFormatter.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import preprocessWarnings from './preprocessWarnings.mjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @type {import('stylelint').Formatter}
|
|
5
|
-
*/
|
|
6
|
-
export default function compactFormatter(results) {
|
|
7
|
-
const lines = results.flatMap((result) => {
|
|
8
|
-
const { warnings } = preprocessWarnings(result);
|
|
9
|
-
|
|
10
|
-
return warnings.map(
|
|
11
|
-
(warning) =>
|
|
12
|
-
`${result.source}: ` +
|
|
13
|
-
`line ${warning.line}, ` +
|
|
14
|
-
`col ${warning.column}, ` +
|
|
15
|
-
`${warning.severity} - ` +
|
|
16
|
-
`${warning.text}`,
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
lines.push('');
|
|
21
|
-
|
|
22
|
-
return lines.join('\n');
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @type {import('stylelint').PublicApi['formatters']} */
|
|
2
|
-
const formatters = {
|
|
3
|
-
get compact() {
|
|
4
|
-
return import('./compactFormatter.mjs').then((m) => m.default);
|
|
5
|
-
},
|
|
6
|
-
get json() {
|
|
7
|
-
return import('./jsonFormatter.mjs').then((m) => m.default);
|
|
8
|
-
},
|
|
9
|
-
get string() {
|
|
10
|
-
return import('./stringFormatter.mjs').then((m) => m.default);
|
|
11
|
-
},
|
|
12
|
-
get tap() {
|
|
13
|
-
return import('./tapFormatter.mjs').then((m) => m.default);
|
|
14
|
-
},
|
|
15
|
-
get unix() {
|
|
16
|
-
return import('./unixFormatter.mjs').then((m) => m.default);
|
|
17
|
-
},
|
|
18
|
-
get verbose() {
|
|
19
|
-
return import('./verboseFormatter.mjs').then((m) => m.default);
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default formatters;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Omit any properties starting with `_`, which are fake-private
|
|
3
|
-
*
|
|
4
|
-
* @type {import('stylelint').Formatter}
|
|
5
|
-
*/
|
|
6
|
-
export default function jsonFormatter(results) {
|
|
7
|
-
return JSON.stringify(results, (key, value) => {
|
|
8
|
-
return key[0] === '_' ? undefined : value;
|
|
9
|
-
});
|
|
10
|
-
}
|
package/packages/config-stylelint/node_modules/stylelint/lib/formatters/preprocessWarnings.mjs
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_SEVERITY, SEVERITY_ERROR } from '../constants.mjs';
|
|
2
|
-
|
|
3
|
-
/** @import {LintResult} from 'stylelint' */
|
|
4
|
-
/** @typedef {LintResult['parseErrors'][0]} ParseError */
|
|
5
|
-
/** @typedef {LintResult['warnings'][0]} Warning */
|
|
6
|
-
/** @typedef {Warning['severity']} Severity */
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Preprocess warnings in a given lint result.
|
|
10
|
-
* Note that this function has a side-effect.
|
|
11
|
-
*
|
|
12
|
-
* @param {LintResult} result
|
|
13
|
-
* @returns {LintResult}
|
|
14
|
-
*/
|
|
15
|
-
export default function preprocessWarnings(result) {
|
|
16
|
-
for (const error of result.parseErrors || []) {
|
|
17
|
-
result.warnings.push(parseErrorToWarning(error));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
for (const warning of result.warnings) {
|
|
21
|
-
warning.severity = normalizeSeverity(warning);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
result.warnings.sort(byLocationOrder);
|
|
25
|
-
|
|
26
|
-
return result;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @param {ParseError} error
|
|
31
|
-
* @returns {Warning}
|
|
32
|
-
*/
|
|
33
|
-
function parseErrorToWarning(error) {
|
|
34
|
-
return {
|
|
35
|
-
line: error.line,
|
|
36
|
-
column: error.column,
|
|
37
|
-
rule: error.stylelintType,
|
|
38
|
-
severity: SEVERITY_ERROR,
|
|
39
|
-
text: `${error.text} (${error.stylelintType})`,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @param {Warning} warning
|
|
45
|
-
* @returns {Severity}
|
|
46
|
-
*/
|
|
47
|
-
function normalizeSeverity(warning) {
|
|
48
|
-
// NOTE: Plugins may add a warning without severity, for example,
|
|
49
|
-
// by directly using the PostCSS `Result#warn()` API.
|
|
50
|
-
return warning.severity || DEFAULT_SEVERITY;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @param {Warning} a
|
|
55
|
-
* @param {Warning} b
|
|
56
|
-
* @returns {number}
|
|
57
|
-
*/
|
|
58
|
-
function byLocationOrder(a, b) {
|
|
59
|
-
// positionless first
|
|
60
|
-
if (!a.line && b.line) return -1;
|
|
61
|
-
|
|
62
|
-
// positionless first
|
|
63
|
-
if (a.line && !b.line) return 1;
|
|
64
|
-
|
|
65
|
-
if (a.line < b.line) return -1;
|
|
66
|
-
|
|
67
|
-
if (a.line > b.line) return 1;
|
|
68
|
-
|
|
69
|
-
if (a.column < b.column) return -1;
|
|
70
|
-
|
|
71
|
-
if (a.column > b.column) return 1;
|
|
72
|
-
|
|
73
|
-
return 0;
|
|
74
|
-
}
|
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
import { relative, sep } from 'node:path';
|
|
2
|
-
import process from 'node:process';
|
|
3
|
-
|
|
4
|
-
import { getBorderCharacters, table } from 'table';
|
|
5
|
-
import picocolors from 'picocolors';
|
|
6
|
-
import stringWidth from 'string-width';
|
|
7
|
-
|
|
8
|
-
import { assertNumber } from '../utils/validateTypes.mjs';
|
|
9
|
-
import calcSeverityCounts from './calcSeverityCounts.mjs';
|
|
10
|
-
import isUnicodeSupported from '../utils/isUnicodeSupported.mjs';
|
|
11
|
-
import pluralize from '../utils/pluralize.mjs';
|
|
12
|
-
import preprocessWarnings from './preprocessWarnings.mjs';
|
|
13
|
-
import terminalLink from './terminalLink.mjs';
|
|
14
|
-
|
|
15
|
-
const { yellow, dim, underline, blue, red, green } = picocolors;
|
|
16
|
-
|
|
17
|
-
const NON_ASCII_PATTERN = /\P{ASCII}/u;
|
|
18
|
-
const MARGIN_WIDTHS = 9;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @param {string} s
|
|
22
|
-
* @returns {string}
|
|
23
|
-
*/
|
|
24
|
-
function identity(s) {
|
|
25
|
-
return s;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const levelColors = {
|
|
29
|
-
info: blue,
|
|
30
|
-
warning: yellow,
|
|
31
|
-
error: red,
|
|
32
|
-
success: identity,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const supportsUnicode = isUnicodeSupported();
|
|
36
|
-
|
|
37
|
-
const symbols = {
|
|
38
|
-
info: blue(supportsUnicode ? 'ℹ' : 'i'),
|
|
39
|
-
warning: yellow(supportsUnicode ? '⚠' : '‼'),
|
|
40
|
-
error: red(supportsUnicode ? '✖' : '×'),
|
|
41
|
-
success: green(supportsUnicode ? '✔' : '√'),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @param {import('stylelint').LintResult[]} results
|
|
46
|
-
* @returns {string}
|
|
47
|
-
*/
|
|
48
|
-
function deprecationsFormatter(results) {
|
|
49
|
-
const allDeprecationWarnings = results.flatMap((result) => result.deprecations || []);
|
|
50
|
-
|
|
51
|
-
if (allDeprecationWarnings.length === 0) {
|
|
52
|
-
return '';
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const seenText = new Set();
|
|
56
|
-
const lines = [];
|
|
57
|
-
|
|
58
|
-
for (const { text, reference } of allDeprecationWarnings) {
|
|
59
|
-
if (seenText.has(text)) continue;
|
|
60
|
-
|
|
61
|
-
seenText.add(text);
|
|
62
|
-
|
|
63
|
-
let line = ` ${dim('-')} ${text}`;
|
|
64
|
-
|
|
65
|
-
if (reference) {
|
|
66
|
-
line += dim(` See: ${underline(reference)}`);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
lines.push(line);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return ['', yellow('Deprecation warnings:'), ...lines, ''].join('\n');
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @param {import('stylelint').LintResult[]} results
|
|
77
|
-
* @returns {string}
|
|
78
|
-
*/
|
|
79
|
-
function invalidOptionsFormatter(results) {
|
|
80
|
-
const allInvalidOptionWarnings = results.flatMap((result) =>
|
|
81
|
-
(result.invalidOptionWarnings || []).map((warning) => warning.text),
|
|
82
|
-
);
|
|
83
|
-
const uniqueInvalidOptionWarnings = [...new Set(allInvalidOptionWarnings)];
|
|
84
|
-
|
|
85
|
-
return uniqueInvalidOptionWarnings.reduce((output, warning) => {
|
|
86
|
-
output += red('Invalid Option: ');
|
|
87
|
-
output += warning;
|
|
88
|
-
|
|
89
|
-
return `${output}\n`;
|
|
90
|
-
}, '\n');
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* @param {string} fromValue
|
|
95
|
-
* @param {string} cwd
|
|
96
|
-
* @returns {string}
|
|
97
|
-
*/
|
|
98
|
-
function logFrom(fromValue, cwd) {
|
|
99
|
-
if (fromValue.startsWith('<')) {
|
|
100
|
-
return underline(fromValue);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
const filePath = relative(cwd, fromValue).split(sep).join('/');
|
|
104
|
-
|
|
105
|
-
return terminalLink(filePath, `file://${fromValue}`);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* @param {{[k: number]: number}} columnWidths
|
|
110
|
-
* @returns {number}
|
|
111
|
-
*/
|
|
112
|
-
function getMessageWidth(columnWidths) {
|
|
113
|
-
const width = columnWidths[3];
|
|
114
|
-
|
|
115
|
-
assertNumber(width);
|
|
116
|
-
|
|
117
|
-
if (!process.stdout.isTTY) {
|
|
118
|
-
return width;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const availableWidth = process.stdout.columns < 80 ? 80 : process.stdout.columns;
|
|
122
|
-
const fullWidth = Object.values(columnWidths).reduce((a, b) => a + b);
|
|
123
|
-
|
|
124
|
-
// If there is no reason to wrap the text, we won't align the last column to the right
|
|
125
|
-
if (availableWidth > fullWidth + MARGIN_WIDTHS) {
|
|
126
|
-
return width;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return availableWidth - (fullWidth - width + MARGIN_WIDTHS);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @param {import('stylelint').Warning[]} messages
|
|
134
|
-
* @param {string} source
|
|
135
|
-
* @param {string} cwd
|
|
136
|
-
* @returns {string}
|
|
137
|
-
*/
|
|
138
|
-
function formatter(messages, source, cwd) {
|
|
139
|
-
if (messages.length === 0) return '';
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Create a list of column widths, needed to calculate
|
|
143
|
-
* the size of the message column and if needed wrap it.
|
|
144
|
-
* @type {{[k: string]: number}}
|
|
145
|
-
*/
|
|
146
|
-
const columnWidths = { 0: 1, 1: 1, 2: 1, 3: 1, 4: 1 };
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* @param {[string, string, string, string, string]} columns
|
|
150
|
-
* @returns {[string, string, string, string, string]}
|
|
151
|
-
*/
|
|
152
|
-
function calculateWidths(columns) {
|
|
153
|
-
for (const [key, value] of Object.entries(columns)) {
|
|
154
|
-
const normalisedValue = value ? value.toString() : value;
|
|
155
|
-
const width = columnWidths[key];
|
|
156
|
-
|
|
157
|
-
assertNumber(width);
|
|
158
|
-
columnWidths[key] = Math.max(width, stringWidth(normalisedValue));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return columns;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
let output = '\n';
|
|
165
|
-
|
|
166
|
-
if (source) {
|
|
167
|
-
output += `${logFrom(source, cwd)}\n`;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @param {import('stylelint').Warning} message
|
|
172
|
-
* @returns {string}
|
|
173
|
-
*/
|
|
174
|
-
function formatMessageText(message) {
|
|
175
|
-
let result = message.text;
|
|
176
|
-
|
|
177
|
-
result = result
|
|
178
|
-
// Remove all control characters (newline, tab and etc)
|
|
179
|
-
.replace(/[\u0001-\u001A]+/g, ' ') // eslint-disable-line no-control-regex
|
|
180
|
-
.replace(/\.$/, '');
|
|
181
|
-
|
|
182
|
-
const ruleString = ` (${message.rule})`;
|
|
183
|
-
|
|
184
|
-
if (result.endsWith(ruleString)) {
|
|
185
|
-
result = result.slice(0, result.lastIndexOf(ruleString));
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return result;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const cleanedMessages = messages.map((message) => {
|
|
192
|
-
const { line, column, severity } = message;
|
|
193
|
-
/**
|
|
194
|
-
* @type {[string, string, string, string, string]}
|
|
195
|
-
*/
|
|
196
|
-
const row = [
|
|
197
|
-
line ? line.toString() : '',
|
|
198
|
-
column ? column.toString() : '',
|
|
199
|
-
symbols[severity] ? levelColors[severity](symbols[severity]) : severity,
|
|
200
|
-
formatMessageText(message),
|
|
201
|
-
dim(message.rule || ''),
|
|
202
|
-
];
|
|
203
|
-
|
|
204
|
-
calculateWidths(row);
|
|
205
|
-
|
|
206
|
-
return row;
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
const messageWidth = getMessageWidth(columnWidths);
|
|
210
|
-
const hasNonAsciiChar = messages.some((msg) => NON_ASCII_PATTERN.test(msg.text));
|
|
211
|
-
|
|
212
|
-
output += table(cleanedMessages, {
|
|
213
|
-
border: getBorderCharacters('void'),
|
|
214
|
-
columns: {
|
|
215
|
-
0: { alignment: 'right', width: columnWidths[0], paddingRight: 0, paddingLeft: 2 },
|
|
216
|
-
1: { alignment: 'left', width: columnWidths[1] },
|
|
217
|
-
2: { alignment: 'center', width: columnWidths[2] },
|
|
218
|
-
3: {
|
|
219
|
-
alignment: 'left',
|
|
220
|
-
width: messageWidth,
|
|
221
|
-
wrapWord: messageWidth > 1 && !hasNonAsciiChar,
|
|
222
|
-
},
|
|
223
|
-
4: { alignment: 'left', width: columnWidths[4], paddingRight: 0 },
|
|
224
|
-
},
|
|
225
|
-
drawHorizontalLine: () => false,
|
|
226
|
-
})
|
|
227
|
-
.split('\n')
|
|
228
|
-
.map((el) => el.replace(/(\d+)\s+(\d+)/, (_m, p1, p2) => dim(`${p1}:${p2}`)).trimEnd())
|
|
229
|
-
.join('\n');
|
|
230
|
-
|
|
231
|
-
return output;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* @type {import('stylelint').Formatter}
|
|
236
|
-
*/
|
|
237
|
-
export default function stringFormatter(results, returnValue) {
|
|
238
|
-
let output = invalidOptionsFormatter(results);
|
|
239
|
-
|
|
240
|
-
output += deprecationsFormatter(results);
|
|
241
|
-
|
|
242
|
-
const resultCounts = { error: 0, warning: 0 };
|
|
243
|
-
const fixableCounts = { error: 0, warning: 0 };
|
|
244
|
-
|
|
245
|
-
output = results.reduce((accum, result) => {
|
|
246
|
-
preprocessWarnings(result);
|
|
247
|
-
|
|
248
|
-
accum += formatter(
|
|
249
|
-
result.warnings,
|
|
250
|
-
result.source || '',
|
|
251
|
-
(returnValue && returnValue.cwd) || process.cwd(),
|
|
252
|
-
);
|
|
253
|
-
|
|
254
|
-
for (const warning of result.warnings) {
|
|
255
|
-
calcSeverityCounts(warning.severity, resultCounts);
|
|
256
|
-
const fixable = returnValue.ruleMetadata?.[warning.rule]?.fixable;
|
|
257
|
-
|
|
258
|
-
if (fixable === true) {
|
|
259
|
-
calcSeverityCounts(warning.severity, fixableCounts);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return accum;
|
|
264
|
-
}, output);
|
|
265
|
-
|
|
266
|
-
// Ensure consistent padding
|
|
267
|
-
output = output.trim();
|
|
268
|
-
|
|
269
|
-
if (output !== '') {
|
|
270
|
-
output = `\n${output}\n`;
|
|
271
|
-
|
|
272
|
-
const errorCount = resultCounts.error;
|
|
273
|
-
const warningCount = resultCounts.warning;
|
|
274
|
-
const total = errorCount + warningCount;
|
|
275
|
-
|
|
276
|
-
if (total > 0) {
|
|
277
|
-
const error = red(`${errorCount} ${pluralize('error', errorCount)}`);
|
|
278
|
-
const warning = yellow(`${warningCount} ${pluralize('warning', warningCount)}`);
|
|
279
|
-
const symbol = errorCount > 0 ? symbols.error : symbols.warning;
|
|
280
|
-
|
|
281
|
-
output += `\n${symbol} ${total} ${pluralize('problem', total)} (${error}, ${warning})`;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
const fixErrorCount = fixableCounts.error;
|
|
285
|
-
const fixWarningCount = fixableCounts.warning;
|
|
286
|
-
|
|
287
|
-
if (fixErrorCount > 0 || fixWarningCount > 0) {
|
|
288
|
-
let fixErrorText;
|
|
289
|
-
let fixWarningText;
|
|
290
|
-
|
|
291
|
-
if (fixErrorCount > 0) {
|
|
292
|
-
fixErrorText = `${fixErrorCount} ${pluralize('error', fixErrorCount)}`;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
if (fixWarningCount > 0) {
|
|
296
|
-
fixWarningText = `${fixWarningCount} ${pluralize('warning', fixWarningCount)}`;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
const countText = [fixErrorText, fixWarningText].filter(Boolean).join(' and ');
|
|
300
|
-
|
|
301
|
-
output += `\n ${countText} potentially fixable with the "--fix" option.`;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
output += '\n\n';
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
return output;
|
|
308
|
-
}
|