Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require single colons for pseudo-element rules #1

Merged
merged 2 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ common at GDS) however the CSS rules can be used alone.
To add this to your project, install stylelint and this module:

```bash
npm install --save-dev stylelint styelint-config-gds@0.1.0-pre.1
npm install --save-dev stylelint styelint-config-gds@0.1.0-pre.2
```

You then need to [configure](https://stylelint.io/user-guide/configure)
Expand Down
6 changes: 6 additions & 0 deletions css.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ module.exports = {
ignore: ['attribute']
}
],
// Require single colons for defining pseudo-elements
// IE8 and below do not support the modern double colon approach. Although
// few projects support IE8, we'd prefer to not exclude compatibility for
// purely syntactic reasons.
// https://stylelint.io/user-guide/rules/selector-pseudo-element-colon-notation
'selector-pseudo-element-colon-notation': 'single',
// Disallow redundant properties in rules (for example: margin: 1px 1px 1px;)
// https://stylelint.io/user-guide/rules/shorthand-property-no-redundant-values
// Originates from: https://github.com/alphagov/govuk-frontend/blob/e248b4027102b2684f592a0501630075bdfa1fab/config/.sass-lint.yml#L436
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "stylelint-config-gds",
"version": "0.1.0-pre.1",
"version": "0.1.0-pre.2",
"description": "A work-in-progress Stylelint configuration for the UK Government Digital Service.",
"main": "scss.js",
"scripts": {
"pretest": "npm run lint",
"test": "jest",
"lint": "standard"
},
"files": ["scss.js", "css.js"],
"files": [
"scss.js",
"css.js"
],
"repository": {
"type": "git",
"url": "https://github.com/alphagov/stylelint-config-gds.git"
Expand Down