Skip to content

Commit

Permalink
update stylelint to version 15 - PLATO-1264
Browse files Browse the repository at this point in the history
and replace deprecated linter rules with rules from stylelint/stylistic
  • Loading branch information
Marieke-C committed Sep 29, 2023
1 parent f795371 commit 09d60e1
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
68 changes: 35 additions & 33 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

module.exports = {
"plugins": [
"stylelint-stylistic",
"stylelint-selector-tag-no-without-class"
],
"rules": {
"plugin/selector-tag-no-without-class": ["div", "span"],
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"stylistic/at-rule-name-case": "lower",
"stylistic/at-rule-name-space-after": "always-single-line",
"at-rule-no-unknown": true,
"block-closing-brace-newline-after": "always",
"block-closing-brace-space-before": "always-single-line",
"stylistic/block-closing-brace-newline-after": "always",
"stylistic/block-closing-brace-space-before": "always-single-line",
"block-no-empty": true,
"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/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",
"color-named": "never",
"color-no-invalid-hex": true,
Expand All @@ -30,15 +31,16 @@ module.exports = {
}
],
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"stylistic/declaration-block-semicolon-newline-after": "always-multi-line",
"stylistic/declaration-block-semicolon-newline-before": "never-multi-line",
"stylistic/declaration-block-semicolon-space-after": "always-single-line",
"stylistic/declaration-block-semicolon-space-before": "never",
"declaration-block-trailing-semicolon": "always",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"stylistic/declaration-colon-space-after": "always-single-line",
"stylistic/declaration-colon-space-before": "never",
"declaration-empty-line-before": "never",
"declaration-no-important": true,
"declaration-property-value-no-unknown": true,
"font-family-name-quotes": "always-where-recommended",
"font-family-no-duplicate-names": true,
"function-calc-no-unspaced-operator": true,
Expand All @@ -50,42 +52,42 @@ module.exports = {
"no-duplicate-at-import-rules": true,
"no-duplicate-selectors": true,
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": true,
"stylistic/no-eol-whitespace": true,
"stylistic/no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"no-unknown-animations": true,
"number-no-trailing-zeros": true,
"stylistic/number-no-trailing-zeros": true,
"property-case": "lower",
"property-no-unknown": true,
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"stylistic/selector-attribute-brackets-space-inside": "never",
"stylistic/selector-attribute-operator-space-after": "never",
"stylistic/selector-attribute-operator-space-before": "never",
"selector-attribute-quotes": "always",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-descendant-combinator-no-non-space": true,
"selector-list-comma-newline-after": "always",
"selector-pseudo-class-case": "lower",
"stylistic/selector-combinator-space-before": "always",
"stylistic/selector-descendant-combinator-no-non-space": true,
"stylistic/selector-list-comma-newline-after": "always",
"stylistic/selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-class-parentheses-space-inside": "never",
"stylistic/selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-case": "lower",
"stylistic/selector-pseudo-element-case": "lower",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-type-no-unknown": true,
"string-no-newline": true,
"string-quotes": "double",
"unit-case": "lower",
"stylistic/string-quotes": "double",
"stylistic/unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": "lower",
"value-list-comma-newline-after": "never-multi-line",
"value-list-comma-newline-before": "never-multi-line",
"value-list-comma-space-after": "always",
"value-list-comma-space-before": "never",
"stylistic/value-list-comma-newline-after": "never-multi-line",
"stylistic/value-list-comma-newline-before": "never-multi-line",
"stylistic/value-list-comma-space-after": "always",
"stylistic/value-list-comma-space-before": "never",
"declaration-property-value-allowed-list": {
"flex": ["/^\\S+\\s+\\S+\\s+\\S+$/"]
},
"indentation": "tab"
"stylistic/indentation": "tab"
},
"overrides": [
{
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"dependencies": {
"postcss": "^8.4.5",
"postcss-less": "^6.0.0",
"stylelint": "^14.1.0",
"stylelint-selector-tag-no-without-class": "^2.0.5"
"stylelint": "^15.10.0",
"stylelint-selector-tag-no-without-class": "^2.0.5",
"stylelint-stylistic": "^0.4.3"
}
}

0 comments on commit 09d60e1

Please sign in to comment.