stylelint-scss
Advanced tools
Comparing version 3.3.2 to 3.4.0
@@ -0,1 +1,6 @@ | ||
# 3.4.0 | ||
- Added: `at-mixin-argumentless-call-parentheses` autofix (#280). | ||
- Fixed: `partial-no-import` correctly handle import parameters with urls (#283). | ||
# 3.3.2 | ||
@@ -2,0 +7,0 @@ |
@@ -8,3 +8,3 @@ "use strict"; | ||
exports.default = function (value) { | ||
exports.default = function (value, _, context) { | ||
return function (root, result) { | ||
@@ -29,2 +29,11 @@ var validOptions = _stylelint.utils.validateOptions(result, ruleName, { | ||
if (context.fix) { | ||
if (value === "always") { | ||
mixinCall.params = mixinCall.params + " ()"; | ||
} else { | ||
mixinCall.params = mixinCall.params.replace(/\s*\([\s\S]*?\)$/, ""); | ||
} | ||
return; | ||
} | ||
var mixinName = /\s*(\S*?)\s*(?:\(|$)/.exec(mixinCall.params)[1]; | ||
@@ -31,0 +40,0 @@ |
@@ -29,4 +29,4 @@ "use strict"; | ||
// Skipping importing CSS: url(), ".css", URI with a protocol, media | ||
if (pathStripped.slice(0, 4) === "url(" || pathStripped.slice(-4) === ".css" || pathStripped.search("//") !== -1 || pathStripped.search(/(?:\s|[,)"'])\w+$/) !== -1) { | ||
// Skipping importing empty import, CSS: url(), ".css", URI with a protocol, media | ||
if (pathStripped.trim() === "" || pathStripped.slice(0, 4) === "url(" || pathStripped.slice(-4) === ".css" || pathStripped.search("//") !== -1 || pathStripped.search(/(?:\s|[,)"'])\w+$/) !== -1) { | ||
return; | ||
@@ -38,2 +38,3 @@ } | ||
node: decl, | ||
index: decl.params.indexOf(path), | ||
result: result, | ||
@@ -56,3 +57,3 @@ ruleName: ruleName | ||
// Processing comma-separated lists of import paths | ||
mixinCall.params.split(",").forEach(function (path) { | ||
mixinCall.params.split(/["']\s*,/).forEach(function (path) { | ||
checkImportForCSS(path, mixinCall); | ||
@@ -64,2 +65,6 @@ }); | ||
var _path = require("path"); | ||
var _path2 = _interopRequireDefault(_path); | ||
var _stylelint = require("stylelint"); | ||
@@ -69,6 +74,2 @@ | ||
var _path = require("path"); | ||
var _path2 = _interopRequireDefault(_path); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -75,0 +76,0 @@ |
@@ -10,2 +10,4 @@ "use strict"; | ||
var _lodash = require("lodash"); | ||
var _postcssValueParser = require("postcss-value-parser"); | ||
@@ -15,4 +17,2 @@ | ||
var _lodash = require("lodash"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -65,3 +65,3 @@ | ||
}, []); | ||
return (0, _lodash.first)(keyVal); | ||
return (0, _lodash.head)(keyVal); | ||
} | ||
@@ -76,5 +76,5 @@ | ||
return (0, _lodash.first)(parsed.nodes.map(function (node) { | ||
return (0, _lodash.head)(parsed.nodes.map(function (node) { | ||
return groupByKeyValue(node.nodes).map(mapToKeyValue); | ||
})); | ||
} |
{ | ||
"name": "stylelint-scss", | ||
"description": "A collection of SCSS specific rules for stylelint", | ||
"version": "3.3.2", | ||
"version": "3.4.0", | ||
"author": "Krister Kari", | ||
@@ -15,7 +15,7 @@ "babel": { | ||
"dependencies": { | ||
"lodash": "^4.17.10", | ||
"lodash": "^4.17.11", | ||
"postcss-media-query-parser": "^0.2.3", | ||
"postcss-resolve-nested-selector": "^0.1.1", | ||
"postcss-selector-parser": "^4.0.0", | ||
"postcss-value-parser": "^3.3.0" | ||
"postcss-value-parser": "^3.3.1" | ||
}, | ||
@@ -25,21 +25,22 @@ "devDependencies": { | ||
"babel-core": "^6.26.3", | ||
"babel-plugin-istanbul": "^4.1.6", | ||
"babel-plugin-istanbul": "^5.1.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-jest": "^23.0.1", | ||
"coveralls": "^3.0.1", | ||
"eslint": "^5.0.1", | ||
"eslint-config-stylelint": "^8.1.0", | ||
"babel-preset-jest": "^23.2.0", | ||
"coveralls": "^3.0.2", | ||
"eslint": "^5.7.0", | ||
"eslint-config-stylelint": "^9.0.0", | ||
"eslint-plugin-lodash": "^3.1.0", | ||
"eslint-plugin-sort-requires": "^2.1.0", | ||
"husky": "^0.14.3", | ||
"jest": "^23.1.0", | ||
"jest-cli": "^23.1.0", | ||
"lint-staged": "^7.2.0", | ||
"npmpub": "^4.0.1", | ||
"postcss": "^7.0.1", | ||
"husky": "^1.1.2", | ||
"jest": "^23.6.0", | ||
"jest-cli": "^23.6.0", | ||
"lint-staged": "^7.3.0", | ||
"npmpub": "^4.1.0", | ||
"postcss": "^7.0.5", | ||
"postcss-scss": "^2.0.0", | ||
"prettier": "^1.13.5", | ||
"request": "^2.87.0", | ||
"prettier": "^1.14.3", | ||
"request": "^2.88.0", | ||
"rimraf": "^2.6.2", | ||
"semver": "^5.5.0", | ||
"stylelint": "^9.3.0" | ||
"semver": "^5.6.0", | ||
"stylelint": "^9.6.0" | ||
}, | ||
@@ -64,3 +65,4 @@ "peerDependencies": { | ||
"plugins": [ | ||
"sort-requires" | ||
"sort-requires", | ||
"lodash" | ||
], | ||
@@ -85,3 +87,11 @@ "globals": { | ||
"prefer-const": "error", | ||
"template-curly-spacing": "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" | ||
} | ||
@@ -145,3 +155,2 @@ }, | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"milestone": "node scripts/update-milestone.js", | ||
"prebuild": "rimraf dist", | ||
@@ -148,0 +157,0 @@ "build": "babel src --out-dir dist", |
@@ -52,3 +52,3 @@ # stylelint-scss | ||
Here are stylelint-scss' rules, grouped by the [*thing*](http://apps.workflower.fi/vocabs/css/en) they apply to (just like in [stylelint](http://stylelint.io/user-guide/about-rules/)). | ||
Here are stylelint-scss' rules, grouped by the [_thing_](http://apps.workflower.fi/vocabs/css/en) they apply to (just like in [stylelint](http://stylelint.io/user-guide/about-rules/)). | ||
@@ -87,3 +87,3 @@ Please also see the [example configs](./docs/examples/) for special cases. | ||
- [`at-mixin-argumentless-call-parentheses`](./src/rules/at-mixin-argumentless-call-parentheses/README.md): Require or disallow parentheses in argumentless `@mixin` calls. | ||
- [`at-mixin-argumentless-call-parentheses`](./src/rules/at-mixin-argumentless-call-parentheses/README.md): Require or disallow parentheses in argumentless `@mixin` calls (Autofixable). | ||
- [`at-mixin-named-arguments`](./src/rules/at-mixin-named-arguments/README.md): Require named parameters in at-mixin call rule. | ||
@@ -149,10 +149,10 @@ - [`at-mixin-parentheses-space-before`](./src/rules/at-mixin-parentheses-space-before/README.md): Require or disallow a space before `@mixin` parentheses (Autofixable). | ||
* 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)"). | ||
* Improve documentation. | ||
* Chime in on any open issue or pull request. | ||
* Open new issues about your ideas on new rules, or for how to improve the existing ones, and pull requests to show us how your idea works. | ||
* Add new tests to absolutely anything. | ||
* Work on improving performance of rules. | ||
* Contribute to [stylelint](https://github.com/stylelint/stylelint) | ||
* Spread the word. | ||
- 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)"). | ||
- Improve documentation. | ||
- Chime in on any open issue or pull request. | ||
- Open new issues about your ideas on new rules, or for how to improve the existing ones, and pull requests to show us how your idea works. | ||
- Add new tests to absolutely anything. | ||
- Work on improving performance of rules. | ||
- Contribute to [stylelint](https://github.com/stylelint/stylelint) | ||
- Spread the word. | ||
@@ -163,2 +163,73 @@ We communicate via [issues](https://github.com/kristerkari/stylelint-scss/issues) and [pull requests](https://github.com/kristerkari/stylelint-scss/pulls). | ||
## Contributors | ||
Thanks goes to these wonderful people: | ||
<table> | ||
<thead> | ||
<tr> | ||
<th style="text-align:center"><a href="https://github.com/dryoma"><img alt="dryoma" src="https://avatars2.githubusercontent.com/u/11942776?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/kristerkari"><img alt="kristerkari" src="https://avatars0.githubusercontent.com/u/993108?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/evilebottnawi"><img alt="evilebottnawi" src="https://avatars3.githubusercontent.com/u/4567934?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/OriR"><img alt="OriR" src="https://avatars3.githubusercontent.com/u/2384068?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/ntwb"><img alt="ntwb" src="https://avatars2.githubusercontent.com/u/1016458?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/thibaudcolas"><img alt="thibaudcolas" src="https://avatars1.githubusercontent.com/u/877585?v=4&s=80" width="80"></a></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td style="text-align:center"><a href="https://github.com/dryoma">dryoma</a></td> | ||
<td style="text-align:center"><a href="https://github.com/kristerkari">kristerkari</a></td> | ||
<td style="text-align:center"><a href="https://github.com/evilebottnawi">evilebottnawi</a></td> | ||
<td style="text-align:center"><a href="https://github.com/OriR">OriR</a></td> | ||
<td style="text-align:center"><a href="https://github.com/ntwb">ntwb</a></td> | ||
<td style="text-align:center"><a href="https://github.com/thibaudcolas">thibaudcolas</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th style="text-align:center"><a href="https://github.com/AndyOGo"><img alt="AndyOGo" src="https://avatars1.githubusercontent.com/u/914443?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/diego-codes"><img alt="diego-codes" src="https://avatars0.githubusercontent.com/u/5973294?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/lithiumlron"><img alt="lithiumlron" src="https://avatars3.githubusercontent.com/u/8573405?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/jeddy3"><img alt="jeddy3" src="https://avatars0.githubusercontent.com/u/808227?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/stormwarning"><img alt="stormwarning" src="https://avatars1.githubusercontent.com/u/999825?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/keegan-lillo"><img alt="keegan-lillo" src="https://avatars0.githubusercontent.com/u/3537963?v=4&s=80" width="80"></a></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td style="text-align:center"><a href="https://github.com/AndyOGo">AndyOGo</a></td> | ||
<td style="text-align:center"><a href="https://github.com/diego-codes">diego-codes</a></td> | ||
<td style="text-align:center"><a href="https://github.com/lithiumlron">lithiumlron</a></td> | ||
<td style="text-align:center"><a href="https://github.com/jeddy3">jeddy3</a></td> | ||
<td style="text-align:center"><a href="https://github.com/stormwarning">stormwarning</a></td> | ||
<td style="text-align:center"><a href="https://github.com/keegan-lillo">keegan-lillo</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th style="text-align:center"><a href="https://github.com/mbarzda"><img alt="mbarzda" src="https://avatars1.githubusercontent.com/u/2003850?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/manovotny"><img alt="manovotny" src="https://avatars2.githubusercontent.com/u/446260?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/YozhikM"><img alt="YozhikM" src="https://avatars0.githubusercontent.com/u/27273025?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/YodaDaCoda"><img alt="YodaDaCoda" src="https://avatars0.githubusercontent.com/u/365349?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/freezy-sk"><img alt="freezy-sk" src="https://avatars0.githubusercontent.com/u/661637?v=4&s=80" width="80"></a></th> | ||
<th style="text-align:center"><a href="https://github.com/niksy"><img alt="niksy" src="https://avatars3.githubusercontent.com/u/389286?v=4&s=80" width="80"></a></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td style="text-align:center"><a href="https://github.com/mbarzda">mbarzda</a></td> | ||
<td style="text-align:center"><a href="https://github.com/manovotny">manovotny</a></td> | ||
<td style="text-align:center"><a href="https://github.com/YozhikM">YozhikM</a></td> | ||
<td style="text-align:center"><a href="https://github.com/YodaDaCoda">YodaDaCoda</a></td> | ||
<td style="text-align:center"><a href="https://github.com/freezy-sk">freezy-sk</a></td> | ||
<td style="text-align:center"><a href="https://github.com/niksy">niksy</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
## Important documents | ||
@@ -165,0 +236,0 @@ |
@@ -66,1 +66,5 @@ # at-else-empty-line-before | ||
``` | ||
## Caveats | ||
If you use autofix, this rule could clash with [`at-mixin-parentheses-space-before`](https://github.com/kristerkari/stylelint-scss/tree/master/src/rules/at-mixin-parentheses-space-before) rule. |
@@ -11,2 +11,4 @@ # at-mixin-argumentless-call-parentheses | ||
The `--fix` option on the [command line](https://github.com/stylelint/stylelint/blob/master/docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule. | ||
## Options | ||
@@ -13,0 +15,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
259699
4533
236
22
Updatedlodash@^4.17.11
Updatedpostcss-value-parser@^3.3.1