Skip to content

Commit

Permalink
fix: Add @import to ignoreAtRules option in `at-rule-empty-line-b…
Browse files Browse the repository at this point in the history
…efore` rule for SCSS config (#131)
  • Loading branch information
ntwb committed May 31, 2020
1 parent cb183fc commit 8a0789d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/stylelint-config-wordpress/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# HEAD

- Added: Added `import` to `ignoreAtRules` option in `at-rule-empty-line-before` rule for SCSS config.

# 10.0.1

- Removed: `rule-non-nested-empty-line-before` rule from SCSS config. This rule is deprecated in stylelint v8, the new `rule-empty-line-before` rule already exists in the primary config.
Expand Down
3 changes: 3 additions & 0 deletions packages/stylelint-config-wordpress/__tests__/scss-valid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ $map: (
} @else {
display: inline-block;
}

@import "../some/url";
@import "../another/url";
2 changes: 1 addition & 1 deletion packages/stylelint-config-wordpress/scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
} ],
"at-rule-empty-line-before": [
"always", {
"ignoreAtRules": ["else"],
"ignoreAtRules": [ "else", "import" ],
},
],
"block-opening-brace-space-before": "always",
Expand Down

0 comments on commit 8a0789d

Please sign in to comment.