Socket
Socket
Sign inDemoInstall

stylelint-scss

Package Overview
Dependencies
Maintainers
3
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 4.5.0 to 4.6.0

dist/utils/validateTypes.js

5

dist/rules/at-else-closing-brace-newline-after/index.js

@@ -8,5 +8,4 @@ "use strict";

exports.ruleName = exports.meta = exports.messages = void 0;
var _stylelint = require("stylelint");
var _utils = require("../../utils");
var _stylelint = require("stylelint");
var _lodash = require("lodash");
var _atIfClosingBraceNewlineAfter = require("../at-if-closing-brace-newline-after");

@@ -32,3 +31,3 @@ var ruleName = (0, _utils.namespace)("at-else-closing-brace-newline-after");

possible: {
disableFix: _lodash.isBoolean
disableFix: _utils.isBoolean
},

@@ -35,0 +34,0 @@ optional: true

3

dist/rules/at-function-named-arguments/index.js

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

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));

@@ -35,3 +34,3 @@ var _stylelint = require("stylelint");

ignore: ["single-argument"],
ignoreFunctions: [_lodash.isString]
ignoreFunctions: [_utils.isString]
},

@@ -38,0 +37,0 @@ optional: true

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

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _stylelint = require("stylelint");

@@ -26,3 +25,3 @@ var _utils = require("../../utils");

actual: pattern,
possible: [_lodash.isRegExp, _lodash.isString]
possible: [_utils.isRegExp, _utils.isString]
});

