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,74 @@
|
|
|
1
|
+
# number-leading-zero
|
|
2
|
+
|
|
3
|
+
Require or disallow a leading zero for fractional numbers less than 1.
|
|
4
|
+
|
|
5
|
+
<!-- prettier-ignore -->
|
|
6
|
+
```css
|
|
7
|
+
a { line-height: 0.5; }
|
|
8
|
+
/** ↑
|
|
9
|
+
* This leading zero */
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
This rule ignores mixin parameters in Less.
|
|
13
|
+
|
|
14
|
+
The [`fix` option](https://stylelint.io/user-guide/options/#fix) can automatically fix all of the problems reported by this rule.
|
|
15
|
+
|
|
16
|
+
## Options
|
|
17
|
+
|
|
18
|
+
`string`: `"always"|"never"`
|
|
19
|
+
|
|
20
|
+
### `"always"`
|
|
21
|
+
|
|
22
|
+
There _must always_ be a leading zero.
|
|
23
|
+
|
|
24
|
+
The following patterns are considered problems:
|
|
25
|
+
|
|
26
|
+
<!-- prettier-ignore -->
|
|
27
|
+
```css
|
|
28
|
+
a { line-height: .5; }
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
<!-- prettier-ignore -->
|
|
32
|
+
```css
|
|
33
|
+
a { transform: translate(2px, .4px); }
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The following patterns are _not_ considered problems:
|
|
37
|
+
|
|
38
|
+
<!-- prettier-ignore -->
|
|
39
|
+
```css
|
|
40
|
+
a { line-height: 0.5; }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
<!-- prettier-ignore -->
|
|
44
|
+
```css
|
|
45
|
+
a { transform: translate(2px, 0.4px); }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### `"never"`
|
|
49
|
+
|
|
50
|
+
There _must never_ be a leading zero.
|
|
51
|
+
|
|
52
|
+
The following patterns are considered problems:
|
|
53
|
+
|
|
54
|
+
<!-- prettier-ignore -->
|
|
55
|
+
```css
|
|
56
|
+
a { line-height: 0.5; }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
<!-- prettier-ignore -->
|
|
60
|
+
```css
|
|
61
|
+
a { transform: translate(2px, 0.4px); }
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The following patterns are _not_ considered problems:
|
|
65
|
+
|
|
66
|
+
<!-- prettier-ignore -->
|
|
67
|
+
```css
|
|
68
|
+
a { line-height: .5; }
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
<!-- prettier-ignore -->
|
|
72
|
+
```css
|
|
73
|
+
a { transform: translate(2px, .4px); }
|
|
74
|
+
```
|
|
@@ -0,0 +1,197 @@
|
|
|
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 report = require('stylelint/lib/utils/report.cjs');
|
|
9
|
+
const ruleMessages = require('stylelint/lib/utils/ruleMessages.cjs');
|
|
10
|
+
const { isAtRule } = require('stylelint/lib/utils/typeGuards.cjs');
|
|
11
|
+
const validateOptions = require('stylelint/lib/utils/validateOptions.cjs');
|
|
12
|
+
|
|
13
|
+
const ruleName = 'plugin/number-leading-zero';
|
|
14
|
+
|
|
15
|
+
const messages = ruleMessages(ruleName, {
|
|
16
|
+
expected: 'Expected a leading zero',
|
|
17
|
+
rejected: 'Unexpected leading zero'
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const meta = {
|
|
21
|
+
url: 'https://github.com/jens-duttke/linter-bundle/blob/main/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-leading-zero/README.md',
|
|
22
|
+
fixable: true
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @type {import('stylelint').Rule} */
|
|
26
|
+
const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
27
|
+
const validOptions = validateOptions(result, ruleName, {
|
|
28
|
+
actual: primary,
|
|
29
|
+
possible: ['always', 'never']
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if (!validOptions) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
root.walkAtRules((atRule) => {
|
|
37
|
+
if (atRule.name.toLowerCase() === 'import') {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
check(atRule, atRule.params);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
root.walkDecls((decl) => check(decl, decl.value));
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @param {import('postcss').AtRule | import('postcss').Declaration} node
|
|
48
|
+
* @param {string} value
|
|
49
|
+
*/
|
|
50
|
+
function check (node, value) {
|
|
51
|
+
/** @type {Array<{ startIndex: number, endIndex: number }>} */
|
|
52
|
+
const neverFixPositions = [];
|
|
53
|
+
/** @type {Array<{ index: number }>} */
|
|
54
|
+
const alwaysFixPositions = [];
|
|
55
|
+
|
|
56
|
+
// Get out quickly if there are no periods
|
|
57
|
+
if (!value.includes('.')) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
valueParser(value).walk((valueNode) => {
|
|
62
|
+
// Ignore `url` function
|
|
63
|
+
if (valueNode.type === 'function' && valueNode.value.toLowerCase() === 'url') {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Ignore strings, comments, etc
|
|
68
|
+
if (valueNode.type !== 'word') {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Check leading zero
|
|
73
|
+
if (primary === 'always') {
|
|
74
|
+
const match = (/(?:\D|^)(\.\d+)/).exec(valueNode.value);
|
|
75
|
+
|
|
76
|
+
if (match?.[0] == null || match[1] == null) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// The regexp above consists of 2 capturing groups (or capturing parentheses).
|
|
81
|
+
// We need the index of the second group. This makes sanse when we have "-.5" as an input
|
|
82
|
+
// for regex. And we need the index of ".5".
|
|
83
|
+
const capturingGroupIndex = match[0].length - match[1].length;
|
|
84
|
+
|
|
85
|
+
const index = valueNode.sourceIndex + match.index + capturingGroupIndex;
|
|
86
|
+
|
|
87
|
+
if (context.fix) {
|
|
88
|
+
alwaysFixPositions.unshift({
|
|
89
|
+
index
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const baseIndex = isAtRule(node) ? atRuleParamIndex(node) : declarationValueIndex(node);
|
|
96
|
+
|
|
97
|
+
complain(messages.expected, node, baseIndex + index);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (primary === 'never') {
|
|
101
|
+
const match = (/(?:\D|^)(0+)(\.\d+)/).exec(valueNode.value);
|
|
102
|
+
|
|
103
|
+
if (match?.[0] == null || match[1] == null || match[2] == null) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// The regexp above consists of 3 capturing groups (or capturing parentheses).
|
|
108
|
+
// We need the index of the second group. This makes sanse when we have "-00.5"
|
|
109
|
+
// as an input for regex. And we need the index of "00".
|
|
110
|
+
const capturingGroupIndex = match[0].length - (match[1].length + match[2].length);
|
|
111
|
+
|
|
112
|
+
const index = valueNode.sourceIndex + match.index + capturingGroupIndex;
|
|
113
|
+
|
|
114
|
+
if (context.fix) {
|
|
115
|
+
neverFixPositions.unshift({
|
|
116
|
+
startIndex: index,
|
|
117
|
+
// match[1].length is the length of our matched zero(s)
|
|
118
|
+
endIndex: index + match[1].length
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const baseIndex = isAtRule(node) ? atRuleParamIndex(node) : declarationValueIndex(node);
|
|
125
|
+
|
|
126
|
+
complain(messages.rejected, node, baseIndex + index);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
if (alwaysFixPositions.length > 0) {
|
|
131
|
+
for (const fixPosition of alwaysFixPositions) {
|
|
132
|
+
const index = fixPosition.index;
|
|
133
|
+
|
|
134
|
+
if (isAtRule(node)) {
|
|
135
|
+
node.params = addLeadingZero(node.params, index);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
node.value = addLeadingZero(node.value, index);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (neverFixPositions.length > 0) {
|
|
144
|
+
for (const fixPosition of neverFixPositions) {
|
|
145
|
+
const startIndex = fixPosition.startIndex;
|
|
146
|
+
const endIndex = fixPosition.endIndex;
|
|
147
|
+
|
|
148
|
+
if (isAtRule(node)) {
|
|
149
|
+
node.params = removeLeadingZeros(node.params, startIndex, endIndex);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
node.value = removeLeadingZeros(node.value, startIndex, endIndex);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @param {string} message
|
|
160
|
+
* @param {import('postcss').Node} node
|
|
161
|
+
* @param {number} index
|
|
162
|
+
*/
|
|
163
|
+
function complain (message, node, index) {
|
|
164
|
+
report({
|
|
165
|
+
result,
|
|
166
|
+
ruleName,
|
|
167
|
+
message,
|
|
168
|
+
node,
|
|
169
|
+
index
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @param {string} input
|
|
176
|
+
* @param {number} index
|
|
177
|
+
* @returns {string}
|
|
178
|
+
*/
|
|
179
|
+
function addLeadingZero (input, index) {
|
|
180
|
+
|
|
181
|
+
return input.slice(0, index) + '0' + input.slice(index);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @param {string} input
|
|
186
|
+
* @param {number} startIndex
|
|
187
|
+
* @param {number} endIndex
|
|
188
|
+
* @returns {string}
|
|
189
|
+
*/
|
|
190
|
+
function removeLeadingZeros (input, startIndex, endIndex) {
|
|
191
|
+
return input.slice(0, startIndex) + input.slice(endIndex);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
rule.ruleName = ruleName;
|
|
195
|
+
rule.messages = messages;
|
|
196
|
+
rule.meta = meta;
|
|
197
|
+
module.exports = stylelint.createPlugin(ruleName, rule);
|
package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# number-no-trailing-zeros
|
|
2
|
+
|
|
3
|
+
Disallow trailing zeros in numbers.
|
|
4
|
+
|
|
5
|
+
<!-- prettier-ignore -->
|
|
6
|
+
```css
|
|
7
|
+
a { top: 0.5000px; bottom: 1.0px; }
|
|
8
|
+
/** ↑ ↑
|
|
9
|
+
* These trailing zeros */
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The [`fix` option](https://stylelint.io/user-guide/options/#fix) can automatically fix some of the problems reported by this rule.
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
### `true`
|
|
17
|
+
|
|
18
|
+
The following patterns are considered problems:
|
|
19
|
+
|
|
20
|
+
<!-- prettier-ignore -->
|
|
21
|
+
```css
|
|
22
|
+
a { top: 1.0px }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<!-- prettier-ignore -->
|
|
26
|
+
```css
|
|
27
|
+
a { top: 1.01000px }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The following patterns are _not_ considered problems:
|
|
31
|
+
|
|
32
|
+
<!-- prettier-ignore -->
|
|
33
|
+
```css
|
|
34
|
+
a { top: 1px }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
<!-- prettier-ignore -->
|
|
38
|
+
```css
|
|
39
|
+
a { top: 1.01px }
|
|
40
|
+
```
|
package/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/index.cjs
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
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 report = require('stylelint/lib/utils/report.cjs');
|
|
9
|
+
const ruleMessages = require('stylelint/lib/utils/ruleMessages.cjs');
|
|
10
|
+
const { isAtRule } = require('stylelint/lib/utils/typeGuards.cjs');
|
|
11
|
+
const validateOptions = require('stylelint/lib/utils/validateOptions.cjs');
|
|
12
|
+
|
|
13
|
+
const ruleName = 'plugin/number-no-trailing-zeros';
|
|
14
|
+
|
|
15
|
+
const messages = ruleMessages(ruleName, {
|
|
16
|
+
rejected: 'Unexpected trailing zero(s)'
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const meta = {
|
|
20
|
+
url: 'https://github.com/jens-duttke/linter-bundle/blob/main/stylelint/plugins/stylelint-15.11.0-stylistic/rules/number-no-trailing-zeros/README.md',
|
|
21
|
+
fixable: true
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @type {import('stylelint').Rule} */
|
|
25
|
+
const rule = (primary, _secondaryOptions, context) => (root, result) => {
|
|
26
|
+
const validOptions = validateOptions(result, ruleName, { actual: primary });
|
|
27
|
+
|
|
28
|
+
if (!validOptions) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
root.walkAtRules((atRule) => {
|
|
33
|
+
if (atRule.name.toLowerCase() === 'import') {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
check(atRule, atRule.params);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
root.walkDecls((decl) => check(decl, decl.value));
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @param {import('postcss').AtRule | import('postcss').Declaration} node
|
|
44
|
+
* @param {string} value
|
|
45
|
+
*/
|
|
46
|
+
function check (node, value) {
|
|
47
|
+
/** @type {Array<{ startIndex: number, endIndex: number }>} */
|
|
48
|
+
const fixPositions = [];
|
|
49
|
+
|
|
50
|
+
// Get out quickly if there are no periods
|
|
51
|
+
if (!value.includes('.')) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
valueParser(value).walk((valueNode) => {
|
|
56
|
+
// Ignore `url` function
|
|
57
|
+
if (valueNode.type === 'function' && valueNode.value.toLowerCase() === 'url') {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Ignore strings, comments, etc
|
|
62
|
+
if (valueNode.type !== 'word') {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const match = (/\.(\d{0,100}?)(0+)(?:\D|$)/).exec(valueNode.value);
|
|
67
|
+
|
|
68
|
+
// match[1] is any numbers between the decimal and our trailing zero, could be empty
|
|
69
|
+
// match[2] is our trailing zero(s)
|
|
70
|
+
if (match?.[1] == null || match[2] == null) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// our index is:
|
|
75
|
+
// the index of our valueNode +
|
|
76
|
+
// the index of our match +
|
|
77
|
+
// 1 for our decimal +
|
|
78
|
+
// the length of our potential non-zero number match (match[1])
|
|
79
|
+
const index = valueNode.sourceIndex + match.index + 1 + match[1].length;
|
|
80
|
+
|
|
81
|
+
// our startIndex is identical to our index except when we have only
|
|
82
|
+
// trailing zeros after our decimal. in that case we don't need the decimal
|
|
83
|
+
// either so we move our index back by 1.
|
|
84
|
+
const startIndex = match[1].length > 0 ? index : index - 1;
|
|
85
|
+
|
|
86
|
+
// our end index is our original index + the length of our trailing zeros
|
|
87
|
+
const endIndex = index + match[2].length;
|
|
88
|
+
|
|
89
|
+
if (context.fix) {
|
|
90
|
+
fixPositions.unshift({
|
|
91
|
+
startIndex,
|
|
92
|
+
endIndex
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const baseIndex = isAtRule(node) ? atRuleParamIndex(node) : declarationValueIndex(node);
|
|
99
|
+
|
|
100
|
+
report({
|
|
101
|
+
message: messages.rejected,
|
|
102
|
+
node,
|
|
103
|
+
// this is the index of the _first_ trailing zero
|
|
104
|
+
index: baseIndex + index,
|
|
105
|
+
result,
|
|
106
|
+
ruleName
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
if (fixPositions.length > 0) {
|
|
111
|
+
for (const fixPosition of fixPositions) {
|
|
112
|
+
const startIndex = fixPosition.startIndex;
|
|
113
|
+
const endIndex = fixPosition.endIndex;
|
|
114
|
+
|
|
115
|
+
if (isAtRule(node)) {
|
|
116
|
+
node.params = removeTrailingZeros(node.params, startIndex, endIndex);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
node.value = removeTrailingZeros(node.value, startIndex, endIndex);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @param {string} input
|
|
128
|
+
* @param {number} startIndex
|
|
129
|
+
* @param {number} endIndex
|
|
130
|
+
* @returns {string}
|
|
131
|
+
*/
|
|
132
|
+
function removeTrailingZeros (input, startIndex, endIndex) {
|
|
133
|
+
return input.slice(0, startIndex) + input.slice(endIndex);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
rule.ruleName = ruleName;
|
|
137
|
+
rule.messages = messages;
|
|
138
|
+
rule.meta = meta;
|
|
139
|
+
module.exports = stylelint.createPlugin(ruleName, rule);
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# property-case
|
|
2
|
+
|
|
3
|
+
Specify lowercase or uppercase for properties.
|
|
4
|
+
|
|
5
|
+
<!-- prettier-ignore -->
|
|
6
|
+
```css
|
|
7
|
+
a { width: 1px; }
|
|
8
|
+
/** ↑
|
|
9
|
+
* This property */
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The [`fix` option](https://stylelint.io/user-guide/options/#fix) can automatically fix all 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: 1px
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<!-- prettier-ignore -->
|
|
30
|
+
```css
|
|
31
|
+
a {
|
|
32
|
+
WIDTH: 1px
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
<!-- prettier-ignore -->
|
|
37
|
+
```css
|
|
38
|
+
a {
|
|
39
|
+
widtH: 1px
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
<!-- prettier-ignore -->
|
|
44
|
+
```css
|
|
45
|
+
a {
|
|
46
|
+
border-Radius: 5px;
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
<!-- prettier-ignore -->
|
|
51
|
+
```css
|
|
52
|
+
a {
|
|
53
|
+
-WEBKIT-animation-duration: 3s;
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
<!-- prettier-ignore -->
|
|
58
|
+
```css
|
|
59
|
+
@media screen and (orientation: landscape) {
|
|
60
|
+
WiDtH: 500px;
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The following patterns are _not_ considered problems:
|
|
65
|
+
|
|
66
|
+
<!-- prettier-ignore -->
|
|
67
|
+
```css
|
|
68
|
+
a {
|
|
69
|
+
width: 1px
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
<!-- prettier-ignore -->
|
|
74
|
+
```css
|
|
75
|
+
a {
|
|
76
|
+
border-radius: 5px;
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
<!-- prettier-ignore -->
|
|
81
|
+
```css
|
|
82
|
+
a {
|
|
83
|
+
-webkit-animation-duration: 3s;
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
<!-- prettier-ignore -->
|
|
88
|
+
```css
|
|
89
|
+
@media screen and (orientation: landscape) {
|
|
90
|
+
width: 500px;
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### `"upper"`
|
|
95
|
+
|
|
96
|
+
The following patterns are considered problems:
|
|
97
|
+
|
|
98
|
+
<!-- prettier-ignore -->
|
|
99
|
+
```css
|
|
100
|
+
a {
|
|
101
|
+
Width: 1px
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
<!-- prettier-ignore -->
|
|
106
|
+
```css
|
|
107
|
+
a {
|
|
108
|
+
width: 1px
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
<!-- prettier-ignore -->
|
|
113
|
+
```css
|
|
114
|
+
a {
|
|
115
|
+
widtH: 1px
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
<!-- prettier-ignore -->
|
|
120
|
+
```css
|
|
121
|
+
a {
|
|
122
|
+
border-Radius: 5px;
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
<!-- prettier-ignore -->
|
|
127
|
+
```css
|
|
128
|
+
a {
|
|
129
|
+
-WEBKIT-animation-duration: 3s;
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
<!-- prettier-ignore -->
|
|
134
|
+
```css
|
|
135
|
+
@media screen and (orientation: landscape) {
|
|
136
|
+
WiDtH: 500px;
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The following patterns are _not_ considered problems:
|
|
141
|
+
|
|
142
|
+
<!-- prettier-ignore -->
|
|
143
|
+
```css
|
|
144
|
+
a {
|
|
145
|
+
WIDTH: 1px
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
<!-- prettier-ignore -->
|
|
150
|
+
```css
|
|
151
|
+
a {
|
|
152
|
+
BORDER-RADIUS: 5px;
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
<!-- prettier-ignore -->
|
|
157
|
+
```css
|
|
158
|
+
a {
|
|
159
|
+
-WEBKIT-ANIMATION-DURATION: 3s;
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
<!-- prettier-ignore -->
|
|
164
|
+
```css
|
|
165
|
+
@media screen and (orientation: landscape) {
|
|
166
|
+
WIDTH: 500px;
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Optional secondary options
|
|
171
|
+
|
|
172
|
+
### `ignoreSelectors: ["/regex/", /regex/, "string"]`
|
|
173
|
+
|
|
174
|
+
Given:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
[
|
|
178
|
+
"lower",
|
|
179
|
+
{
|
|
180
|
+
"ignoreSelectors": [":export"]
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The following patterns are _not_ considered problems:
|
|
186
|
+
|
|
187
|
+
<!-- prettier-ignore -->
|
|
188
|
+
```css
|
|
189
|
+
:export {
|
|
190
|
+
camelCase: value;
|
|
191
|
+
}
|
|
192
|
+
```
|