stylelint-scss
Advanced tools
Comparing version 1.3.4 to 1.4.0
@@ -0,1 +1,16 @@ | ||
# 1.4.0 | ||
- Added: `at-else-closing-brace-newline-after` rule. | ||
- Added: `at-else-closing-brace-space-after` rule. | ||
- Added: `at-if-closing-brace-newline-after` rule. | ||
- Added: `at-if-closing-brace-space-after` rule. | ||
- Added: `at-else-empty-line-before` rule. | ||
- Added: `declaration-nested-properties` rule. | ||
- Added: `declaration-nested-properties-no-divided-groups` rule. | ||
- Added: `dollar-variable-empty-line-before` rule. | ||
- Added: `ignore: "local"|"global"` to the `dollar-variable-pattern` rule. | ||
- Added: `docs` folder to `npm` package. | ||
- Removed: `src` folder from `npm` package. | ||
- Removed: NodeJS 0.12.x support, stylelint-scss now requires NodeJS > 4.2.1 LTS or greater | ||
# 1.3.4 | ||
@@ -2,0 +17,0 @@ |
@@ -49,6 +49,6 @@ "use strict"; | ||
function variableColonSpaceChecker(_ref) { | ||
var locationChecker = _ref.locationChecker; | ||
var root = _ref.root; | ||
var result = _ref.result; | ||
var checkedRuleName = _ref.checkedRuleName; | ||
var locationChecker = _ref.locationChecker, | ||
root = _ref.root, | ||
result = _ref.result, | ||
checkedRuleName = _ref.checkedRuleName; | ||
@@ -55,0 +55,0 @@ root.walkDecls(function (decl) { |
@@ -20,4 +20,4 @@ "use strict"; | ||
node.walkDecls(function (decl) { | ||
var prop = decl.prop; | ||
var value = decl.value; | ||
var prop = decl.prop, | ||
value = decl.value; | ||
@@ -55,5 +55,5 @@ | ||
function report(node, value) { | ||
var name = node.name; | ||
var prop = node.prop; | ||
var type = node.type; | ||
var name = node.name, | ||
prop = node.prop, | ||
type = node.type; | ||
@@ -60,0 +60,0 @@ var nodeName = isAtRule(type) ? "@" + name : prop; |
@@ -8,3 +8,3 @@ "use strict"; | ||
exports.default = function (pattern) { | ||
exports.default = function (pattern, options) { | ||
return function (root, result) { | ||
@@ -14,2 +14,8 @@ var validOptions = _stylelint.utils.validateOptions(result, ruleName, { | ||
possible: [_lodash.isRegExp, _lodash.isString] | ||
}, { | ||
actual: options, | ||
possible: { | ||
ignore: ["local", "global"] | ||
}, | ||
optional: true | ||
}); | ||
@@ -25,5 +31,10 @@ if (!validOptions) { | ||
if (prop[0] !== "$") { | ||
return; | ||
} | ||
// If local or global variables need to be ignored | ||
if ((0, _utils.optionsHaveIgnored)(options, "global") && decl.parent.type === "root" || (0, _utils.optionsHaveIgnored)(options, "local") && decl.parent.type !== "root") { | ||
return; | ||
} | ||
if (regexpPattern.test(prop.slice(1))) { | ||
@@ -30,0 +41,0 @@ return; |
@@ -11,2 +11,14 @@ "use strict"; | ||
var _atElseClosingBraceNewlineAfter = require("./at-else-closing-brace-newline-after"); | ||
var _atElseClosingBraceNewlineAfter2 = _interopRequireDefault(_atElseClosingBraceNewlineAfter); | ||
var _atElseClosingBraceSpaceAfter = require("./at-else-closing-brace-space-after"); | ||
var _atElseClosingBraceSpaceAfter2 = _interopRequireDefault(_atElseClosingBraceSpaceAfter); | ||
var _atElseEmptyLineBefore = require("./at-else-empty-line-before"); | ||
var _atElseEmptyLineBefore2 = _interopRequireDefault(_atElseEmptyLineBefore); | ||
var _atFunctionPattern = require("./at-function-pattern"); | ||
@@ -16,2 +28,10 @@ | ||
var _atIfClosingBraceNewlineAfter = require("./at-if-closing-brace-newline-after"); | ||
var _atIfClosingBraceNewlineAfter2 = _interopRequireDefault(_atIfClosingBraceNewlineAfter); | ||
var _atIfClosingBraceSpaceAfter = require("./at-if-closing-brace-space-after"); | ||
var _atIfClosingBraceSpaceAfter2 = _interopRequireDefault(_atIfClosingBraceSpaceAfter); | ||
var _atImportNoPartialExtension = require("./at-import-no-partial-extension"); | ||
@@ -45,2 +65,10 @@ | ||
var _declarationNestedProperties = require("./declaration-nested-properties"); | ||
var _declarationNestedProperties2 = _interopRequireDefault(_declarationNestedProperties); | ||
var _declarationNestedPropertiesNoDividedGroups = require("./declaration-nested-properties-no-divided-groups"); | ||
var _declarationNestedPropertiesNoDividedGroups2 = _interopRequireDefault(_declarationNestedPropertiesNoDividedGroups); | ||
var _dollarVariableColonNewlineAfter = require("./dollar-variable-colon-newline-after"); | ||
@@ -58,2 +86,6 @@ | ||
var _dollarVariableEmptyLineBefore = require("./dollar-variable-empty-line-before"); | ||
var _dollarVariableEmptyLineBefore2 = _interopRequireDefault(_dollarVariableEmptyLineBefore); | ||
var _dollarVariableNoMissingInterpolation = require("./dollar-variable-no-missing-interpolation"); | ||
@@ -111,3 +143,8 @@ | ||
"at-extend-no-missing-placeholder": _atExtendNoMissingPlaceholder2.default, | ||
"at-else-closing-brace-newline-after": _atElseClosingBraceNewlineAfter2.default, | ||
"at-else-closing-brace-space-after": _atElseEmptyLineBefore2.default, | ||
"at-else-empty-line-before": _atElseClosingBraceSpaceAfter2.default, | ||
"at-function-pattern": _atFunctionPattern2.default, | ||
"at-if-closing-brace-newline-after": _atIfClosingBraceNewlineAfter2.default, | ||
"at-if-closing-brace-space-after": _atIfClosingBraceSpaceAfter2.default, | ||
"at-import-no-partial-extension": _atImportNoPartialExtension2.default, | ||
@@ -120,5 +157,8 @@ "at-import-no-partial-leading-underscore": _atImportNoPartialLeadingUnderscore2.default, | ||
"at-mixin-pattern": _atMixinPattern2.default, | ||
"declaration-nested-properties": _declarationNestedProperties2.default, | ||
"declaration-nested-properties-no-divided-groups": _declarationNestedPropertiesNoDividedGroups2.default, | ||
"dollar-variable-colon-newline-after": _dollarVariableColonNewlineAfter2.default, | ||
"dollar-variable-colon-space-after": _dollarVariableColonSpaceAfter2.default, | ||
"dollar-variable-colon-space-before": _dollarVariableColonSpaceBefore2.default, | ||
"dollar-variable-empty-line-before": _dollarVariableEmptyLineBefore2.default, | ||
"dollar-variable-no-missing-interpolation": _dollarVariableNoMissingInterpolation2.default, | ||
@@ -125,0 +165,0 @@ "dollar-variable-pattern": _dollarVariablePattern2.default, |
@@ -43,8 +43,8 @@ "use strict"; | ||
function checkNewlineBefore(_ref) { | ||
var string = _ref.string; | ||
var globalIndex = _ref.globalIndex; | ||
var startIndex = _ref.startIndex; | ||
var endIndex = _ref.endIndex; | ||
var node = _ref.node; | ||
var result = _ref.result; | ||
var string = _ref.string, | ||
globalIndex = _ref.globalIndex, | ||
startIndex = _ref.startIndex, | ||
endIndex = _ref.endIndex, | ||
node = _ref.node, | ||
result = _ref.result; | ||
@@ -51,0 +51,0 @@ var symbol = string.substring(startIndex, endIndex + 1); |
@@ -43,8 +43,8 @@ "use strict"; | ||
function checkNewlineBefore(_ref) { | ||
var string = _ref.string; | ||
var globalIndex = _ref.globalIndex; | ||
var startIndex = _ref.startIndex; | ||
var endIndex = _ref.endIndex; | ||
var node = _ref.node; | ||
var result = _ref.result; | ||
var string = _ref.string, | ||
globalIndex = _ref.globalIndex, | ||
startIndex = _ref.startIndex, | ||
endIndex = _ref.endIndex, | ||
node = _ref.node, | ||
result = _ref.result; | ||
@@ -51,0 +51,0 @@ var symbol = string.substring(startIndex, endIndex + 1); |
@@ -52,8 +52,8 @@ "use strict"; | ||
function checkSpaces(_ref) { | ||
var string = _ref.string; | ||
var globalIndex = _ref.globalIndex; | ||
var startIndex = _ref.startIndex; | ||
var endIndex = _ref.endIndex; | ||
var node = _ref.node; | ||
var result = _ref.result; | ||
var string = _ref.string, | ||
globalIndex = _ref.globalIndex, | ||
startIndex = _ref.startIndex, | ||
endIndex = _ref.endIndex, | ||
node = _ref.node, | ||
result = _ref.result; | ||
@@ -114,5 +114,5 @@ var symbol = string.substring(startIndex, endIndex + 1); | ||
function calculationOperatorSpaceChecker(_ref2) { | ||
var root = _ref2.root; | ||
var result = _ref2.result; | ||
var checker = _ref2.checker; | ||
var root = _ref2.root, | ||
result = _ref2.result, | ||
checker = _ref2.checker; | ||
@@ -119,0 +119,0 @@ |
@@ -55,4 +55,4 @@ "use strict"; | ||
fullSelector.walkTags(function (compoundSelector) { | ||
var value = compoundSelector.value; | ||
var sourceIndex = compoundSelector.sourceIndex; | ||
var value = compoundSelector.value, | ||
sourceIndex = compoundSelector.sourceIndex; | ||
@@ -59,0 +59,0 @@ if (value[0] !== "%") { |
@@ -7,2 +7,9 @@ "use strict"; | ||
exports.default = findCommentsInRaws; | ||
var _lodash = require("lodash"); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
@@ -161,3 +168,3 @@ * Finds comments, both CSS comments and double slash ones, in a CSS string | ||
comment.inlineBefore = rawString.substring(i + 2).search(/^\s*?\S+\s*?\n/) !== -1; | ||
result.push(Object.assign({}, comment)); | ||
result.push(_lodash2.default.assign({}, comment)); | ||
comment = {}; | ||
@@ -189,3 +196,3 @@ // Skip the next loop as the / in */ is already checked | ||
comment.inlineBefore = false; | ||
result.push(Object.assign({}, comment)); | ||
result.push(_lodash2.default.assign({}, comment)); | ||
comment = {}; | ||
@@ -192,0 +199,0 @@ // Compensate for the `*/` added by postcss-scss |
@@ -16,11 +16,20 @@ "use strict"; | ||
var _configurationError = require("./configurationError"); | ||
var _beforeBlockString = require("./beforeBlockString"); | ||
Object.defineProperty(exports, "configurationError", { | ||
Object.defineProperty(exports, "beforeBlockString", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_configurationError).default; | ||
return _interopRequireDefault(_beforeBlockString).default; | ||
} | ||
}); | ||
var _blockString = require("./blockString"); | ||
Object.defineProperty(exports, "blockString", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_blockString).default; | ||
} | ||
}); | ||
var _declarationValueIndex = require("./declarationValueIndex"); | ||
@@ -53,2 +62,20 @@ | ||
var _hasBlock = require("./hasBlock"); | ||
Object.defineProperty(exports, "hasBlock", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_hasBlock).default; | ||
} | ||
}); | ||
var _hasEmptyLine = require("./hasEmptyLine"); | ||
Object.defineProperty(exports, "hasEmptyLine", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_hasEmptyLine).default; | ||
} | ||
}); | ||
var _isInlineComment = require("./isInlineComment"); | ||
@@ -90,2 +117,11 @@ | ||
var _isStandardSyntaxProperty = require("./isStandardSyntaxProperty"); | ||
Object.defineProperty(exports, "isStandardSyntaxProperty", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_isStandardSyntaxProperty).default; | ||
} | ||
}); | ||
var _isWhitespace = require("./isWhitespace"); | ||
@@ -127,2 +163,11 @@ | ||
var _parseNestedPropRoot = require("./parseNestedPropRoot"); | ||
Object.defineProperty(exports, "parseNestedPropRoot", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_parseNestedPropRoot).default; | ||
} | ||
}); | ||
var _parseSelector = require("./parseSelector"); | ||
@@ -146,2 +191,11 @@ | ||
var _rawNodeString = require("./rawNodeString"); | ||
Object.defineProperty(exports, "rawNodeString", { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_rawNodeString).default; | ||
} | ||
}); | ||
var _whitespaceChecker = require("./whitespaceChecker"); | ||
@@ -148,0 +202,0 @@ |
@@ -29,6 +29,6 @@ "use strict"; | ||
function findOperators(_ref) { | ||
var string = _ref.string; | ||
var globalIndex = _ref.globalIndex; | ||
var isAfterColon = _ref.isAfterColon; | ||
var callback = _ref.callback; | ||
var string = _ref.string, | ||
globalIndex = _ref.globalIndex, | ||
isAfterColon = _ref.isAfterColon, | ||
callback = _ref.callback; | ||
@@ -35,0 +35,0 @@ |
@@ -40,11 +40,11 @@ "use strict"; | ||
function before(_ref) { | ||
var source = _ref.source; | ||
var index = _ref.index; | ||
var err = _ref.err; | ||
var errTarget = _ref.errTarget; | ||
var lineCheckStr = _ref.lineCheckStr; | ||
var _ref$onlyOneChar = _ref.onlyOneChar; | ||
var onlyOneChar = _ref$onlyOneChar === undefined ? false : _ref$onlyOneChar; | ||
var _ref$allowIndentation = _ref.allowIndentation; | ||
var allowIndentation = _ref$allowIndentation === undefined ? false : _ref$allowIndentation; | ||
var source = _ref.source, | ||
index = _ref.index, | ||
err = _ref.err, | ||
errTarget = _ref.errTarget, | ||
lineCheckStr = _ref.lineCheckStr, | ||
_ref$onlyOneChar = _ref.onlyOneChar, | ||
onlyOneChar = _ref$onlyOneChar === undefined ? false : _ref$onlyOneChar, | ||
_ref$allowIndentation = _ref.allowIndentation, | ||
allowIndentation = _ref$allowIndentation === undefined ? false : _ref$allowIndentation; | ||
@@ -95,9 +95,9 @@ activeArgs = { source: source, index: index, err: err, errTarget: errTarget, onlyOneChar: onlyOneChar, allowIndentation: allowIndentation }; | ||
function after(_ref2) { | ||
var source = _ref2.source; | ||
var index = _ref2.index; | ||
var err = _ref2.err; | ||
var errTarget = _ref2.errTarget; | ||
var lineCheckStr = _ref2.lineCheckStr; | ||
var _ref2$onlyOneChar = _ref2.onlyOneChar; | ||
var onlyOneChar = _ref2$onlyOneChar === undefined ? false : _ref2$onlyOneChar; | ||
var source = _ref2.source, | ||
index = _ref2.index, | ||
err = _ref2.err, | ||
errTarget = _ref2.errTarget, | ||
lineCheckStr = _ref2.lineCheckStr, | ||
_ref2$onlyOneChar = _ref2.onlyOneChar, | ||
onlyOneChar = _ref2$onlyOneChar === undefined ? false : _ref2$onlyOneChar; | ||
@@ -146,3 +146,3 @@ activeArgs = { source: source, index: index, err: err, errTarget: errTarget, onlyOneChar: onlyOneChar }; | ||
function expectBefore() { | ||
var messageFunc = arguments.length <= 0 || arguments[0] === undefined ? messages.expectedBefore : arguments[0]; | ||
var messageFunc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : messages.expectedBefore; | ||
@@ -154,5 +154,5 @@ if (activeArgs.allowIndentation) { | ||
var _activeArgs = activeArgs; | ||
var source = _activeArgs.source; | ||
var index = _activeArgs.index; | ||
var _activeArgs = activeArgs, | ||
source = _activeArgs.source, | ||
index = _activeArgs.index; | ||
@@ -192,7 +192,7 @@ var oneCharBefore = source[index - 1]; | ||
function expectBeforeAllowingIndentation() { | ||
var messageFunc = arguments.length <= 0 || arguments[0] === undefined ? messages.expectedBefore : arguments[0]; | ||
var _activeArgs2 = activeArgs; | ||
var source = _activeArgs2.source; | ||
var index = _activeArgs2.index; | ||
var err = _activeArgs2.err; | ||
var messageFunc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : messages.expectedBefore; | ||
var _activeArgs2 = activeArgs, | ||
source = _activeArgs2.source, | ||
index = _activeArgs2.index, | ||
err = _activeArgs2.err; | ||
@@ -219,6 +219,6 @@ var expectedChar = function () { | ||
function rejectBefore() { | ||
var messageFunc = arguments.length <= 0 || arguments[0] === undefined ? messages.rejectedBefore : arguments[0]; | ||
var _activeArgs3 = activeArgs; | ||
var source = _activeArgs3.source; | ||
var index = _activeArgs3.index; | ||
var messageFunc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : messages.rejectedBefore; | ||
var _activeArgs3 = activeArgs, | ||
source = _activeArgs3.source, | ||
index = _activeArgs3.index; | ||
@@ -237,6 +237,6 @@ var oneCharBefore = source[index - 1]; | ||
function expectAfter() { | ||
var messageFunc = arguments.length <= 0 || arguments[0] === undefined ? messages.expectedAfter : arguments[0]; | ||
var _activeArgs4 = activeArgs; | ||
var source = _activeArgs4.source; | ||
var index = _activeArgs4.index; | ||
var messageFunc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : messages.expectedAfter; | ||
var _activeArgs4 = activeArgs, | ||
source = _activeArgs4.source, | ||
index = _activeArgs4.index; | ||
@@ -279,6 +279,6 @@ | ||
function rejectAfter() { | ||
var messageFunc = arguments.length <= 0 || arguments[0] === undefined ? messages.rejectedAfter : arguments[0]; | ||
var _activeArgs5 = activeArgs; | ||
var source = _activeArgs5.source; | ||
var index = _activeArgs5.index; | ||
var messageFunc = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : messages.rejectedAfter; | ||
var _activeArgs5 = activeArgs, | ||
source = _activeArgs5.source, | ||
index = _activeArgs5.index; | ||
@@ -285,0 +285,0 @@ var oneCharAfter = index + 1 < source.length ? source[index + 1] : ""; |
{ | ||
"name": "stylelint-scss", | ||
"description": "A collection of SCSS specific rules for stylelint", | ||
"version": "1.3.4", | ||
"version": "1.4.0", | ||
"author": "Krister Kari", | ||
@@ -16,3 +16,3 @@ "babel": { | ||
"lodash": "^4.11.1", | ||
"postcss-media-query-parser": "^0.1.0", | ||
"postcss-media-query-parser": "^0.2.3", | ||
"postcss-resolve-nested-selector": "^0.1.1", | ||
@@ -24,8 +24,10 @@ "postcss-selector-parser": "^2.0.0", | ||
"devDependencies": { | ||
"babel-cli": "^6.6.5", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-tape-runner": "^2.0.1", | ||
"babel-cli": "^6.14.0", | ||
"babel-preset-es2015": "^6.14.0", | ||
"babel-register": "^6.14.0", | ||
"coveralls": "^2.11.14", | ||
"eslint": "^2.3.0", | ||
"eslint-config-stylelint": "^1.0.0", | ||
"npmpub": "^3.0.3", | ||
"nyc": "^8.3.1", | ||
"postcss": "^5.0.21", | ||
@@ -38,4 +40,9 @@ "postcss-scss": "^0.1.7", | ||
"stylelint-test-rule-tape": "^0.2.0", | ||
"tape": "^4.5.1" | ||
"table": "3.7.9", | ||
"tap-spec": "^4.1.1", | ||
"tape": "^4.6.0" | ||
}, | ||
"engines": { | ||
"node": ">=4.2.1" | ||
}, | ||
"eslintConfig": { | ||
@@ -53,3 +60,4 @@ "extends": "stylelint", | ||
"dist", | ||
"src", | ||
"docs", | ||
"src/**/README.md", | ||
"!**/__tests__" | ||
@@ -73,2 +81,3 @@ ], | ||
"scripts": { | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"milestone": "node scripts/update-milestone.js", | ||
@@ -81,4 +90,6 @@ "prebuild": "rimraf dist", | ||
"release": "npmpub", | ||
"test": "babel-tape-runner \"src/**/__tests__/*.js\"" | ||
"test": "nyc tape -r babel-register \"src/**/__tests__/*.js\" | tap-spec", | ||
"test-rule": "node ./scripts/test-rule.js", | ||
"test-util": "node ./scripts/test-util.js" | ||
} | ||
} |
# stylelint-scss | ||
[![NPM version](https://img.shields.io/npm/v/stylelint-scss.svg)](https://www.npmjs.org/package/stylelint-scss) | ||
[![NPM version](https://img.shields.io/npm/v/stylelint-scss.svg)](https://www.npmjs.com/package/stylelint-scss) | ||
[![Build Status](https://travis-ci.org/kristerkari/stylelint-scss.svg?branch=master)](https://travis-ci.org/kristerkari/stylelint-scss) | ||
[![Build status](https://ci.appveyor.com/api/projects/status/xa12kju6qmvmqs1n/branch/master?svg=true)](https://ci.appveyor.com/project/kristerkari/stylelint-scss/branch/master) | ||
[![v1.3.0 progress](http://progressed.io/bar/100?title=v1.3.0)](https://github.com/kristerkari/stylelint-scss/milestones/1.3.0) | ||
[![Coverage Status](https://coveralls.io/repos/github/kristerkari/stylelint-scss/badge.svg?branch=master)](https://coveralls.io/github/kristerkari/stylelint-scss?branch=master) | ||
[![v1.4.0 progress](http://progressed.io/bar/33?title=v1.4.0)](https://github.com/kristerkari/stylelint-scss/milestones/1.4.0) | ||
@@ -20,4 +21,8 @@ A collection of SCSS specific linting rules for [stylelint](https://github.com/stylelint/stylelint) (in a form of a plugin). | ||
stylelint-scss is a plugin for [stylelint](http://stylelint.io/user-guide/), so it's meant to be used with it. First, install stylelint-scss (and stylelint, if you haven't done so yet) via NPM: | ||
stylelint-scss is a plugin for [stylelint](http://stylelint.io/user-guide/), so it's meant to be used with it. | ||
**Node.js v4.2.1 or newer** is required. That's because stylelint itself [doesn't support Node.js versions below 4](https://github.com/stylelint/stylelint/blob/master/package.json#L32). | ||
First, install stylelint-scss (and stylelint, if you haven't done so yet) via NPM: | ||
``` | ||
@@ -48,2 +53,10 @@ npm install stylelint stylelint-scss | ||
Please also see the [example configs](./docs/examples/) for special cases. | ||
### `@`-else | ||
- [`at-else-closing-brace-newline-after`](./src/rules/at-else-closing-brace-newline-after/README.md): Require or disallow a newline after the closing brace of `@else` statements. | ||
- [`at-else-closing-brace-space-after`](./src/rules/at-else-closing-brace-space-after/README.md): Require a single space or disallow whitespace after the closing brace of `@else` statements. | ||
- [`at-else-empty-line-before`](./src/rules/at-else-empty-line-before/README.md): Require an empty line or disallow empty lines before `@`-else. | ||
### `@`-extend | ||
@@ -57,2 +70,7 @@ | ||
### `@`-if | ||
- [`at-if-closing-brace-newline-after`](./src/rules/at-if-closing-brace-newline-after/README.md): Require or disallow a newline after the closing brace of `@if` statements. | ||
- [`at-if-closing-brace-space-after`](./src/rules/at-if-closing-brace-space-after/README.md): Require a single space or disallow whitespace after the closing brace of `@if` statements. | ||
### `@`-import | ||
@@ -74,2 +92,3 @@ | ||
- [`dollar-variable-colon-space-before`](./src/rules/dollar-variable-colon-space-before/README.md): Require a single space or disallow whitespace before the colon in `$`-variable declarations. | ||
- [`dollar-variable-empty-line-before`](./src/rules/dollar-variable-empty-line-before/README.md): Require a single empty line or disallow empty lines before `$`-variable declarations. | ||
- [`dollar-variable-no-missing-interpolation`](./src/rules/dollar-variable-no-missing-interpolation/README.md): Disallow Sass variables that are used without interpolation with CSS features that use custom identifiers. | ||
@@ -88,2 +107,7 @@ - [`dollar-variable-pattern`](./src/rules/dollar-variable-pattern/README.md): Specify a pattern for Sass-like variables. | ||
### Declaration | ||
- [`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. | ||
### Media feature | ||
@@ -90,0 +114,0 @@ |
@@ -8,3 +8,3 @@ # at-import-partial-extension-whitelist | ||
/** ↑ | ||
* Blacklist of these */ | ||
* Whitelist of these */ | ||
``` | ||
@@ -11,0 +11,0 @@ |
@@ -30,1 +30,41 @@ # dollar-variable-pattern | ||
``` | ||
## Optional Options | ||
### `ignore: "local"|"global"` | ||
#### `"local"` | ||
Makes this rule ignore local variables (variables defined inside a rule/mixin/function, etc.). | ||
For example, with `/^foo-/`: | ||
The following patterns are *not* considered warnings: | ||
```scss | ||
$foo-name00: 10px; | ||
``` | ||
```scss | ||
a { | ||
$bar-name01: 10px; | ||
} | ||
``` | ||
#### `"global"` | ||
Makes this rule ignore global variables (variables defined in the stylesheet root). | ||
For example, with `/^foo-/`: | ||
The following patterns are *not* considered warnings: | ||
```scss | ||
$bar-name01: 10px; | ||
``` | ||
```scss | ||
a { | ||
$foo-name02: 10px; | ||
} | ||
``` |
@@ -33,2 +33,8 @@ # selector-no-redundant-nesting-selector | ||
```scss | ||
p { | ||
& + .foo {} | ||
} | ||
``` | ||
The following patterns are *not* considered warnings: | ||
@@ -57,7 +63,1 @@ | ||
``` | ||
```scss | ||
p { | ||
& + .foo {} | ||
} | ||
``` |
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
148
211479
18
96
3776
- Removedpostcss-media-query-parser@0.1.0(transitive)