From 848e37222c53c54aedc99660ef34a9fa5ee3044e Mon Sep 17 00:00:00 2001 From: Richard Hallows Date: Wed, 8 Jun 2022 15:14:11 +0100 Subject: [PATCH] Prepare 26.0.0 (#253) * Refactor out redundant no-irregular-whitespace * Add selector-not-notation * Add import-notation * Update deps * Update changelog * Update version number * Update recommended config * Fix order * Fix fixture --- CHANGELOG.md | 7 ++++ README.md | 4 +-- __tests__/valid.css | 4 +-- index.js | 3 +- package-lock.json | 87 +++++++++++++++++++++++++-------------------- package.json | 6 ++-- 6 files changed, 64 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e56a1c..ee1eb85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 26.0.0 + +- Removed: `stylelint` less than `14.9.0` from peer dependencies. +- Changed: updated to [`stylelint-config-recommended@8.0.0`](https://github.com/stylelint/stylelint-config-recommended/releases/tag/8.0.0) +- Added: `import-notation` rule. +- Added: `selector-not-notation` rule. + ## 25.0.0 - Removed: `stylelint` less than `14.4.0` from peer dependencies. diff --git a/README.md b/README.md index b05618d..b77cbea 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ To see the rules that this config uses, please read the [config itself](./index. ```css -@import url("x.css"); -@import url("y.css"); +@import "x.css"; +@import "y.css"; /** * Multi-line comment diff --git a/__tests__/valid.css b/__tests__/valid.css index 0cb490b..46533a3 100644 --- a/__tests__/valid.css +++ b/__tests__/valid.css @@ -1,5 +1,5 @@ -@import url("x.css"); -@import url("y.css"); +@import "x.css"; +@import "y.css"; /** * Multi-line comment diff --git a/index.js b/index.js index cb0e51d..66f3ea4 100644 --- a/index.js +++ b/index.js @@ -86,6 +86,7 @@ module.exports = { 'function-url-quotes': 'always', 'function-whitespace-after': 'always', 'hue-degree-notation': 'angle', + 'import-notation': 'string', indentation: 2, 'keyframes-name-pattern': [ '^([a-z][a-z0-9]*)(-[a-z0-9]+)*$', @@ -108,7 +109,6 @@ module.exports = { 'media-query-list-comma-space-before': 'never', 'no-empty-first-line': true, 'no-eol-whitespace': true, - 'no-irregular-whitespace': true, 'no-missing-end-of-source-newline': true, 'number-leading-zero': 'always', 'number-max-precision': 4, @@ -145,6 +145,7 @@ module.exports = { 'selector-list-comma-space-before': 'never', 'selector-max-empty-lines': 0, 'selector-no-vendor-prefix': true, + 'selector-not-notation': 'complex', 'selector-pseudo-class-case': 'lower', 'selector-pseudo-class-parentheses-space-inside': 'never', 'selector-pseudo-element-case': 'lower', diff --git a/package-lock.json b/package-lock.json index b08d108..44d3432 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "25.0.0", "license": "MIT", "dependencies": { - "stylelint-config-recommended": "^7.0.0" + "stylelint-config-recommended": "^8.0.0" }, "devDependencies": { "@stylelint/prettier-config": "^2.0.0", @@ -23,10 +23,10 @@ "npm-run-all": "^4.1.5", "prettier": "^2.6.2", "remark-cli": "^10.0.1", - "stylelint": "^14.8.5" + "stylelint": "^14.9.0" }, "peerDependencies": { - "stylelint": "^14.4.0" + "stylelint": "^14.9.0" } }, "node_modules/@ampproject/remapping": { @@ -602,6 +602,22 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@csstools/selector-specificity": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.0.0.tgz", + "integrity": "sha512-rZ6vufeY/UjAgtyiJ4WvfF6XP6HizIyOfbZOg0RnecIwjrvH8Am3nN1BpKnnPZunYAkUcPPXDhwbxOtGop8cfQ==", + "engines": { + "node": "^12 || ^14 || >=16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + }, + "peerDependencies": { + "postcss": "^8.3", + "postcss-selector-parser": "^6.0.10" + } + }, "node_modules/@eslint/eslintrc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -2503,9 +2519,9 @@ } }, "node_modules/css-functions-list": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.0.1.tgz", - "integrity": "sha512-PriDuifDt4u4rkDgnqRCLnjfMatufLmWNfQnGCq34xZwpY3oabwhB9SqRBmuvWUgndbemCFlKqg+nO7C2q0SBw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.1.0.tgz", + "integrity": "sha512-/9lCvYZaUbBGvYUgYGFJ4dcYiyqdhSjG7IPVluoV8A1ILjkF7ilmhp1OGUz8n+nmBcu0RNrQAzgD8B6FJbrt2w==", "engines": { "node": ">=12.22" } @@ -10623,14 +10639,6 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" }, - "node_modules/specificity": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", - "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==", - "bin": { - "specificity": "bin/specificity" - } - }, "node_modules/split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", @@ -10866,14 +10874,15 @@ "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=" }, "node_modules/stylelint": { - "version": "14.8.5", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.8.5.tgz", - "integrity": "sha512-e3t4H/hlWlspkcNUrkhf44RU3OpPTA7uBOoREGBzSwdEF+2g/+gbZq7WEpMP7BpopcSe/uLaTvDuL+URL7cdnQ==", + "version": "14.9.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.9.0.tgz", + "integrity": "sha512-+xsQ4uKS56RQs8AGYx2CXc9nhWyPR7c/G0RqyiKgWZx2LuE3VJnIhGRQXUfnGQXOqBPHxNjMCHiK5NNQRB52sw==", "dependencies": { + "@csstools/selector-specificity": "^2.0.0", "balanced-match": "^2.0.0", "colord": "^2.9.2", "cosmiconfig": "^7.0.1", - "css-functions-list": "^3.0.1", + "css-functions-list": "^3.1.0", "debug": "^4.3.4", "execall": "^2.0.0", "fast-glob": "^3.2.11", @@ -10901,7 +10910,6 @@ "postcss-selector-parser": "^6.0.10", "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", - "specificity": "^0.4.1", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", "style-search": "^0.1.0", @@ -10923,11 +10931,11 @@ } }, "node_modules/stylelint-config-recommended": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-7.0.0.tgz", - "integrity": "sha512-yGn84Bf/q41J4luis1AZ95gj0EQwRX8lWmGmBwkwBNSkpGSpl66XcPTulxGa/Z91aPoNGuIGBmFkcM1MejMo9Q==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-8.0.0.tgz", + "integrity": "sha512-IK6dWvE000+xBv9jbnHOnBq01gt6HGVB2ZTsot+QsMpe82doDQ9hvplxfv4YnpEuUwVGGd9y6nbaAnhrjcxhZQ==", "peerDependencies": { - "stylelint": "^14.4.0" + "stylelint": "^14.8.0" } }, "node_modules/stylelint/node_modules/balanced-match": { @@ -12718,6 +12726,12 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@csstools/selector-specificity": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.0.0.tgz", + "integrity": "sha512-rZ6vufeY/UjAgtyiJ4WvfF6XP6HizIyOfbZOg0RnecIwjrvH8Am3nN1BpKnnPZunYAkUcPPXDhwbxOtGop8cfQ==", + "requires": {} + }, "@eslint/eslintrc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", @@ -14209,9 +14223,9 @@ "dev": true }, "css-functions-list": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.0.1.tgz", - "integrity": "sha512-PriDuifDt4u4rkDgnqRCLnjfMatufLmWNfQnGCq34xZwpY3oabwhB9SqRBmuvWUgndbemCFlKqg+nO7C2q0SBw==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.1.0.tgz", + "integrity": "sha512-/9lCvYZaUbBGvYUgYGFJ4dcYiyqdhSjG7IPVluoV8A1ILjkF7ilmhp1OGUz8n+nmBcu0RNrQAzgD8B6FJbrt2w==" }, "cssesc": { "version": "3.0.0", @@ -20192,11 +20206,6 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" }, - "specificity": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", - "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==" - }, "split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", @@ -20361,14 +20370,15 @@ "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=" }, "stylelint": { - "version": "14.8.5", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.8.5.tgz", - "integrity": "sha512-e3t4H/hlWlspkcNUrkhf44RU3OpPTA7uBOoREGBzSwdEF+2g/+gbZq7WEpMP7BpopcSe/uLaTvDuL+URL7cdnQ==", + "version": "14.9.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.9.0.tgz", + "integrity": "sha512-+xsQ4uKS56RQs8AGYx2CXc9nhWyPR7c/G0RqyiKgWZx2LuE3VJnIhGRQXUfnGQXOqBPHxNjMCHiK5NNQRB52sw==", "requires": { + "@csstools/selector-specificity": "^2.0.0", "balanced-match": "^2.0.0", "colord": "^2.9.2", "cosmiconfig": "^7.0.1", - "css-functions-list": "^3.0.1", + "css-functions-list": "^3.1.0", "debug": "^4.3.4", "execall": "^2.0.0", "fast-glob": "^3.2.11", @@ -20396,7 +20406,6 @@ "postcss-selector-parser": "^6.0.10", "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", - "specificity": "^0.4.1", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", "style-search": "^0.1.0", @@ -20473,9 +20482,9 @@ } }, "stylelint-config-recommended": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-7.0.0.tgz", - "integrity": "sha512-yGn84Bf/q41J4luis1AZ95gj0EQwRX8lWmGmBwkwBNSkpGSpl66XcPTulxGa/Z91aPoNGuIGBmFkcM1MejMo9Q==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-8.0.0.tgz", + "integrity": "sha512-IK6dWvE000+xBv9jbnHOnBq01gt6HGVB2ZTsot+QsMpe82doDQ9hvplxfv4YnpEuUwVGGd9y6nbaAnhrjcxhZQ==", "requires": {} }, "supports-color": { diff --git a/package.json b/package.json index bbef439..74878db 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ ] }, "dependencies": { - "stylelint-config-recommended": "^7.0.0" + "stylelint-config-recommended": "^8.0.0" }, "devDependencies": { "@stylelint/prettier-config": "^2.0.0", @@ -59,9 +59,9 @@ "npm-run-all": "^4.1.5", "prettier": "^2.6.2", "remark-cli": "^10.0.1", - "stylelint": "^14.8.5" + "stylelint": "^14.9.0" }, "peerDependencies": { - "stylelint": "^14.4.0" + "stylelint": "^14.9.0" } }