Socket
Socket
Sign inDemoInstall

stylelint-scss

Package Overview
Dependencies
Maintainers
0
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylelint-scss - npm Package Compare versions

Comparing version 6.4.1 to 6.5.0

src/rules/declaration-property-value-no-unknown/index.js

18

package.json
{
"name": "stylelint-scss",
"description": "A collection of SCSS-specific rules for Stylelint",
"version": "6.4.1",
"version": "6.5.0",
"author": "Krister Kari",

@@ -16,6 +16,8 @@ "repository": "stylelint-scss/stylelint-scss",

"dependencies": {
"css-tree": "2.3.1",
"is-plain-object": "5.0.0",
"known-css-properties": "^0.34.0",
"postcss-media-query-parser": "^0.2.3",
"postcss-resolve-nested-selector": "^0.1.1",
"postcss-selector-parser": "^6.1.0",
"postcss-resolve-nested-selector": "^0.1.4",
"postcss-selector-parser": "^6.1.1",
"postcss-value-parser": "^4.2.0"

@@ -27,12 +29,12 @@ },

"github-contributors-list": "^1.2.5",
"husky": "^9.0.11",
"husky": "^9.1.4",
"jest": "^29.7.0",
"jest-preset-stylelint": "^7.1.0",
"lint-staged": "^14.0.1",
"np": "^10.0.6",
"postcss": "^8.4.39",
"np": "^10.0.7",
"postcss": "^8.4.40",
"postcss-less": "^6.0.0",
"postcss-scss": "^4.0.9",
"prettier": "^3.3.2",
"stylelint": "^16.6.1"
"prettier": "^3.3.3",
"stylelint": "^16.8.1"
},

