linter-bundle 5.1.0 → 6.1.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/.linter-bundle.js +2 -0
- package/CHANGELOG.md +83 -9
- package/README.md +5 -3
- package/TODO.md +5 -0
- package/eslint/index.cjs +10 -4
- package/eslint/overrides-javascript.cjs +7 -1
- package/eslint/overrides-jest.cjs +1 -0
- package/eslint/overrides-jsdoc.cjs +1 -0
- package/eslint/rules/no-global-undefined-check.js +5 -3
- package/eslint/rules/no-unnecessary-typeof.js +26 -24
- package/eslint/rules/restricted-filenames.js +3 -1
- package/helper/ensure-type.cjs +2 -2
- package/helper/get-git-files.js +1 -1
- package/helper/get-outdated-dependencies.js +1 -1
- package/helper/get-outdated-overrides.js +1 -1
- package/helper/get-stylelint-path.js +1 -1
- package/helper/is-npm-or-yarn.js +1 -1
- package/helper/linter-bundle-config.js +22 -7
- package/helper/run-process.js +3 -3
- package/lint.js +31 -35
- package/package.json +27 -26
- package/stylelint/index.cjs +90 -5
- package/stylelint/plugins/stylelint-15.11.0-stylistic/LICENSE +20 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/LICENSE +9 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/html-tags/index.cjs +122 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/reference/selectors.cjs +327 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/README.md +110 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-case/index.cjs +66 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/README.md +117 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-name-space-after/index.cjs +55 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/README.md +63 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-newline-after/index.cjs +87 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/README.md +50 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/at-rule-semicolon-space-before/index.cjs +70 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/atRuleNameSpaceChecker.cjs +56 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/README.md +238 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-empty-line-before/index.cjs +130 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/README.md +196 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-after/index.cjs +154 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/README.md +93 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-newline-before/index.cjs +133 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/README.md +174 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-closing-brace-space-before/index.cjs +111 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/README.md +138 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-newline-after/index.cjs +184 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/README.md +191 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-after/index.cjs +118 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/README.md +218 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/block-opening-brace-space-before/index.cjs +141 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/README.md +58 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/color-hex-case/index.cjs +95 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/README.md +72 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-after/index.cjs +95 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/README.md +67 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-bang-space-before/index.cjs +96 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/README.md +141 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-after/index.cjs +109 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/README.md +120 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-newline-before/index.cjs +75 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/README.md +147 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-after/index.cjs +97 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/README.md +130 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-semicolon-space-before/index.cjs +106 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/README.md +108 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-block-trailing-semicolon/index.cjs +147 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/README.md +78 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-newline-after/index.cjs +99 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/README.md +111 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-after/index.cjs +75 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/README.md +72 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declaration-colon-space-before/index.cjs +74 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationBangSpaceChecker.cjs +63 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/declarationColonSpaceChecker.cjs +58 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/findMediaOperator.cjs +32 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/README.md +113 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-after/index.cjs +61 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/README.md +129 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-newline-before/index.cjs +61 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/README.md +144 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-after/index.cjs +62 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/README.md +144 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-comma-space-before/index.cjs +62 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/README.md +78 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-max-empty-lines/index.cjs +115 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/README.md +144 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-newline-inside/index.cjs +282 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/README.md +140 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-parentheses-space-inside/index.cjs +182 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/README.md +80 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/function-whitespace-after/index.cjs +198 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceChecker.cjs +125 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/functionCommaSpaceFix.cjs +51 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/README.md +339 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/indentation/index.cjs +743 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/README.md +21 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/linebreaks/index.cjs +132 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/README.md +116 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-empty-lines/index.cjs +225 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/README.md +151 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/max-line-length/index.cjs +200 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/README.md +72 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-after/index.cjs +91 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/README.md +72 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-colon-space-before/index.cjs +91 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/README.md +108 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-name-case/index.cjs +93 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/README.md +62 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-parentheses-space-inside/index.cjs +112 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/README.md +72 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-after/index.cjs +109 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/README.md +72 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-feature-range-operator-space-before/index.cjs +109 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/README.md +113 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-after/index.cjs +97 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/README.md +111 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-newline-before/index.cjs +49 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/README.md +136 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-after/index.cjs +93 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/README.md +136 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/media-query-list-comma-space-before/index.cjs +93 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaFeatureColonSpaceChecker.cjs +54 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/mediaQueryListCommaWhitespaceChecker.cjs +73 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/README.md +34 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-empty-first-line/index.cjs +63 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/README.md +79 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-eol-whitespace/index.cjs +302 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/README.md +78 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-extra-semicolons/index.cjs +246 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/README.md +34 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/no-missing-end-of-source-newline/index.cjs +62 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/README.md +74 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/index.cjs +197 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/README.md +40 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/index.cjs +139 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/README.md +192 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/property-case/index.cjs +95 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/README.md +112 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-brackets-space-inside/index.cjs +214 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/README.md +162 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-after/index.cjs +109 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/README.md +162 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-attribute-operator-space-before/index.cjs +88 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/README.md +78 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-after/index.cjs +67 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/README.md +78 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-combinator-space-before/index.cjs +67 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/README.md +40 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-descendant-combinator-no-non-space/index.cjs +95 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/README.md +120 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-after/index.cjs +126 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/README.md +112 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-newline-before/index.cjs +101 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/README.md +110 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-after/index.cjs +92 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/README.md +110 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-list-comma-space-before/index.cjs +92 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/README.md +103 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-max-empty-lines/index.cjs +74 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/README.md +108 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-case/index.cjs +104 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/README.md +62 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-class-parentheses-space-inside/index.cjs +162 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/README.md +128 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selector-pseudo-element-case/index.cjs +90 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorAttributeOperatorSpaceChecker.cjs +95 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorCombinatorSpaceChecker.cjs +113 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/selectorListCommaWhitespaceChecker.cjs +64 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/README.md +130 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/index.cjs +256 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/README.md +41 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/index.cjs +67 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/README.md +126 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unit-case/index.cjs +133 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/README.md +102 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-after/index.cjs +107 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/README.md +100 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-newline-before/index.cjs +49 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/README.md +136 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-after/index.cjs +94 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/README.md +136 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-comma-space-before/index.cjs +94 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/README.md +121 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/value-list-max-empty-lines/index.cjs +68 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/valueListCommaWhitespaceChecker.cjs +74 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/LICENSE +13 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/style-search/index.cjs +216 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/addEmptyLineAfter.cjs +30 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/hasEmptyBlock.cjs +14 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/nextNonCommentNode.cjs +21 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/removeEmptyLinesAfter.cjs +16 -0
- package/stylelint/plugins/stylelint-15.11.0-stylistic/utils/whitespaceChecker.cjs +361 -0
- package/stylelint/plugins/stylelint-selector-no-empty.js +8 -8
- package/stylelint/plugins/stylelint-selector-tag-no-without-class.js +4 -4
- package/stylelint/plugins/stylelint-high-performance-animation.js +0 -276
- package/stylelint/plugins/stylelint-stylistic.js +0 -188
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# string-quotes
|
|
2
|
+
|
|
3
|
+
Specify single or double quotes around strings.
|
|
4
|
+
|
|
5
|
+
<!-- prettier-ignore -->
|
|
6
|
+
```css
|
|
7
|
+
a[id="foo"] { content: "x"; }
|
|
8
|
+
/** ↑ ↑ ↑ ↑
|
|
9
|
+
* These quotes and these quotes */
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Quotes within comments are ignored.
|
|
13
|
+
|
|
14
|
+
<!-- prettier-ignore -->
|
|
15
|
+
```css
|
|
16
|
+
/* "This is fine" */
|
|
17
|
+
/* 'And this is also fine' */
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Single quotes in a charset @-rule are ignored as using single quotes in this context is incorrect according the [CSS specification](https://www.w3.org/TR/CSS2/syndata.html#x57).
|
|
21
|
+
|
|
22
|
+
<!-- prettier-ignore -->
|
|
23
|
+
```css
|
|
24
|
+
@charset "utf-8"
|
|
25
|
+
/* fine regardless of configuration */
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The [`fix` option](https://stylelint.io/user-guide/options/#fix) can automatically fix most of the problems reported by this rule.
|
|
29
|
+
|
|
30
|
+
## Options
|
|
31
|
+
|
|
32
|
+
`string`: `"single"|"double"`
|
|
33
|
+
|
|
34
|
+
### `"single"`
|
|
35
|
+
|
|
36
|
+
Strings _must always_ be wrapped with single quotes.
|
|
37
|
+
|
|
38
|
+
The following patterns are considered problems:
|
|
39
|
+
|
|
40
|
+
<!-- prettier-ignore -->
|
|
41
|
+
```css
|
|
42
|
+
a { content: "x"; }
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
<!-- prettier-ignore -->
|
|
46
|
+
```css
|
|
47
|
+
a[id="foo"] {}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The following patterns are _not_ considered problems:
|
|
51
|
+
|
|
52
|
+
<!-- prettier-ignore -->
|
|
53
|
+
```css
|
|
54
|
+
a { content: 'x'; }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
<!-- prettier-ignore -->
|
|
58
|
+
```css
|
|
59
|
+
a[id='foo'] {}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
<!-- prettier-ignore -->
|
|
63
|
+
```css
|
|
64
|
+
a { content: "x'y'z"; }
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `"double"`
|
|
68
|
+
|
|
69
|
+
Strings _must always_ be wrapped with double quotes.
|
|
70
|
+
|
|
71
|
+
The following patterns are considered problems:
|
|
72
|
+
|
|
73
|
+
<!-- prettier-ignore -->
|
|
74
|
+
```css
|
|
75
|
+
a { content: 'x'; }
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
<!-- prettier-ignore -->
|
|
79
|
+
```css
|
|
80
|
+
a[id='foo'] {}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The following patterns are _not_ considered problems:
|
|
84
|
+
|
|
85
|
+
<!-- prettier-ignore -->
|
|
86
|
+
```css
|
|
87
|
+
a { content: "x"; }
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
<!-- prettier-ignore -->
|
|
91
|
+
```css
|
|
92
|
+
a[id="foo"] {}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
<!-- prettier-ignore -->
|
|
96
|
+
```css
|
|
97
|
+
a { content: 'x"y"z'; }
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Optional secondary options
|
|
101
|
+
|
|
102
|
+
### `avoidEscape`: `true|false`, defaults to `true`
|
|
103
|
+
|
|
104
|
+
Allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise.
|
|
105
|
+
|
|
106
|
+
For example, with `"single", { "avoidEscape" : false }`.
|
|
107
|
+
|
|
108
|
+
The following patterns are considered problems:
|
|
109
|
+
|
|
110
|
+
<!-- prettier-ignore -->
|
|
111
|
+
```css
|
|
112
|
+
a { content: "x'y'z"; }
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
<!-- prettier-ignore -->
|
|
116
|
+
```css
|
|
117
|
+
a[id="foo'bar'baz"] {}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The following patterns are _not_ considered problems:
|
|
121
|
+
|
|
122
|
+
<!-- prettier-ignore -->
|
|
123
|
+
```css
|
|
124
|
+
a { content: 'x'; }
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
<!-- prettier-ignore -->
|
|
128
|
+
```css
|
|
129
|
+
a[id='foo'] {}
|
|
130
|
+
```
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/* eslint-disable -- We want to keep as much of the original code as possible */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
|
|
4
|
+
const valueParser = require('postcss-value-parser');
|
|
5
|
+
const stylelint = require('stylelint');
|
|
6
|
+
const atRuleParamIndex = require('stylelint/lib/utils/atRuleParamIndex.cjs');
|
|
7
|
+
const declarationValueIndex = require('stylelint/lib/utils/declarationValueIndex.cjs');
|
|
8
|
+
const isStandardSyntaxRule = require('stylelint/lib/utils/isStandardSyntaxRule.cjs');
|
|
9
|
+
const parseSelector = require('stylelint/lib/utils/parseSelector.cjs');
|
|
10
|
+
const report = require('stylelint/lib/utils/report.cjs');
|
|
11
|
+
const ruleMessages = require('stylelint/lib/utils/ruleMessages.cjs');
|
|
12
|
+
const { isAtRule } = require('stylelint/lib/utils/typeGuards.cjs');
|
|
13
|
+
const validateOptions = require('stylelint/lib/utils/validateOptions.cjs');
|
|
14
|
+
const { isBoolean, assertString } = require('stylelint/lib/utils/validateTypes.cjs');
|
|
15
|
+
|
|
16
|
+
const ruleName = 'plugin/string-quotes';
|
|
17
|
+
|
|
18
|
+
const messages = ruleMessages(ruleName, {
|
|
19
|
+
expected: (q) => `Expected ${q} quotes`
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const meta = {
|
|
23
|
+
url: 'https://github.com/jens-duttke/linter-bundle/blob/main/stylelint/plugins/stylelint-15.11.0-stylistic/rules/string-quotes/README.md',
|
|
24
|
+
fixable: true
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const singleQuote = '\'';
|
|
28
|
+
const doubleQuote = '"';
|
|
29
|
+
|
|
30
|
+
/** @type {import('stylelint').Rule} */
|
|
31
|
+
const rule = (primary, secondaryOptions, context) => {
|
|
32
|
+
const correctQuote = primary === 'single' ? singleQuote : doubleQuote;
|
|
33
|
+
const erroneousQuote = primary === 'single' ? doubleQuote : singleQuote;
|
|
34
|
+
|
|
35
|
+
return (root, result) => {
|
|
36
|
+
const validOptions = validateOptions(
|
|
37
|
+
result,
|
|
38
|
+
ruleName,
|
|
39
|
+
{
|
|
40
|
+
actual: primary,
|
|
41
|
+
possible: ['single', 'double']
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
actual: secondaryOptions,
|
|
45
|
+
possible: {
|
|
46
|
+
avoidEscape: [isBoolean]
|
|
47
|
+
},
|
|
48
|
+
optional: true
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
if (!validOptions) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const avoidEscape =
|
|
57
|
+
secondaryOptions && secondaryOptions.avoidEscape !== undefined ?
|
|
58
|
+
secondaryOptions.avoidEscape
|
|
59
|
+
: true;
|
|
60
|
+
|
|
61
|
+
root.walk((node) => {
|
|
62
|
+
switch (node.type) {
|
|
63
|
+
case 'atrule':
|
|
64
|
+
checkDeclOrAtRule(node, node.params, atRuleParamIndex);
|
|
65
|
+
break;
|
|
66
|
+
case 'decl':
|
|
67
|
+
checkDeclOrAtRule(node, node.value, declarationValueIndex);
|
|
68
|
+
break;
|
|
69
|
+
case 'rule':
|
|
70
|
+
checkRule(node);
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @param {import('postcss').Rule} ruleNode
|
|
77
|
+
* @returns {void}
|
|
78
|
+
*/
|
|
79
|
+
function checkRule (ruleNode) {
|
|
80
|
+
if (!isStandardSyntaxRule(ruleNode)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (!ruleNode.selector.includes('[') || !ruleNode.selector.includes('=')) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** @type {number[]} */
|
|
89
|
+
const fixPositions = [];
|
|
90
|
+
|
|
91
|
+
parseSelector(ruleNode.selector, result, ruleNode, (selectorTree) => {
|
|
92
|
+
let selectorFixed = false;
|
|
93
|
+
|
|
94
|
+
selectorTree.walkAttributes((attributeNode) => {
|
|
95
|
+
if (!attributeNode.quoted) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (attributeNode.quoteMark === correctQuote && avoidEscape) {
|
|
100
|
+
assertString(attributeNode.value);
|
|
101
|
+
const needsCorrectEscape = attributeNode.value.includes(correctQuote);
|
|
102
|
+
const needsOtherEscape = attributeNode.value.includes(erroneousQuote);
|
|
103
|
+
|
|
104
|
+
if (needsOtherEscape) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (needsCorrectEscape) {
|
|
109
|
+
if (context.fix) {
|
|
110
|
+
selectorFixed = true;
|
|
111
|
+
attributeNode.quoteMark = erroneousQuote;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
report({
|
|
115
|
+
message: messages.expected(primary === 'single' ? 'double' : primary),
|
|
116
|
+
node: ruleNode,
|
|
117
|
+
index: attributeNode.sourceIndex + attributeNode.offsetOf('value'),
|
|
118
|
+
result,
|
|
119
|
+
ruleName
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (attributeNode.quoteMark === erroneousQuote) {
|
|
126
|
+
if (avoidEscape) {
|
|
127
|
+
assertString(attributeNode.value);
|
|
128
|
+
const needsCorrectEscape = attributeNode.value.includes(correctQuote);
|
|
129
|
+
const needsOtherEscape = attributeNode.value.includes(erroneousQuote);
|
|
130
|
+
|
|
131
|
+
if (needsOtherEscape) {
|
|
132
|
+
if (context.fix) {
|
|
133
|
+
selectorFixed = true;
|
|
134
|
+
attributeNode.quoteMark = correctQuote;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
report({
|
|
138
|
+
message: messages.expected(primary),
|
|
139
|
+
node: ruleNode,
|
|
140
|
+
index: attributeNode.sourceIndex + attributeNode.offsetOf('value'),
|
|
141
|
+
result,
|
|
142
|
+
ruleName
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (needsCorrectEscape) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (context.fix) {
|
|
155
|
+
selectorFixed = true;
|
|
156
|
+
attributeNode.quoteMark = correctQuote;
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
report({
|
|
160
|
+
message: messages.expected(primary),
|
|
161
|
+
node: ruleNode,
|
|
162
|
+
index: attributeNode.sourceIndex + attributeNode.offsetOf('value'),
|
|
163
|
+
result,
|
|
164
|
+
ruleName
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
if (selectorFixed) {
|
|
171
|
+
ruleNode.selector = selectorTree.toString();
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
for (const fixIndex of fixPositions) {
|
|
176
|
+
ruleNode.selector = replaceQuote(ruleNode.selector, fixIndex, correctQuote);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @template {import('postcss').AtRule | import('postcss').Declaration} T
|
|
182
|
+
* @param {T} node
|
|
183
|
+
* @param {string} value
|
|
184
|
+
* @param {(node: T) => number} getIndex
|
|
185
|
+
* @returns {void}
|
|
186
|
+
*/
|
|
187
|
+
function checkDeclOrAtRule (node, value, getIndex) {
|
|
188
|
+
/** @type {number[]} */
|
|
189
|
+
const fixPositions = [];
|
|
190
|
+
|
|
191
|
+
// Get out quickly if there are no erroneous quotes
|
|
192
|
+
if (!value.includes(erroneousQuote)) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (isAtRule(node) && node.name === 'charset') {
|
|
197
|
+
// allow @charset rules to have double quotes, in spite of the configuration
|
|
198
|
+
// TODO: @charset should always use double-quotes, see https://github.com/stylelint/stylelint/issues/2788
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
valueParser(value).walk((valueNode) => {
|
|
203
|
+
if (valueNode.type === 'string' && valueNode.quote === erroneousQuote) {
|
|
204
|
+
const needsEscape = valueNode.value.includes(correctQuote);
|
|
205
|
+
|
|
206
|
+
if (avoidEscape && needsEscape) {
|
|
207
|
+
// don't consider this an error
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const openIndex = valueNode.sourceIndex;
|
|
212
|
+
|
|
213
|
+
// we currently don't fix escapes
|
|
214
|
+
if (context.fix && !needsEscape) {
|
|
215
|
+
const closeIndex = openIndex + valueNode.value.length + erroneousQuote.length;
|
|
216
|
+
|
|
217
|
+
fixPositions.push(openIndex, closeIndex);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
report({
|
|
221
|
+
message: messages.expected(primary),
|
|
222
|
+
node,
|
|
223
|
+
index: getIndex(node) + openIndex,
|
|
224
|
+
result,
|
|
225
|
+
ruleName
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
for (const fixIndex of fixPositions) {
|
|
232
|
+
if (isAtRule(node)) {
|
|
233
|
+
node.params = replaceQuote(node.params, fixIndex, correctQuote);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
node.value = replaceQuote(node.value, fixIndex, correctQuote);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @param {string} string
|
|
245
|
+
* @param {number} index
|
|
246
|
+
* @param {string} replace
|
|
247
|
+
* @returns {string}
|
|
248
|
+
*/
|
|
249
|
+
function replaceQuote (string, index, replace) {
|
|
250
|
+
return string.substring(0, index) + replace + string.substring(index + replace.length);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
rule.ruleName = ruleName;
|
|
254
|
+
rule.messages = messages;
|
|
255
|
+
rule.meta = meta;
|
|
256
|
+
module.exports = stylelint.createPlugin(ruleName, rule);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# unicode-bom
|
|
2
|
+
|
|
3
|
+
Require or disallow the Unicode Byte Order Mark.
|
|
4
|
+
|
|
5
|
+
## Options
|
|
6
|
+
|
|
7
|
+
`string`: `"always"|"never"`
|
|
8
|
+
|
|
9
|
+
### `"always"`
|
|
10
|
+
|
|
11
|
+
The following pattern is considered a problem:
|
|
12
|
+
|
|
13
|
+
<!-- prettier-ignore -->
|
|
14
|
+
```css
|
|
15
|
+
a {}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The following pattern is _not_ considered a problem:
|
|
19
|
+
|
|
20
|
+
<!-- prettier-ignore -->
|
|
21
|
+
```css
|
|
22
|
+
U+FEFF
|
|
23
|
+
a {}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### `"never"`
|
|
27
|
+
|
|
28
|
+
The following pattern is considered a problem:
|
|
29
|
+
|
|
30
|
+
<!-- prettier-ignore -->
|
|
31
|
+
```css
|
|
32
|
+
U+FEFF
|
|
33
|
+
a {}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The following pattern is _not_ considered a problem:
|
|
37
|
+
|
|
38
|
+
<!-- prettier-ignore -->
|
|
39
|
+
```css
|
|
40
|
+
a {}
|
|
41
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* eslint-disable -- We want to keep as much of the original code as possible */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
|
|
4
|
+
const stylelint = require('stylelint');
|
|
5
|
+
const report = require('stylelint/lib/utils/report.cjs');
|
|
6
|
+
const ruleMessages = require('stylelint/lib/utils/ruleMessages.cjs');
|
|
7
|
+
const validateOptions = require('stylelint/lib/utils/validateOptions.cjs');
|
|
8
|
+
|
|
9
|
+
const ruleName = 'plugin/unicode-bom';
|
|
10
|
+
|
|
11
|
+
const messages = ruleMessages(ruleName, {
|
|
12
|
+
expected: 'Expected Unicode BOM',
|
|
13
|
+
rejected: 'Unexpected Unicode BOM'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const meta = {
|
|
17
|
+
url: 'https://github.com/jens-duttke/linter-bundle/blob/main/stylelint/plugins/stylelint-15.11.0-stylistic/rules/unicode-bom/README.md'
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @type {import('stylelint').Rule} */
|
|
21
|
+
const rule = (primary) => (root, result) => {
|
|
22
|
+
const validOptions = validateOptions(result, ruleName, {
|
|
23
|
+
actual: primary,
|
|
24
|
+
possible: ['always', 'never']
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
if (
|
|
28
|
+
!validOptions ||
|
|
29
|
+
!root.source ||
|
|
30
|
+
// @ts-expect-error -- TS2339: Property 'inline' does not exist on type 'Source'.
|
|
31
|
+
root.source.inline ||
|
|
32
|
+
// @ts-expect-error -- TS2339: Property 'lang' does not exist on type 'Source'.
|
|
33
|
+
root.source.lang === 'object-literal' ||
|
|
34
|
+
// Ignore HTML documents
|
|
35
|
+
// @ts-expect-error -- TS2339: Property 'document' does not exist on type 'Root'.
|
|
36
|
+
root.document !== undefined
|
|
37
|
+
) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const { hasBOM } = root.source.input;
|
|
42
|
+
|
|
43
|
+
if (primary === 'always' && !hasBOM) {
|
|
44
|
+
report({
|
|
45
|
+
result,
|
|
46
|
+
ruleName,
|
|
47
|
+
message: messages.expected,
|
|
48
|
+
node: root,
|
|
49
|
+
line: 1
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (primary === 'never' && hasBOM) {
|
|
54
|
+
report({
|
|
55
|
+
result,
|
|
56
|
+
ruleName,
|
|
57
|
+
message: messages.rejected,
|
|
58
|
+
node: root,
|
|
59
|
+
line: 1
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
rule.ruleName = ruleName;
|
|
65
|
+
rule.messages = messages;
|
|
66
|
+
rule.meta = meta;
|
|
67
|
+
module.exports = stylelint.createPlugin(ruleName, rule);
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# unit-case
|
|
2
|
+
|
|
3
|
+
Specify lowercase or uppercase for units.
|
|
4
|
+
|
|
5
|
+
<!-- prettier-ignore -->
|
|
6
|
+
```css
|
|
7
|
+
a { width: 10px; }
|
|
8
|
+
/** ↑
|
|
9
|
+
* These units */
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The [`fix` option](https://stylelint.io/user-guide/options/#fix) can automatically fix most of the problems reported by this rule.
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
`string`: `"lower"|"upper"`
|
|
17
|
+
|
|
18
|
+
### `"lower"`
|
|
19
|
+
|
|
20
|
+
The following patterns are considered problems:
|
|
21
|
+
|
|
22
|
+
<!-- prettier-ignore -->
|
|
23
|
+
```css
|
|
24
|
+
a {
|
|
25
|
+
width: 10PX;
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<!-- prettier-ignore -->
|
|
30
|
+
```css
|
|
31
|
+
a {
|
|
32
|
+
width: 10Px;
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
<!-- prettier-ignore -->
|
|
37
|
+
```css
|
|
38
|
+
a {
|
|
39
|
+
width: 10pX;
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
<!-- prettier-ignore -->
|
|
44
|
+
```css
|
|
45
|
+
a {
|
|
46
|
+
width: 10PIXEL;
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
<!-- prettier-ignore -->
|
|
51
|
+
```css
|
|
52
|
+
a {
|
|
53
|
+
width: calc(10PX * 2);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The following patterns are _not_ considered problems:
|
|
58
|
+
|
|
59
|
+
<!-- prettier-ignore -->
|
|
60
|
+
```css
|
|
61
|
+
a {
|
|
62
|
+
width: 10px;
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
<!-- prettier-ignore -->
|
|
67
|
+
```css
|
|
68
|
+
a {
|
|
69
|
+
width: calc(10px * 2);
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### `"upper"`
|
|
74
|
+
|
|
75
|
+
The following patterns are considered problems:
|
|
76
|
+
|
|
77
|
+
<!-- prettier-ignore -->
|
|
78
|
+
```css
|
|
79
|
+
a {
|
|
80
|
+
width: 10px;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
<!-- prettier-ignore -->
|
|
85
|
+
```css
|
|
86
|
+
a {
|
|
87
|
+
width: 10Px;
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
<!-- prettier-ignore -->
|
|
92
|
+
```css
|
|
93
|
+
a {
|
|
94
|
+
width: 10pX;
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
<!-- prettier-ignore -->
|
|
99
|
+
```css
|
|
100
|
+
a {
|
|
101
|
+
width: 10pixel;
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
<!-- prettier-ignore -->
|
|
106
|
+
```css
|
|
107
|
+
a {
|
|
108
|
+
width: calc(10px * 2);
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The following patterns are _not_ considered problems:
|
|
113
|
+
|
|
114
|
+
<!-- prettier-ignore -->
|
|
115
|
+
```css
|
|
116
|
+
a {
|
|
117
|
+
width: 10PX;
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
<!-- prettier-ignore -->
|
|
122
|
+
```css
|
|
123
|
+
a {
|
|
124
|
+
width: calc(10PX * 2);
|
|
125
|
+
}
|
|
126
|
+
```
|