Skip to content

Commit

Permalink
Merge pull request #428 from Shopify/update-deprecated-rules
Browse files Browse the repository at this point in the history
Update deprecated rules
  • Loading branch information
jesstelford authored Jul 4, 2024
2 parents 8ff1a90 + f8ce1ef commit b838bd7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/sixty-pants-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/stylelint-plugin': patch
---

Updated deprecated rules
4 changes: 2 additions & 2 deletions packages/stylelint-plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,11 @@ module.exports = {
// Require a single space or disallow whitespace after the closing brace of @if statements.
'scss/at-if-closing-brace-space-after': 'always-intermediate',
// Disallow leading underscore in partial names in @import.
'scss/at-import-no-partial-leading-underscore': true,
'scss/load-no-partial-leading-underscore': true,
// Disallow unneeded `!= null` in if expressions (`@if $x != null` can be simplified to `@if $x`)
'scss/at-if-no-null': true,
// Specify blacklist of disallowed file extensions for partial names in @import commands.
'scss/at-import-partial-extension-blacklist': ['scss'],
'scss/at-import-partial-extension-disallowed-list': ['scss'],
// Specify whitelist of allowed file extensions for partial names in @import commands.
'scss/at-import-partial-extension-whitelist': null,
// Require using `@each $key, $value in $list` instead of getting the value inside the loop
Expand Down
12 changes: 0 additions & 12 deletions packages/stylelint-plugin/tests/config-e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ describe('stylelint-plugin E2E Tests', () => {
const result = runStylelint('value-keyword-case.*.scss');

const expectedResult = `
Deprecation warnings:
- The "scss/at-import-no-partial-leading-underscore" rule is deprecated.
- 'at-import-no-partial-leading-underscore' has been deprecated, and will be removed in '7.0'. Use 'load-no-partial-leading-underscore' instead. See: https://github.com/stylelint-scss/stylelint-scss/blob/v5.2.1/src/rules/at-import-no-partial-leading-underscore/README.md
- The "scss/at-import-partial-extension-blacklist" rule is deprecated.
- 'at-import-partial-extension-blacklist' has been deprecated, and will be removed in '7.0'. Use 'at-import-partial-extension-disallowed-list' instead. See: https://github.com/stylelint-scss/stylelint-scss/blob/v6.1.0/src/rules/at-import-partial-extension-blacklist/README.md
value-keyword-case.invalid.scss
1:7 ✖ Expected "Value" to be "value" value-keyword-case
2:7 ✖ Expected "VALUE" to be "value" value-keyword-case
Expand All @@ -42,12 +36,6 @@ value-keyword-case.invalid.scss
// trailing whitespace and editors really want to remove that trailing
// whitespace when saving the file
const expectedResult = `
Deprecation warnings:
- The "scss/at-import-no-partial-leading-underscore" rule is deprecated.
- 'at-import-no-partial-leading-underscore' has been deprecated, and will be removed in '7.0'. Use 'load-no-partial-leading-underscore' instead. See: https://github.com/stylelint-scss/stylelint-scss/blob/v5.2.1/src/rules/at-import-no-partial-leading-underscore/README.md
- The "scss/at-import-partial-extension-blacklist" rule is deprecated.
- 'at-import-partial-extension-blacklist' has been deprecated, and will be removed in '7.0'. Use 'at-import-partial-extension-disallowed-list' instead. See: https://github.com/stylelint-scss/stylelint-scss/blob/v6.1.0/src/rules/at-import-partial-extension-blacklist/README.md
scss.invalid.scss
6:5 ✖ Expected ".n3" to have no more than 2 classes selector-max-class
6:5 ✖ Expected ".n3" to have no more than 1 combinator selector-max-combinators
Expand Down

0 comments on commit b838bd7

Please sign in to comment.