Skip to content

Commit

Permalink
Merge pull request #4 from sky-uk/tweaks
Browse files Browse the repository at this point in the history
Preparing for 1.0
  • Loading branch information
joe-bell authored Jan 9, 2017
2 parents 2112d05 + 9552791 commit a768847
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 35 deletions.
106 changes: 74 additions & 32 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,52 @@
"stylelint-scss"
],
"rules": {
"at-rule-empty-line-before": [ "always", {
except: [ "blockless-group", "first-nested" ],
ignore: ["after-comment"]
} ],
"at-rule-empty-line-before": [
"always",
{
"except": [
"blockless-group",
"first-nested"
],
"ignore": [
"after-comment"
]
}
],
"at-rule-name-case": "lower",
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",
"block-closing-brace-newline-before": "always-multi-line",
"block-no-empty": true,
"block-no-single-line": true,
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-hex-length": "short",
"color-no-invalid-hex": true,
"comment-empty-line-before": [ "always", {
except: ["first-nested"],
ignore: ["stylelint-commands"]
} ],
"comment-empty-line-before": [
"always",
{
"except": [
"first-nested"
],
"ignore": [
"stylelint-commands"
]
}
],
"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": [ true, {
ignore: ["consecutive-duplicates"]
} ],
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates"
]
}
],
"declaration-block-no-ignored-properties": true,
"declaration-block-no-redundant-longhand-properties": true,
"declaration-block-no-shorthand-property-overrides": true,
Expand All @@ -54,15 +73,25 @@
"function-parentheses-space-inside": "never-single-line",
"function-url-quotes": "always",
"function-whitespace-after": "always",
"indentation": [2, {
ignore: ["value"]
}],
"indentation": [
2,
{
"ignore": [
"value"
]
}
],
"keyframe-declaration-no-important": true,
"length-zero-no-unit": true,
"max-empty-lines": 1,
"max-nesting-depth": [2, {
ignore: ["at-rules-without-declaration-blocks"],
}],
"max-nesting-depth": [
2,
{
"ignore": [
"at-rules-without-declaration-blocks"
]
}
],
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-case": "lower",
Expand All @@ -80,19 +109,24 @@
"no-missing-end-of-source-newline": true,
"number-leading-zero": "always",
"number-no-trailing-zeros": true,
"plugin/selector-bem-pattern": {
"plugin\/selector-bem-pattern": {
"preset": "bem"
},
"property-case": "lower",
"property-no-unknown": true,
"rule-non-nested-empty-line-before": [ "always-multi-line", {
ignore: ["after-comment"]
} ],
"scss/at-extend-no-missing-placeholder": true,
"scss/at-import-no-partial-leading-underscore": true,
"scss/at-mixin-argumentless-call-parentheses": always,
"scss/dollar-variable-colon-space-before": "never",
"scss/selector-no-redundant-nesting-selector": true,
"rule-non-nested-empty-line-before": [
"always-multi-line",
{
"ignore": [
"after-comment"
]
}
],
"scss\/at-extend-no-missing-placeholder": true,
"scss\/at-import-no-partial-leading-underscore": true,
"scss\/at-mixin-argumentless-call-parentheses": "always",
"scss\/dollar-variable-colon-space-before": "never",
"scss\/selector-no-redundant-nesting-selector": true,
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
Expand All @@ -119,12 +153,20 @@
"time-no-imperceptible": true,
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": [ "lower", {
ignoreKeywords: ["Sky", "Text", "Helvetica", "Arial"]
}],
"value-keyword-case": [
"lower",
{
"ignoreKeywords": [
"Sky",
"Text",
"Helvetica",
"Arial"
]
}
],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-newline-before": "never-multi-line",
"value-list-comma-space-before": "never",
"value-list-max-empty-lines": 0,
"value-list-max-empty-lines": 0
}
}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

> Believe in Better CSS
An Evolving CSS / Sass Style Guide for Sky

## Contents

### Writing CSS / Sass
Expand Down Expand Up @@ -77,7 +79,7 @@ It's important we keep code transparent and self-documented when it comes to nam

* **Don't** use `html` tags in selectors.
* **Don't** use IDs (`#`) in selectors.
* **Don't** unncessarily nest selectors.
* **Don't** unnecessarily nest selectors.
* Try to keep selectors flat, at the same level of specificity.
* Avoid going more than 2 levels deep.

Expand Down Expand Up @@ -173,7 +175,7 @@ In your stylesheet this would look like:
}
```

Avoid using the SCSS ampersand shortcut (`&__`) when defining elements, it'll make searching your codebase a lot less productive.
Avoid using the SCSS ampersand shortcut (`&--`) when defining elements, it'll make searching your codebase a lot less productive.

For more detail on BEM
modifiers, visit [bem.info](https://en.bem.info/methodology/quick-start/#modifier).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sky-css-lint",
"version": "0.2.0",
"version": "1.0.0",
"description": "Sky's CSS Style Guide",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit a768847

Please sign in to comment.