diff --git a/README.md b/README.md index 32f441a..e2ffdca 100644 --- a/README.md +++ b/README.md @@ -125,10 +125,10 @@ In your stylesheet this would look like: ```scss .block { /* block styles here */ +} - .block__element { - /* element styles here */ - } +.block__element { + /* element styles here */ } ``` @@ -244,14 +244,10 @@ Defining separately: border: solid 1px grey; transition: border 1s ease; - .c-example__heading { - text-transform: uppercase; - } - &:focus, &:hover { text-decoration: underline; - border: solid 1px black; + border: solid 1px black; } @media(min-width: 721px) { @@ -259,6 +255,10 @@ Defining separately: } } +.c-example__heading { + text-transform: uppercase; +} + /* States =========================================== */ diff --git a/index.js b/index.js index 34fe4c6..c8ae62a 100644 --- a/index.js +++ b/index.js @@ -8,7 +8,7 @@ module.exports = { 'always', { except: [ - 'blockless-group', + 'blockless-after-blockless', 'first-nested', ], ignore: [ @@ -39,7 +39,6 @@ module.exports = { ], 'comment-no-empty': true, 'comment-whitespace-inside': 'always', - 'custom-property-no-outside-root': true, 'declaration-bang-space-after': 'never', 'declaration-bang-space-before': 'always', 'declaration-block-no-duplicate-properties': [ @@ -50,7 +49,6 @@ module.exports = { ], }, ], - 'declaration-block-no-ignored-properties': true, 'declaration-block-no-redundant-longhand-properties': true, 'declaration-block-no-shorthand-property-overrides': true, 'declaration-block-semicolon-newline-after': 'always', @@ -88,7 +86,7 @@ module.exports = { 2, { ignore: [ - 'at-rules-without-declaration-blocks', + 'blockless-at-rules', ], }, ], @@ -96,7 +94,6 @@ module.exports = { 'media-feature-colon-space-before': 'never', 'media-feature-name-case': 'lower', 'media-feature-name-no-unknown': true, - 'media-feature-no-missing-punctuation': true, 'media-feature-parentheses-space-inside': 'never', 'media-feature-range-operator-space-after': 'always', 'media-feature-range-operator-space-before': 'always', @@ -114,9 +111,12 @@ module.exports = { }, 'property-case': 'lower', 'property-no-unknown': true, - 'rule-non-nested-empty-line-before': [ + 'rule-empty-line-before': [ 'always-multi-line', { + except: [ + 'first-nested', + ], ignore: [ 'after-comment', ], @@ -136,7 +136,6 @@ module.exports = { 'selector-list-comma-space-after': 'always-single-line', 'selector-list-comma-space-before': 'never', 'selector-max-empty-lines': 0, - 'selector-no-empty': true, 'selector-no-id': true, 'selector-pseudo-class-case': 'lower', 'selector-pseudo-class-no-unknown': true, @@ -149,8 +148,7 @@ module.exports = { 'shorthand-property-no-redundant-values': true, 'string-no-newline': true, 'string-quotes': 'double', - 'stylelint-disable-reason': 'always-before', - 'time-no-imperceptible': true, + 'time-min-milliseconds': 10, 'unit-case': 'lower', 'unit-no-unknown': true, 'value-keyword-case': [ diff --git a/package.json b/package.json index 0d760b3..5b07e13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stylelint-config-sky-uk", - "version": "2.0.0", + "version": "3.0.0", "description": "Sky's CSS Stylelint configuration, following our Style Guide", "main": "index.js", "scripts": { @@ -41,13 +41,13 @@ "eslint-plugin-jsx-a11y": "^4.0.0", "eslint-plugin-react": "^6.9.0", "pre-commit": "^1.2.2", - "stylelint": "^7.8.0", - "stylelint-scss": "^1.4.1", + "stylelint": "^7.9.0", + "stylelint-scss": "^1.4.3", "stylelint-selector-bem-pattern": "^1.0.0" }, "peerDependencies": { - "stylelint": "^7.8.0", - "stylelint-scss": "^1.4.1", + "stylelint": "^7.9.0", + "stylelint-scss": "^1.4.3", "stylelint-selector-bem-pattern": "^1.0.0" }, "eslintConfig": {