@@ -39,0 +41,0 @@ "files": [

@@ -140,2 +140,3 @@ # stylelint-scss

- [`declaration-nested-properties-no-divided-groups`](./src/rules/declaration-nested-properties-no-divided-groups/README.md): Disallow nested properties of the same "namespace" to be divided into multiple groups.
- [`declaration-property-value-no-unknown`](./src/rules/declaration-property-value-no-unknown/README.md): Disallow unknown values for properties within declarations.

@@ -234,3 +235,3 @@ ### Dimension

<th align="center"><a href="https://github.com/ybiquitous"><img alt="ybiquitous" src="https://avatars.githubusercontent.com/u/473530?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/Eugeno"><img alt="Eugeno" src="https://avatars.githubusercontent.com/u/23382920?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/pamelalozano16"><img alt="pamelalozano16" src="https://avatars.githubusercontent.com/u/30474787?v=4&s=80" width="80"></a></th>
</tr>

@@ -244,3 +245,3 @@ </thead>

<td align="center"><a href="https://github.com/ybiquitous">ybiquitous</a></td>
<td align="center"><a href="https://github.com/Eugeno">Eugeno</a></td>
<td align="center"><a href="https://github.com/pamelalozano16">pamelalozano16</a></td>
</tr>

@@ -251,3 +252,3 @@ </tbody></table>

<tr>
<th align="center"><a href="https://github.com/pamelalozano16"><img alt="pamelalozano16" src="https://avatars.githubusercontent.com/u/30474787?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/Eugeno"><img alt="Eugeno" src="https://avatars.githubusercontent.com/u/23382920?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/joseph118"><img alt="joseph118" src="https://avatars.githubusercontent.com/u/6863655?v=4&s=80" width="80"></a></th>

@@ -261,3 +262,3 @@ <th align="center"><a href="https://github.com/stof"><img alt="stof" src="https://avatars.githubusercontent.com/u/439401?v=4&s=80" width="80"></a></th>

<tbody><tr>
<td align="center"><a href="https://github.com/pamelalozano16">pamelalozano16</a></td>
<td align="center"><a href="https://github.com/Eugeno">Eugeno</a></td>
<td align="center"><a href="https://github.com/joseph118">joseph118</a></td>

@@ -274,2 +275,3 @@ <td align="center"><a href="https://github.com/stof">stof</a></td>

<th align="center"><a href="https://github.com/pipopotamasu"><img alt="pipopotamasu" src="https://avatars.githubusercontent.com/u/14048211?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/FloEdelmann"><img alt="FloEdelmann" src="https://avatars.githubusercontent.com/u/202916?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/jhae-de"><img alt="jhae-de" src="https://avatars.githubusercontent.com/u/28291021?v=4&s=80" width="80"></a></th>

@@ -279,3 +281,2 @@ <th align="center"><a href="https://github.com/OriR"><img alt="OriR" src="https://avatars.githubusercontent.com/u/2384068?v=4&s=80" width="80"></a></th>

<th align="center"><a href="https://github.com/ricardogobbosouza"><img alt="ricardogobbosouza" src="https://avatars.githubusercontent.com/u/13064722?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/jeddy3"><img alt="jeddy3" src="https://avatars.githubusercontent.com/u/808227?v=4&s=80" width="80"></a></th>
</tr>

@@ -285,2 +286,3 @@ </thead>

<td align="center"><a href="https://github.com/pipopotamasu">pipopotamasu</a></td>
<td align="center"><a href="https://github.com/FloEdelmann">FloEdelmann</a></td>
<td align="center"><a href="https://github.com/jhae-de">jhae-de</a></td>

@@ -290,3 +292,2 @@ <td align="center"><a href="https://github.com/OriR">OriR</a></td>

<td align="center"><a href="https://github.com/ricardogobbosouza">ricardogobbosouza</a></td>
<td align="center"><a href="https://github.com/jeddy3">jeddy3</a></td>
</tr>

@@ -297,4 +298,4 @@ </tbody></table>

<tr>
<th align="center"><a href="https://github.com/jeddy3"><img alt="jeddy3" src="https://avatars.githubusercontent.com/u/808227?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/evilebottnawi"><img alt="evilebottnawi" src="https://avatars.githubusercontent.com/u/23334705?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/FloEdelmann"><img alt="FloEdelmann" src="https://avatars.githubusercontent.com/u/202916?v=4&s=80" width="80"></a></th>
<th align="center"><a href="https://github.com/kevindew"><img alt="kevindew" src="https://avatars.githubusercontent.com/u/282717?v=4&s=80" width="80"></a></th>

@@ -307,4 +308,4 @@ <th align="center"><a href="https://github.com/thibaudcolas"><img alt="thibaudcolas" src="https://avatars.githubusercontent.com/u/877585?v=4&s=80" width="80"></a></th>

<tbody><tr>
<td align="center"><a href="https://github.com/jeddy3">jeddy3</a></td>
<td align="center"><a href="https://github.com/evilebottnawi">evilebottnawi</a></td>
<td align="center"><a href="https://github.com/FloEdelmann">FloEdelmann</a></td>
<td align="center"><a href="https://github.com/kevindew">kevindew</a></td>

@@ -311,0 +312,0 @@ <td align="center"><a href="https://github.com/thibaudcolas">thibaudcolas</a></td>

@@ -39,2 +39,3 @@ "use strict";

"declaration-nested-properties": require("./declaration-nested-properties"),
"declaration-property-value-no-unknown": require("./declaration-property-value-no-unknown"),
"dimension-no-non-numeric-values": require("./dimension-no-non-numeric-values"),

@@ -41,0 +42,0 @@ "dollar-variable-colon-newline-after": require("./dollar-variable-colon-newline-after"),

@@ -114,2 +114,13 @@ "use strict";

// Support `nested-property:value { property: value};
while (
pointer &&
isType(pointer, "decl") &&
pointer.isNested &&
pointer.prop
) {
prop = pointer.prop + "-" + prop;
pointer = pointer.parent;
}
if (allValidProperties.has(prop.toLowerCase())) {

@@ -116,0 +127,0 @@ return;

@@ -369,2 +369,6 @@ "use strict";

if (isComparisonOperatorBefore(before)) {
return "sign";
}
if (isAtStart_) {

@@ -978,2 +982,6 @@ // console.log("-, -<sth> or - <sth>")

function isComparisonOperatorBefore(before) {
return before.search(/([><=!]=|[<>])\s+$/) !== -1;
}
/**

@@ -980,0 +988,0 @@ * Checks if the input string is a hex color value

@@ -39,2 +39,36 @@ "use strict";

/**
* Checks if the value is a function
* @param {unknown} value
* @returns {value is Function}
*/
function isFunctionCall(value) {
const functionCallPattern = /[a-zA-Z0-9_-]+\s*\(\s*(.*)\s*\)/g;
return functionCallPattern.test(value);
}
/**
* Checks if the value is a if statement.
* @param {unknown} value
* @returns {value is IfStatement}
*/
function isIfStatement(value) {
const ifStatementPattern = /if\s*\(\s*(.*)\s*\)/g;
return ifStatementPattern.test(value);
}
/**
* Checks if the value is a ${var-name}.
* @param {unknown} value
* @returns {value is variable}
*/
const isDollarVar = value => value.length > 0 && value[0] === "$";
/**
* Checks if the selector is nested property.
* @param {unknown} selector
* @returns {selector is variable}
*/
const isNestedProperty = selector => selector[selector.length - 1] === ":";
module.exports = {

@@ -44,3 +78,7 @@ isBoolean,

isRegExp,
isString
isString,
isFunctionCall,
isDollarVar,
isIfStatement,
isNestedProperty
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc