diff --git a/index.js b/index.js index 8d134e2..579e8a8 100644 --- a/index.js +++ b/index.js @@ -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-", { @@ -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": [ { diff --git a/package.json b/package.json index 01c97db..b5604f7 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "postcss-syntax": "^0.36", "stylelint": "^15", "stylelint-config-recommended": "^12", - "stylelint-order": "^6" + "stylelint-order": "^6", + "stylelint-stylistic": "^0.4" } }