stylelint-scss
Advanced tools
Comparing version 1.4.4 to 1.5.0
@@ -0,1 +1,4 @@ | ||
# 1.5.0 | ||
- Added: `at-rule-no-unknown` rule. | ||
# 1.4.4 | ||
@@ -2,0 +5,0 @@ |
@@ -63,2 +63,6 @@ "use strict"; | ||
var _atRuleNoUnknown = require("./at-rule-no-unknown"); | ||
var _atRuleNoUnknown2 = _interopRequireDefault(_atRuleNoUnknown); | ||
var _declarationNestedProperties = require("./declaration-nested-properties"); | ||
@@ -153,2 +157,3 @@ | ||
"at-mixin-pattern": _atMixinPattern2.default, | ||
"at-rule-no-unknown": _atRuleNoUnknown2.default, | ||
"declaration-nested-properties": _declarationNestedProperties2.default, | ||
@@ -155,0 +160,0 @@ "declaration-nested-properties-no-divided-groups": _declarationNestedPropertiesNoDividedGroups2.default, |
@@ -61,9 +61,8 @@ "use strict"; | ||
value: propValueStr.trim() | ||
}; | ||
// It's a declaration if 1) there is a whitespace after :, or | ||
// 2) the value is a number with/without a unit (starts with a number | ||
// or a dot), or | ||
// 3) the value is a variable (starts with $), or | ||
// 4) the value a string, surprisingly | ||
if (propValue.before === "" && !/^[0-9.$'"]/.test(propValue.value)) { | ||
// It's a declaration if 1) there is a whitespace after :, or | ||
// 2) the value is a number with/without a unit (starts with a number | ||
// or a dot), or | ||
// 3) the value is a variable (starts with $), or | ||
// 4) the value a string, surprisingly | ||
};if (propValue.before === "" && !/^[0-9.$'"]/.test(propValue.value)) { | ||
return null; | ||
@@ -70,0 +69,0 @@ } |
@@ -705,5 +705,5 @@ "use strict"; | ||
function isInterpolationBefore(before) { | ||
var result = { is: false, opsBetween: false }; | ||
// Removing preceding operators if any | ||
var beforeOpsClipped = before.replace(/(\s*[+/*%-])+$/, ""); | ||
var result = { is: false, opsBetween: false | ||
// Removing preceding operators if any | ||
};var beforeOpsClipped = before.replace(/(\s*[+/*%-])+$/, ""); | ||
if (beforeOpsClipped !== before) { | ||
@@ -730,7 +730,7 @@ result.opsBetween = true; | ||
function isValueWithUnitAfter(after) { | ||
var result = { is: false, opsBetween: false }; | ||
// 1px, 0.1p-x, .2p-, 11.2pdf-dfd1f_ | ||
// Again, ` d.10px` - .10px is separated from a sequence | ||
// and is considered a value with a unit | ||
var matches = after.match(/^\s*([+/*%-]\s*)*(\d+(\.\d+){0,1}|\.\d+)[a-zA-Z_0-9-]+(?:$|[)}, ])/); | ||
var result = { is: false, opsBetween: false | ||
// 1px, 0.1p-x, .2p-, 11.2pdf-dfd1f_ | ||
// Again, ` d.10px` - .10px is separated from a sequence | ||
// and is considered a value with a unit | ||
};var matches = after.match(/^\s*([+/*%-]\s*)*(\d+(\.\d+){0,1}|\.\d+)[a-zA-Z_0-9-]+(?:$|[)}, ])/); | ||
if (matches) { | ||
@@ -792,6 +792,6 @@ if (matches[0]) { | ||
function isFunctionAfter(after) { | ||
var result = { is: false, opsBetween: false }; | ||
// `-fn()` is a valid function name, so if a - should be a sign/operator, | ||
// it must have a space after | ||
var matches = after.match(/^\s*(-\s+|[+/*%]\s*)*[a-zA_Z_-][a-zA-Z_0-9-]*\(/); | ||
var result = { is: false, opsBetween: false | ||
// `-fn()` is a valid function name, so if a - should be a sign/operator, | ||
// it must have a space after | ||
};var matches = after.match(/^\s*(-\s+|[+/*%]\s*)*[a-zA_Z_-][a-zA-Z_0-9-]*\(/); | ||
if (matches) { | ||
@@ -798,0 +798,0 @@ if (matches[0]) { |
@@ -26,8 +26,7 @@ # `@if`/`@else` | ||
], | ||
"at-rule-name-space-after": "always", | ||
"rule-non-nested-empty-line-before": "always", | ||
"at-rule-name-space-after": "always", | ||
"rule-empty-line-before": "always", | ||
"scss/at-else-closing-brace-newline-after": "always-last-in-chain", | ||
"scss/at-else-closing-brace-space-after": "always-intermediate", | ||
"scss/at-else-closing-brace-space-after": "always-intermediate", | ||
"scss/at-else-empty-line-before": "never", | ||
"scss/at-if-closing-brace-newline-after": "always-last-in-chain", | ||
@@ -34,0 +33,0 @@ "scss/at-if-closing-brace-space-after": "always-intermediate" |
{ | ||
"name": "stylelint-scss", | ||
"description": "A collection of SCSS specific rules for stylelint", | ||
"version": "1.4.4", | ||
"version": "1.5.0", | ||
"author": "Krister Kari", | ||
@@ -6,0 +6,0 @@ "babel": { |
@@ -84,2 +84,6 @@ # stylelint-scss | ||
### `@`-rule | ||
- [`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](http://stylelint.io/user-guide/rules/at-rule-no-unknown/). | ||
### `$`-variable | ||
@@ -86,0 +90,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
212677
98
3836
152