Skip to content
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-dolls-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"stylelint-config-recommended-vue": patch
---

Disable declaration-property-value-no-unknown rule for SCSS
3 changes: 3 additions & 0 deletions lib/vue-specific-rules-for-scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ const baseRules = require("./vue-specific-rules");
module.exports = {
...baseRules,
...(baseRules["function-no-unknown"] ? { "function-no-unknown": null } : {}),
...(baseRules["declaration-property-value-no-unknown"]
? { "declaration-property-value-no-unknown": null }
: {}),
};
6 changes: 6 additions & 0 deletions tests/fixtures/integrations/stylelint-scss-v4.1/src/valid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ a {
@include my-mixin
}

$animation-duration: 300ms;
$animation-function: ease-in-out;
.d {
transition: all $animation-duration $animation-function;
}

// Vue
:global(.foo),
::v-deep(.foo),
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/integrations/stylelint-scss/src/valid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ a {
@include my-mixin
}

$animation-duration: 300ms;
$animation-function: ease-in-out;
.d {
transition: all $animation-duration $animation-function;
}

// Vue
:global(.foo),
::v-deep(.foo),
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/integrations/stylelint-v16-scss/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
15 changes: 15 additions & 0 deletions tests/fixtures/integrations/stylelint-v16-scss/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "stylelint-config-recommended-vue-test-stylelint",
"private": true,
"version": "1.0.0",
"description": "",
"devDependencies": {
"postcss-html": "^1.0.0",
"stylelint": "^16.0.0",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-config-recommended-vue": "file:../../../../stylelint-config-recommended-vue-test.tgz"
},
"engines": {
"node": ">=18.12.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<style lang="scss">
a {
@if $x == null {
color: red;
}
}
</style>
38 changes: 38 additions & 0 deletions tests/fixtures/integrations/stylelint-v16-scss/src/valid.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<style lang="scss">
a {
color: v-bind(color);
padding-right: math.div(4, 2);
}

// SCSS
.b {
// stylelint-disable-next-line scss/at-if-no-null
@if $x == null {
color: red;
}
}
@mixin my-mixin {
color: blue
}

.c {
@include my-mixin
}

$animation-duration: 300ms;
$animation-function: ease-in-out;
.d {
transition: all $animation-duration $animation-function;
}

// Vue
:global(.foo),
::v-deep(.foo),
::v-slotted(.foo),
::v-global(.foo),
:deep(.foo),
:slotted(.foo) {
color: red;
}

</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"use strict";

module.exports = {
extends: "stylelint-config-recommended-vue/scss",
rules: {},
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

module.exports = {
extends: "stylelint-config-recommended-vue",
rules: {},
};