Skip to content

Commit 0a44403

Browse files
committed
Override at-rule-empty-line-before from stylelint-config-standard to
ignore `@value` at rules
1 parent 8c1ebbb commit 0a44403

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

.stylelintrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
{
2-
"extends": ["stylelint-config-standard", "./index.js"]
2+
"extends": ["stylelint-config-standard", "./index.js"],
3+
"overrides": [
4+
{
5+
"files": "**/*.scss",
6+
"extends": ["stylelint-config-standard-scss", "./index.js"]
7+
}
8+
]
39
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased]
8+
### Added
9+
* Override `at-rule-empty-line-before` from `stylelint-config-standard` to
10+
ignore `@value` at rules.
811

912
### Fixed
1013
* Remove `function-no-unknown` overrides since that rule is not part

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ export default {
3232
ignoreAtRules: ['value'],
3333
},
3434
],
35+
'at-rule-empty-line-before': [
36+
'always',
37+
{
38+
except: ['blockless-after-same-name-blockless', 'first-nested'],
39+
ignore: ['after-comment'],
40+
ignoreAtRules: ['value'],
41+
},
42+
],
3543
},
3644
overrides: [
3745
{

test/scss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import stylelint from 'stylelint';
55

66
const config = {
77
extends: [
8-
'stylelint-config-standard',
8+
'stylelint-config-standard-scss',
99
path.join(import.meta.dirname, '..', 'index.js'),
1010
],
1111
};

0 commit comments

Comments
 (0)