Skip to content

Commit

Permalink
fix: Update to use stylelint-stylistic plugin for deprecated stylisti…
Browse files Browse the repository at this point in the history
…c rules. (#18)
  • Loading branch information
dbatiste authored Jun 29, 2023
1 parent 6174d1c commit 709078c
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 59 deletions.
119 changes: 61 additions & 58 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

module.exports = {
"extends": "stylelint-config-recommended",
"plugins": ["stylelint-order"],
"plugins": [
"stylelint-order",
"stylelint-stylistic"
],
"rules": {
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-closing-brace-space-before": "always-single-line",
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-space-after": "always-single-line",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"stylistic/at-rule-name-case": "lower",
"stylistic/at-rule-name-space-after": "always-single-line",
"stylistic/at-rule-semicolon-newline-after": "always",
"stylistic/block-closing-brace-newline-after": "always",
"stylistic/block-closing-brace-newline-before": "always-multi-line",
"stylistic/block-closing-brace-space-before": "always-single-line",
"stylistic/block-opening-brace-newline-after": "always-multi-line",
"stylistic/block-opening-brace-space-after": "always-single-line",
"stylistic/block-opening-brace-space-before": "always",
"stylistic/color-hex-case": "lower",
"color-hex-length": "long",
"comment-whitespace-inside": "always",
"custom-property-pattern": ["^d2l-", {
Expand All @@ -29,72 +32,72 @@ module.exports = {
"inside-single-line-block"
]
}],
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"stylistic/declaration-bang-space-after": "never",
"stylistic/declaration-bang-space-before": "always",
"stylistic/declaration-block-semicolon-newline-after": "always-multi-line",
"stylistic/declaration-block-semicolon-space-after": "always-single-line",
"stylistic/declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 3,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"function-comma-newline-after": "always-multi-line",
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-max-empty-lines": 0,
"stylistic/declaration-block-trailing-semicolon": "always",
"stylistic/declaration-colon-newline-after": "always-multi-line",
"stylistic/declaration-colon-space-after": "always-single-line",
"stylistic/declaration-colon-space-before": "never",
"stylistic/function-comma-newline-after": "always-multi-line",
"stylistic/function-comma-space-after": "always-single-line",
"stylistic/function-comma-space-before": "never",
"stylistic/function-max-empty-lines": 0,
"function-name-case": ["lower", {
"ignoreFunctions": ["${unsafeCSS"]
}],
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-whitespace-after": "always",
"indentation": "tab",
"stylistic/function-parentheses-newline-inside": "always-multi-line",
"stylistic/function-parentheses-space-inside": "never-single-line",
"stylistic/function-whitespace-after": "always",
"stylistic/indentation": "tab",
"length-zero-no-unit": true,
"max-empty-lines": 2,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-case": "lower",
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"stylistic/max-empty-lines": 2,
"stylistic/media-feature-colon-space-after": "always",
"stylistic/media-feature-colon-space-before": "never",
"stylistic/media-feature-name-case": "lower",
"stylistic/media-feature-parentheses-space-inside": "never",
"stylistic/media-feature-range-operator-space-after": "always",
"stylistic/media-feature-range-operator-space-before": "always",
"stylistic/media-query-list-comma-newline-after": "always-multi-line",
"stylistic/media-query-list-comma-space-after": "always-single-line",
"stylistic/media-query-list-comma-space-before": "never",
"no-descending-specificity": null,
"no-eol-whitespace": [true, {
"stylistic/no-eol-whitespace": [true, {
"ignore": ["empty-lines"]
}],
"number-leading-zero": "always",
"number-no-trailing-zeros": true,
"stylistic/number-leading-zero": "always",
"stylistic/number-no-trailing-zeros": true,
"order/order": [
"custom-properties",
"declarations"
],
"order/properties-alphabetical-order": true,
"property-case": "lower",
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-descendant-combinator-no-non-space": true,
"selector-list-comma-space-before": "never",
"selector-max-empty-lines": 0,
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"stylistic/property-case": "lower",
"stylistic/selector-attribute-brackets-space-inside": "never",
"stylistic/selector-attribute-operator-space-after": "never",
"stylistic/selector-attribute-operator-space-before": "never",
"stylistic/selector-combinator-space-after": "always",
"stylistic/selector-combinator-space-before": "always",
"stylistic/selector-descendant-combinator-no-non-space": true,
"stylistic/selector-list-comma-space-before": "never",
"stylistic/selector-max-empty-lines": 0,
"stylistic/selector-pseudo-class-case": "lower",
"stylistic/selector-pseudo-class-parentheses-space-inside": "never",
"stylistic/selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-class-disallowed-list": ["host-context"],
"selector-type-case": "lower",
"selector-type-no-unknown": [true, {
"ignore": ["custom-elements"]
}],
"unit-case": "lower",
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
"value-list-max-empty-lines": 0
"stylistic/unit-case": "lower",
"stylistic/value-list-comma-newline-after": "always-multi-line",
"stylistic/value-list-comma-space-after": "always-single-line",
"stylistic/value-list-comma-space-before": "never",
"stylistic/value-list-max-empty-lines": 0
},
"overrides": [
{
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"postcss-syntax": "^0.36",
"stylelint": "^15",
"stylelint-config-recommended": "^12",
"stylelint-order": "^6"
"stylelint-order": "^6",
"stylelint-stylistic": "^0.4"
}
}

0 comments on commit 709078c

Please sign in to comment.