@@ -32,3 +31,3 @@ if (!validOptions) {

}
var regexpPattern = (0, _lodash.isString)(pattern) ? new RegExp(pattern) : pattern;
var regexpPattern = (0, _utils.isString)(pattern) ? new RegExp(pattern) : pattern;
root.walkAtRules(function (decl) {

@@ -35,0 +34,0 @@ if (decl.name !== "function") {

@@ -9,5 +9,4 @@ "use strict";

exports.sassConditionalBraceNLAfterChecker = sassConditionalBraceNLAfterChecker;
var _stylelint = require("stylelint");
var _utils = require("../../utils");
var _stylelint = require("stylelint");
var _lodash = require("lodash");
var ruleName = (0, _utils.namespace)("at-if-closing-brace-newline-after");

@@ -32,3 +31,3 @@ exports.ruleName = ruleName;

possible: {
disableFix: _lodash.isBoolean
disableFix: _utils.isBoolean
},

@@ -35,0 +34,0 @@ optional: true

@@ -8,6 +8,5 @@ "use strict";

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _path = _interopRequireDefault(require("path"));
var _stylelint = require("stylelint");
var _utils = require("../../utils");
var _path = _interopRequireDefault(require("path"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -31,3 +30,3 @@ var ruleName = (0, _utils.namespace)("at-import-partial-extension-blacklist");

actual: blacklistOption,
possible: [_lodash.isString, _lodash.isRegExp]
possible: [_utils.isString, _utils.isRegExp]
});

@@ -54,3 +53,3 @@ if (!validOptions) {

blacklist.forEach(function (ext) {
if ((0, _lodash.isString)(ext) && extensionNormalized === ext || (0, _lodash.isRegExp)(ext) && extensionNormalized.search(ext) !== -1) {
if ((0, _utils.isString)(ext) && extensionNormalized === ext || (0, _utils.isRegExp)(ext) && extensionNormalized.search(ext) !== -1) {
_stylelint.utils.report({

@@ -57,0 +56,0 @@ message: messages.rejected(extension),

@@ -8,6 +8,5 @@ "use strict";

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _path = _interopRequireDefault(require("path"));
var _stylelint = require("stylelint");
var _utils = require("../../utils");
var _path = _interopRequireDefault(require("path"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -31,3 +30,3 @@ var ruleName = (0, _utils.namespace)("at-import-partial-extension-whitelist");

actual: whitelistOption,
possible: [_lodash.isString, _lodash.isRegExp]
possible: [_utils.isString, _utils.isRegExp]
});

@@ -54,3 +53,3 @@ if (!validOptions) {

if (whitelist.some(function (ext) {
return (0, _lodash.isString)(ext) && extensionNormalized === ext || (0, _lodash.isRegExp)(ext) && extensionNormalized.search(ext) !== -1;
return (0, _utils.isString)(ext) && extensionNormalized === ext || (0, _utils.isRegExp)(ext) && extensionNormalized.search(ext) !== -1;
})) {

@@ -57,0 +56,0 @@ return;

@@ -15,3 +15,3 @@ "use strict";

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var ruleName = (0, _utils.namespace)("at-mixin-named-arguments");

@@ -18,0 +18,0 @@ exports.ruleName = ruleName;

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

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _stylelint = require("stylelint");

@@ -26,3 +25,3 @@ var _utils = require("../../utils");

actual: pattern,
possible: [_lodash.isRegExp, _lodash.isString]
possible: [_utils.isRegExp, _utils.isString]
});

@@ -32,3 +31,3 @@ if (!validOptions) {

}
var regexpPattern = (0, _lodash.isString)(pattern) ? new RegExp(pattern) : pattern;
var regexpPattern = (0, _utils.isString)(pattern) ? new RegExp(pattern) : pattern;
root.walkAtRules(function (decl) {

@@ -35,0 +34,0 @@ if (decl.name !== "mixin") {

@@ -15,3 +15,3 @@ "use strict";

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var ruleName = (0, _utils.namespace)("at-rule-conditional-no-parentheses");

@@ -18,0 +18,0 @@ exports.ruleName = ruleName;

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

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _stylelint = require("stylelint");

@@ -34,3 +33,3 @@ var _utils = require("../../utils");

possible: {
ignoreAtRules: [_lodash.isRegExp, _lodash.isString]
ignoreAtRules: [_utils.isRegExp, _utils.isString]
},

@@ -37,0 +36,0 @@ optional: true

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

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _stylelint = require("stylelint");

@@ -36,3 +35,3 @@ var _utils = require("../../utils");

possible: {
disableFix: _lodash.isBoolean
disableFix: _utils.isBoolean
},

@@ -62,3 +61,3 @@ optional: true

var propPlusColon = decl.toString().slice(0, endOfPropIndex);
var _loop = function _loop(i, l) {
var _loop = function _loop() {
if (propPlusColon[i] !== ":") {

@@ -92,3 +91,3 @@ return "continue";

for (var i = 0, l = propPlusColon.length; i < l; i++) {
var _ret = _loop(i, l);
var _ret = _loop();
if (_ret === "continue") continue;

@@ -95,0 +94,0 @@ if (_ret === "break") break;

@@ -8,5 +8,4 @@ "use strict";

exports.ruleName = exports.meta = exports.messages = void 0;
var _stylelint = require("stylelint");
var _utils = require("../../utils");
var _stylelint = require("stylelint");
var _lodash = require("lodash");
var ruleName = (0, _utils.namespace)("dollar-variable-empty-line-after");

@@ -33,3 +32,3 @@ exports.ruleName = ruleName;

ignore: ["before-comment", "inside-single-line-block"],
disableFix: _lodash.isBoolean
disableFix: _utils.isBoolean
},

@@ -36,0 +35,0 @@ optional: true

@@ -8,5 +8,4 @@ "use strict";

exports.ruleName = exports.meta = exports.messages = void 0;
var _stylelint = require("stylelint");
var _utils = require("../../utils");
var _stylelint = require("stylelint");
var _lodash = require("lodash");
var ruleName = (0, _utils.namespace)("dollar-variable-empty-line-before");

@@ -33,3 +32,3 @@ exports.ruleName = ruleName;

ignore: ["after-comment", "inside-single-line-block", "after-dollar-variable"],
disableFix: _lodash.isBoolean
disableFix: _utils.isBoolean
},

@@ -36,0 +35,0 @@ optional: true

@@ -12,3 +12,3 @@ "use strict";

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var ruleName = (0, _utils.namespace)("dollar-variable-first-in-block");

@@ -15,0 +15,0 @@ exports.ruleName = ruleName;

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

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _stylelint = require("stylelint");

@@ -26,3 +25,3 @@ var _utils = require("../../utils");

actual: pattern,
possible: [_lodash.isRegExp, _lodash.isString]
possible: [_utils.isRegExp, _utils.isString]
}, {

@@ -38,3 +37,3 @@ actual: options,

}
var regexpPattern = (0, _lodash.isString)(pattern) ? new RegExp(pattern) : pattern;
var regexpPattern = (0, _utils.isString)(pattern) ? new RegExp(pattern) : pattern;
root.walkDecls(function (decl) {

@@ -41,0 +40,0 @@ var prop = decl.prop;

@@ -8,5 +8,4 @@ "use strict";

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
var _stylelint = require("stylelint");
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
var _utils = require("../../utils");

@@ -17,4 +16,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

@@ -69,3 +68,3 @@ var ruleToCheckAgainst = "function-no-unknown";

possible: {
ignoreFunctions: [_lodash.isString, _lodash.isRegExp]
ignoreFunctions: [_utils.isString, _utils.isRegExp]
},

@@ -72,0 +71,0 @@ optional: true

@@ -9,7 +9,6 @@ "use strict";

var _stylelint = require("stylelint");
var _lodash = require("lodash");
var _utils = require("../../utils");
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var ruleName = (0, _utils.namespace)("no-duplicate-dollar-variables");

@@ -35,4 +34,4 @@ exports.ruleName = ruleName;

ignoreInside: ["at-rule", "nested-at-rule"],
ignoreInsideAtRules: [_lodash.isString],
ignoreDefaults: [_lodash.isBoolean]
ignoreInsideAtRules: [_utils.isString],
ignoreDefaults: [_utils.isBoolean]
},

@@ -39,0 +38,0 @@ optional: true

@@ -15,4 +15,4 @@ "use strict";

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

@@ -19,0 +19,0 @@ var interpolationPrefix = /^#{\s*/m;

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

exports.ruleName = exports.meta = exports.messages = void 0;
var _lodash = require("lodash");
var _postcssResolveNestedSelector = _interopRequireDefault(require("postcss-resolve-nested-selector"));

@@ -30,3 +29,3 @@ var _stylelint = require("stylelint");

actual: pattern,
possible: [_lodash.isRegExp, _lodash.isString]
possible: [_utils.isRegExp, _utils.isString]
});

@@ -36,3 +35,3 @@ if (!validOptions) {

}
var placeholderPattern = (0, _lodash.isString)(pattern) ? new RegExp(pattern) : pattern;
var placeholderPattern = (0, _utils.isString)(pattern) ? new RegExp(pattern) : pattern;

@@ -39,0 +38,0 @@ // Checking placeholder definitions (looking among regular rules)

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

var _optionsMatches = _interopRequireDefault(require("stylelint/lib/utils/optionsMatches"));
var _lodash = require("lodash");
var _utils = require("../../utils");

@@ -31,3 +30,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

possible: {
ignoreKeywords: [_lodash.isString, _lodash.isRegExp]
ignoreKeywords: [_utils.isString, _utils.isRegExp]
},

@@ -34,0 +33,0 @@ optional: true

@@ -12,3 +12,3 @@ "use strict";

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
/**

@@ -15,0 +15,0 @@ * @see https://sass-lang.com/documentation/modules#global-functions

@@ -280,2 +280,14 @@ "use strict";

var _moduleNamespace = require("./moduleNamespace");
var _validateTypes = require("./validateTypes");
Object.keys(_validateTypes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _validateTypes[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _validateTypes[key];
}
});
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -7,3 +7,4 @@ "use strict";

exports["default"] = _default;
var _lodash = require("lodash");
var _dlv = _interopRequireDefault(require("dlv"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**

@@ -16,5 +17,5 @@ * Check whether a Node is a custom property set

function _default(node) {
var prop = (0, _lodash.get)(node, "raws.prop.raw", node.prop);
var value = (0, _lodash.get)(node, "raws.value.raw", node.value);
var prop = (0, _dlv["default"])(node, "raws.prop.raw", node.prop);
var value = (0, _dlv["default"])(node, "raws.value.raw", node.value);
return node.type === "decl" && prop.startsWith("--") && value.startsWith("{") && value.endsWith("}");
}

@@ -7,3 +7,3 @@ "use strict";

exports["default"] = _default;
var _lodash = require("lodash");
var _dlv = _interopRequireDefault(require("dlv"));
var _isCustomPropertySet = _interopRequireDefault(require("./isCustomPropertySet"));

@@ -20,3 +20,3 @@ var _isStandardSelector = _interopRequireDefault(require("./isStandardSelector"));

// Get full selector
var selector = (0, _lodash.get)(rule, "raws.selector.raw", rule.selector);
var selector = (0, _dlv["default"])(rule, "raws.selector.raw", rule.selector);
if (!(0, _isStandardSelector["default"])(rule.selector)) {

@@ -23,0 +23,0 @@ return false;

@@ -10,4 +10,4 @@ "use strict";

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

@@ -14,0 +14,0 @@ var revision = "master";

{
"name": "stylelint-scss",
"description": "A collection of SCSS specific rules for Stylelint",
"version": "4.5.0",
"description": "A collection of SCSS-specific rules for Stylelint",
"version": "4.6.0",
"author": "Krister Kari",
"babel": {
"presets": [
"@babel/env"
]
"repository": "stylelint-scss/stylelint-scss",
"license": "MIT",
"main": "dist/index.js",
"peerDependencies": {
"stylelint": "^14.5.1 || ^15.0.0"
},
"dependencies": {
"lodash": "^4.17.21",
"dlv": "^1.1.3",
"postcss-media-query-parser": "^0.2.3",
"postcss-resolve-nested-selector": "^0.1.1",
"postcss-selector-parser": "^6.0.6",
"postcss-value-parser": "^4.1.0"
"postcss-selector-parser": "^6.0.11",
"postcss-value-parser": "^4.2.0"
},
"devDependencies": {
"@babel/cli": "^7.15.7",
"@babel/core": "^7.15.8",
"@babel/preset-env": "^7.15.8",
"@babel/cli": "^7.21.0",
"@babel/core": "^7.21.3",
"@babel/preset-env": "^7.20.2",
"babel-plugin-istanbul": "^6.1.1",
"babel-preset-jest": "^29.4.2",
"eslint": "^8.19.0",
"eslint-plugin-lodash": "^7.3.0",
"babel-preset-jest": "^29.5.0",
"eslint": "^8.36.0",
"github-contributors-list": "^1.2.5",
"husky": "^8.0.1",
"jest": "^29.4.2",
"jest-cli": "^29.4.2",
"jest-preset-stylelint": "^6.0.0",
"lint-staged": "^13.0.3",
"np": "^7.5.0",
"postcss": "^8.3.11",
"husky": "^8.0.3",
"jest": "^29.5.0",
"jest-cli": "^29.5.0",
"jest-preset-stylelint": "^6.1.0",
"lint-staged": "^13.2.0",
"np": "^7.6.4",
"postcss": "^8.4.21",
"postcss-less": "^6.0.0",
"postcss-scss": "^4.0.1",
"prettier": "^2.7.1",
"rimraf": "^4.1.1",
"stylelint": "^15.0.0"
"postcss-scss": "^4.0.6",
"prettier": "^2.8.7",
"rimraf": "^4.4.1",
"stylelint": "^15.3.0"
},
"peerDependencies": {
"stylelint": "^14.5.1 || ^15.0.0"
},
"eslintConfig": {
"extends": [
"eslint:recommended"
],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 6
},
"env": {
"es6": true,
"jest": true,
"node": true
},
"plugins": [
"lodash"
],
"globals": {
"dedent": true,
"testRule": true
},
"rules": {
"eqeqeq": "error",
"no-use-before-define": [
"error",
"nofunc"
],
"strict": [
"error",
"global"
],
"arrow-spacing": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-const": "error",
"template-curly-spacing": "error",
"lodash/callback-binding": "error",
"lodash/collection-method-value": "error",
"lodash/collection-return": "error",
"lodash/no-double-unwrap": "error",
"lodash/no-extra-args": "error",
"lodash/no-unbound-this": "error",
"lodash/unwrap": "error",
"lodash/preferred-alias": "error"
}
},
"files": [

@@ -97,44 +49,6 @@ "dist/**/*.js",

"linter",
"scss",
"stylelint",
"stylelint-plugin"
],
"license": "MIT",
"main": "dist/index.js",
"repository": "stylelint-scss/stylelint-scss",
"jest": {
"preset": "jest-preset-stylelint",
"clearMocks": true,
"collectCoverage": false,
"collectCoverageFrom": [
"src/**/*.js"
],
"coverageDirectory": "./.coverage/",
"coverageReporters": [
"lcov",
"text"
],
"coverageThreshold": {
"global": {
"branches": 75,
"functions": 75,
"lines": 75,
"statements": 75
}
},
"setupFiles": [
"./jest-setup.js"
],
"testEnvironment": "node",
"roots": [
"src"
],
"testRegex": ".*\\.test\\.js$|src/.*/__tests__/.*\\.js$"
},
"prettier": {
"trailingComma": "none",
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"arrowParens": "avoid"
},
"scripts": {

@@ -155,8 +69,3 @@ "prebuild": "rimraf dist",

"prepare": "husky install"
},
"lint-staged": {
"**/*.{js,json}": [
"prettier --write"
]
}
}
# stylelint-scss
[![npm version](https://img.shields.io/npm/v/stylelint-scss.svg)](https://www.npmjs.com/package/stylelint-scss)
[![Build Status](https://github.com/stylelint-scss/stylelint-scss/workflows/Tests/badge.svg)](https://github.com/stylelint-scss/stylelint-scss/actions?workflow=Tests)
[![Coverage Status](https://img.shields.io/coveralls/github/stylelint-scss/stylelint-scss/master.svg)](https://coveralls.io/github/stylelint-scss/stylelint-scss?branch=master)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
[![Downloads per month](https://img.shields.io/npm/dm/stylelint-scss.svg)](https://npmcharts.com/compare/stylelint-scss)
[![npm version](https://img.shields.io/npm/v/stylelint-scss?logo=npm&logoColor=fff)](https://www.npmjs.com/package/stylelint-scss)
[![Build Status](https://img.shields.io/github/actions/workflow/status/stylelint-scss/stylelint-scss/test.yml?branch=master&label=tests&logo=github)](https://github.com/stylelint-scss/stylelint-scss/actions?workflow=Tests)
[![Coverage Status](https://img.shields.io/coveralls/github/stylelint-scss/stylelint-scss/master?logo=coveralls&logoColor=fff)](https://coveralls.io/github/stylelint-scss/stylelint-scss?branch=master)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen?style=flat)](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)
[![Downloads per month](https://img.shields.io/npm/dm/stylelint-scss)](https://npmcharts.com/compare/stylelint-scss)
A collection of SCSS specific linting rules for [Stylelint](https://github.com/stylelint/stylelint) (in a form of a plugin).
A collection of SCSS-specific linting rules for [Stylelint](https://github.com/stylelint/stylelint) (in a form of a plugin).
## Purpose
Stylelint by itself supports [SCSS syntax](https://stylelint.io/user-guide/css-processors#parsing-non-standard-syntax) very well (as well as other preprocessors' syntaxes). Moreover, it introduces some specific rules that can be used to lint SCSS, e.g. to limit [`nesting`](https://stylelint.io/user-guide/rules/max-nesting-depth), control the way [`@-rules`](https://stylelint.io/user-guide/rules#at-rule) are written. Yet stylelint is in general focused on standard CSS.
Stylelint by itself supports [SCSS syntax](https://stylelint.io/user-guide/get-started) very well (as well as other preprocessors' syntaxes). Moreover, it introduces some specific rules that can be used to lint SCSS, e.g. to limit [`nesting`](https://stylelint.io/user-guide/rules/max-nesting-depth), control the way [`@-rules`](https://stylelint.io/user-guide/rules#at-rule) are written. Yet Stylelint is in general focused on standard CSS.
stylelint-scss introduces rules specific to SCSS syntax. That said, the rules from this plugin can be used with other syntaxes, like Less or some PostCSS syntaxes. That's why the rules' names are not tied to SCSS only (`at-function-pattern` instead of `scss-function-pattern`).
The plugin follows stylelint's guidelines (about [rule names](https://stylelint.io/user-guide/about-rules), testing and [so on](https://github.com/stylelint/stylelint/tree/master/docs/developer-guide)).
The plugin follows Stylelint's guidelines (about [rule names](https://stylelint.io/user-guide/rules), testing and [so on](https://github.com/stylelint/stylelint/tree/main/docs/developer-guide)).

@@ -23,5 +23,5 @@ ## Installation and usage

However, the plugin can still be used in you're crafting a config from the ground up. First, install stylelint-scss (and stylelint, if you haven't done so yet) via NPM:
However, the plugin can still be used in you're crafting a config from the ground up. First, install `stylelint-scss` (and `stylelint`, if you haven't done so yet) via npm:
```
```sh
npm install stylelint stylelint-scss

@@ -41,4 +41,3 @@ ```

"scss/at-rule-no-unknown": true,
...
...
// ...
// any other rules you'd want to change e.g.

@@ -51,7 +50,7 @@ "scss/dollar-variable-pattern": "^foo",

Please refer to [stylelint docs](https://stylelint.io/user-guide/get-started) for the detailed info on using this linter.
Please refer to [Stylelint docs](https://stylelint.io/user-guide/get-started) for detailed info on using this linter.
## List of rules
Here are stylelint-scss' rules, grouped by the [_thing_](http://apps.workflower.fi/vocabs/css/en) they apply to (just like in [stylelint](https://stylelint.io/user-guide/about-rules)).
Here are stylelint-scss' rules, grouped by the _thing_ they apply to (just like in [Stylelint](https://stylelint.io/user-guide/rules)).

@@ -91,4 +90,4 @@ Please also see the [example configs](./docs/examples/) for special cases.

- [`at-import-partial-extension`](./src/rules/at-import-partial-extension/README.md): Require or disallow extension in `@import` commands (Autofixable).
- [`at-import-partial-extension-blacklist`](./src/rules/at-import-partial-extension-blacklist/README.md): Specify blacklist of disallowed file extensions for partial names in `@import` commands.
- [`at-import-partial-extension-whitelist`](./src/rules/at-import-partial-extension-whitelist/README.md): Specify whitelist of allowed file extensions for partial names in `@import` commands.
- [`at-import-partial-extension-blacklist`](./src/rules/at-import-partial-extension-blacklist/README.md): Specify a blacklist of disallowed file extensions for partial names in `@import` commands.
- [`at-import-partial-extension-whitelist`](./src/rules/at-import-partial-extension-whitelist/README.md): Specify a whitelist of allowed file extensions for partial names in `@import` commands.

@@ -105,3 +104,3 @@ ### `@`-mixin

- [`at-rule-conditional-no-parentheses`](./src/rules/at-rule-conditional-no-parentheses/README.md): Disallow parentheses in conditional @ rules (if, elsif, while) (Autofixable).
- [`at-rule-no-unknown`](./src/rules/at-rule-no-unknown/README.md): Disallow unknown at-rules. Should be used **instead of** stylelint's [at-rule-no-unknown](https://stylelint.io/user-guide/rules/at-rule-no-unknown).
- [`at-rule-no-unknown`](./src/rules/at-rule-no-unknown/README.md): Disallow unknown at-rules. Should be used **instead of** Stylelint's [at-rule-no-unknown](https://stylelint.io/user-guide/rules/at-rule-no-unknown).

@@ -143,3 +142,3 @@ ### `@`-use

- [`declaration-nested-properties`](./src/rules/declaration-nested-properties/README.md): Require or disallow properties with `-` in their names to be in a form of a nested group.
- [`declaration-nested-properties-no-divided-groups`](./src/rules/declaration-nested-properties-no-divided-groups/README.md): Disallow nested properties of the same "namespace" be divided into multiple groups.
- [`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.

@@ -190,5 +189,5 @@ ### Dimension

There work on the plugin's rules is still in progress, so if you feel like it, you're welcome to help out in any of these (the plugin follows stylelint guidelines so most part of this is based on its docs):
The work on the plugin's rules is still in progress, so if you feel like it, you're welcome to help out with any of these (the plugin follows Stylelint guidelines so most of this is based on its docs):
- Create, enhance, and debug rules (see stylelint's guide to "[Working on rules](https://github.com/stylelint/stylelint/blob/master/docs/developer-guide/rules.md)").
- Create, enhance, and debug rules (see Stylelint's guide to "[Working on rules](https://github.com/stylelint/stylelint/blob/main/docs/developer-guide/rules.md)").
- Improve documentation.

@@ -199,3 +198,3 @@ - Chime in on any open issue or pull request.

- Work on improving performance of rules.
- Contribute to [stylelint](https://github.com/stylelint/stylelint)
- Contribute to [Stylelint](https://github.com/stylelint/stylelint)
- Spread the word.

@@ -205,3 +204,3 @@

There is also [stackoverflow](https://stackoverflow.com/questions/tagged/stylelint), which would be the preferred QA forum.
There is also [StackOverflow](https://stackoverflow.com/questions/tagged/stylelint), which would be the preferred QA forum.

@@ -208,0 +207,0 @@ ## Contributors

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