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

Update deprecated rules #428

Merged
merged 1 commit into from
Jul 4, 2024
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
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
Loading