From ea9b7ca69bbd9b2ca600fe454d70852b0bae19ee Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Wed, 9 Sep 2020 21:42:39 +0900 Subject: [PATCH 01/46] Fix `isKeyframeRule.test.js` that use callbacks (#4922) This is a part of #4881. --- lib/utils/__tests__/isKeyframeRule.test.js | 87 ++++++++++++++-------- 1 file changed, 55 insertions(+), 32 deletions(-) diff --git a/lib/utils/__tests__/isKeyframeRule.test.js b/lib/utils/__tests__/isKeyframeRule.test.js index d45875a212..15115f5ceb 100644 --- a/lib/utils/__tests__/isKeyframeRule.test.js +++ b/lib/utils/__tests__/isKeyframeRule.test.js @@ -5,66 +5,89 @@ const postcss = require('postcss'); describe('isKeyframeRule', () => { it('detects a standard keyframe rule', () => { - rules('@keyframes identifier { to {} }', (rule) => { - expect(isKeyframeRule(rule)).toBeTruthy(); - }); + const nodes = nodesIn('@keyframes identifier { to {} }'); + + expect(nodes).toHaveLength(2); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); + expect(isKeyframeRule(nodes[1])).toBeTruthy(); }); it('detects a mixed-case keyframe rule', () => { - rules('@kEyFrAmEs identifier { to {} }', (rule) => { - expect(isKeyframeRule(rule)).toBeTruthy(); - }); + const nodes = nodesIn('@kEyFrAmEs identifier { to {} }'); + + expect(nodes).toHaveLength(2); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); + expect(isKeyframeRule(nodes[1])).toBeTruthy(); }); it('detects an upper-case keyframe rule', () => { - rules('@KEYFRAMES identifier { to {} }', (rule) => { - expect(isKeyframeRule(rule)).toBeTruthy(); - }); + const nodes = nodesIn('@KEYFRAMES identifier { to {} }'); + + expect(nodes).toHaveLength(2); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); + expect(isKeyframeRule(nodes[1])).toBeTruthy(); }); it('detects a keyframe rule with nested from decl', () => { - rules('@keyframes identifier { from {} }', (rule) => { - expect(isKeyframeRule(rule)).toBeTruthy(); - }); + const nodes = nodesIn('@keyframes identifier { from {} }'); + + expect(nodes).toHaveLength(2); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); + expect(isKeyframeRule(nodes[1])).toBeTruthy(); }); it('detects a keyframe rule with nested percentage decl', () => { - rules('@keyframes identifier { 50% {} }', (rule) => { - expect(isKeyframeRule(rule)).toBeTruthy(); - }); + const nodes = nodesIn('@keyframes identifier { 50% {} }'); + + expect(nodes).toHaveLength(2); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); + expect(isKeyframeRule(nodes[1])).toBeTruthy(); }); it('ignores a normal rule', () => { - rules('a {}', (rule) => { - expect(isKeyframeRule(rule)).toBeFalsy(); - }); + const nodes = nodesIn('a {}'); + + expect(nodes).toHaveLength(1); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); }); it('ignores a normal rule with nested decl', () => { - rules('a { & b {} }', (rule) => { - expect(isKeyframeRule(rule)).toBeFalsy(); - }); + const nodes = nodesIn('a { & b {} }'); + + expect(nodes).toHaveLength(2); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); + expect(isKeyframeRule(nodes[1])).toBeFalsy(); }); it('ignores a normal rule with nested at-rule decl', () => { - rules('a { @nest b & {} }', (rule) => { - expect(isKeyframeRule(rule)).toBeFalsy(); - }); + const nodes = nodesIn('a { @nest b & {} }'); + + expect(nodes).toHaveLength(2); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); + expect(isKeyframeRule(nodes[1])).toBeFalsy(); }); it('ignores an @media', () => { - rules('@media print { a {} }', (rule) => { - expect(isKeyframeRule(rule)).toBeFalsy(); - }); + const nodes = nodesIn('@media print { a {} }'); + + expect(nodes).toHaveLength(2); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); + expect(isKeyframeRule(nodes[1])).toBeFalsy(); }); it('ignores an @supports rule', () => { - rules('@supports (animation-name: test) { a {} }', (rule) => { - expect(isKeyframeRule(rule)).toBeFalsy(); - }); + const nodes = nodesIn('@supports (animation-name: test) { a {} }'); + + expect(nodes).toHaveLength(2); + expect(isKeyframeRule(nodes[0])).toBeFalsy(); + expect(isKeyframeRule(nodes[1])).toBeFalsy(); }); }); -function rules(css, cb) { - postcss.parse(css).walkDecls(cb); +function nodesIn(css) { + const nodes = []; + + postcss.parse(css).walk((node) => nodes.push(node)); + + return nodes; } From 97eb96d71e5c46596cd3c840aced377fc6888e1a Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Wed, 9 Sep 2020 21:43:23 +0900 Subject: [PATCH 02/46] Fix `isLessVariable.test.js` that use callbacks (#4921) This is a part of #4881. --- lib/utils/__tests__/isLessVariable.test.js | 32 ++++++++-------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/lib/utils/__tests__/isLessVariable.test.js b/lib/utils/__tests__/isLessVariable.test.js index a49c83c7cc..09036a330b 100644 --- a/lib/utils/__tests__/isLessVariable.test.js +++ b/lib/utils/__tests__/isLessVariable.test.js @@ -5,42 +5,34 @@ const less = require('postcss-less'); describe('isLessVariable', () => { it('is less variable', () => { - lessAtRules('@var: 10px;', (atRule) => { - expect(isLessVariable(atRule)).toBeTruthy(); - }); + expect(isLessVariable(lessAtRule('@var: 10px;'))).toBeTruthy(); }); it('is less variable with function', () => { - lessAtRules('@hover-color: darken(@color, 10%);', (atRule) => { - expect(isLessVariable(atRule)).toBeTruthy(); - }); + expect(isLessVariable(lessAtRule('@hover-color: darken(@color, 10%);'))).toBeTruthy(); }); it('@charset is not a less variable', () => { - lessAtRules('@charset UTF-8;', (atRule) => { - expect(isLessVariable(atRule)).toBeFalsy(); - }); + expect(isLessVariable(lessAtRule('@charset UTF-8;'))).toBeFalsy(); }); it('@import is not a less variable', () => { - lessAtRules('@import url("some-styles.css");', (atRule) => { - expect(isLessVariable(atRule)).toBeFalsy(); - }); + expect(isLessVariable(lessAtRule('@import url("some-styles.css");'))).toBeFalsy(); }); it('@media is not a less variable', () => { - lessAtRules('@media (min-width: 100px) {};', (atRule) => { - expect(isLessVariable(atRule)).toBeFalsy(); - }); + expect(isLessVariable(lessAtRule('@media (min-width: 100px) {};'))).toBeFalsy(); }); it('detached ruleset is not a less variable', () => { - lessAtRules('@detached-ruleset: { margin: 0 };', (atRule) => { - expect(isLessVariable(atRule)).toBeFalsy(); - }); + expect(isLessVariable(lessAtRule('@detached-ruleset: { margin: 0 };'))).toBeFalsy(); }); }); -function lessAtRules(css, cb) { - less.parse(css).walkAtRules(cb); +function lessAtRule(css) { + const atRules = []; + + less.parse(css).walkAtRules((atRule) => atRules.push(atRule)); + + return atRules[0]; } From 4a4f20c37ee18faa4b12c33dad67534d6137b14a Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Fri, 11 Sep 2020 22:33:12 +0200 Subject: [PATCH 03/46] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6be16ab022..75e18e2861 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project are documented in this file. -## Head +## 13.7.1 - Fixed: double-slash disable comments when followed by another comment ([#4913](https://github.com/stylelint/stylelint/pull/4913)). From c89b2423a5b9e5f9254dd49ae91f0b5ee64d1ae6 Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Fri, 11 Sep 2020 22:36:40 +0200 Subject: [PATCH 04/46] 13.7.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8faf149993..8e436225f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "stylelint", - "version": "13.7.0", + "version": "13.7.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 86c9d87b49..06866c17fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stylelint", - "version": "13.7.0", + "version": "13.7.1", "description": "A mighty, modern CSS linter.", "keywords": [ "css-in-js", From 82a264b07d13ef209b6b5fb2c0a71408116d2934 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Sun, 13 Sep 2020 19:40:55 +0900 Subject: [PATCH 05/46] Fix `isStandardSyntaxRule.test.js` that use callbacks (#4902) --- .../__tests__/isStandardSyntaxRule.test.js | 141 +++++------------- lib/utils/isStandardSyntaxRule.js | 4 + 2 files changed, 43 insertions(+), 102 deletions(-) diff --git a/lib/utils/__tests__/isStandardSyntaxRule.test.js b/lib/utils/__tests__/isStandardSyntaxRule.test.js index 7134d0035d..025ab14a04 100644 --- a/lib/utils/__tests__/isStandardSyntaxRule.test.js +++ b/lib/utils/__tests__/isStandardSyntaxRule.test.js @@ -4,168 +4,105 @@ const isStandardSyntaxRule = require('../isStandardSyntaxRule'); const less = require('postcss-less'); const postcss = require('postcss'); +const node = (code, parser = postcss) => parser.parse(code).first; +const lessNode = (code) => node(code, less); + describe('isStandardSyntaxRule', () => { it('type', () => { - rules('a {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeTruthy(); - }); + expect(isStandardSyntaxRule(node('a {}'))).toBeTruthy(); }); it('when type selector before selector', () => { - rules('when a {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeTruthy(); - }); + expect(isStandardSyntaxRule(node('when a {}'))).toBeTruthy(); }); it('when type selector after selector', () => { - rules('a when {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeTruthy(); - }); + expect(isStandardSyntaxRule(node('a when {}'))).toBeTruthy(); }); it('pseudo-class', () => { - rules('a:last-child {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeTruthy(); - }); + expect(isStandardSyntaxRule(node('a:last-child {}'))).toBeTruthy(); }); it('pseudo-class not', () => { - rules('a:not(.a) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeTruthy(); - }); + expect(isStandardSyntaxRule(node('a:not(.a) {}'))).toBeTruthy(); }); it('pseudo-element', () => { - rules('a::after {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeTruthy(); - }); + expect(isStandardSyntaxRule(node('a::after {}'))).toBeTruthy(); }); it('custom-selector', () => { - rules(':--custom-selector {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeTruthy(); - }); + expect(isStandardSyntaxRule(node(':--custom-selector {}'))).toBeTruthy(); }); it('compound custom-selectors', () => { - rules(':--custom-selector:--custom-selector {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeTruthy(); - }); + expect(isStandardSyntaxRule(node(':--custom-selector:--custom-selector {}'))).toBeTruthy(); }); it('custom-property-set', () => { - rules('--custom-property-set: {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(node('--custom-property-set: {}'))).toBeFalsy(); }); it('Scss nested properties', () => { - rules('foo: {};', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(node('foo: {};'))).toBeFalsy(); }); it('called Less class parametric mixin', () => { - lessRules('.mixin-name(@var);', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.mixin-name(@var);'))).toBeFalsy(); }); it('non-outputting parametric Less class mixin definition', () => { - lessRules('.mixin-name() {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.mixin-name() {}'))).toBeFalsy(); }); it('non-outputting Less class mixin definition', () => { - lessRules('.mixin-name(@a, @b) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.mixin-name(@a, @b) {}'))).toBeFalsy(); }); it('non-outputting parametric Less class mixin definition ending in number', () => { - lessRules('.mixin-name3(@a, @b) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.mixin-name3(@a, @b) {}'))).toBeFalsy(); }); it('non-outputting Less ID mixin definition', () => { - lessRules('#mixin-name() {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('#mixin-name() {}'))).toBeFalsy(); }); it('called Less ID mixin', () => { - lessRules('#mixin-name;', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('#mixin-name;'))).toBeFalsy(); }); it('called namespaced Less mixin (child)', () => { - lessRules('#namespace > .mixin-name;', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('#namespace > .mixin-name;'))).toBeFalsy(); }); it('called namespaced Less mixin (descendant)', () => { - lessRules('#namespace .mixin-name;', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('#namespace .mixin-name;'))).toBeFalsy(); }); it('called namespaced Less mixin (compound)', () => { - lessRules('#namespace.mixin-name;', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('#namespace.mixin-name;'))).toBeFalsy(); }); it('less mixin', () => { - lessRules('.box-shadow(@style, @c) when (iscolor(@c)) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect( + isStandardSyntaxRule(lessNode('.box-shadow(@style, @c) when (iscolor(@c)) {}')), + ).toBeFalsy(); }); it('less extend', () => { - lessRules('&:extend(.inline);', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('&:extend(.inline);'))).toBeFalsy(); }); it('less detached rulesets', () => { - lessRules('@foo: {};', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('@foo: {};'))).toBeFalsy(); }); it('less guarded namespaces', () => { - lessRules('#namespace when (@mode=huge) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('#namespace when (@mode=huge) {}'))).toBeFalsy(); }); it('mixin guards', () => { - lessRules('.mixin (@variable) when (@variable = 10px) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect( + isStandardSyntaxRule(lessNode('.mixin (@variable) when (@variable = 10px) {}')), + ).toBeFalsy(); }); it('css guards', () => { - lessRules('.foo() when (@variable = true) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.foo() when (@variable = true) {}'))).toBeFalsy(); }); it('css guards without spaces', () => { - lessRules('.foo()when(@variable = true) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.foo()when(@variable = true) {}'))).toBeFalsy(); }); it('css guards with multiple spaces', () => { - lessRules('.foo() when (@variable = true) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.foo() when (@variable = true) {}'))).toBeFalsy(); }); it('css guards with newlines', () => { - lessRules('.foo()\nwhen\n(@variable = true) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.foo()\nwhen\n(@variable = true) {}'))).toBeFalsy(); }); - it('css guards with CLRF', () => { - lessRules('.foo()\r\nwhen\r\n(@variable = true) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + it('css guards with CRLF', () => { + expect(isStandardSyntaxRule(lessNode('.foo()\r\nwhen\r\n(@variable = true) {}'))).toBeFalsy(); }); it('css guards with parenthesis', () => { - lessRules('.foo() when (default()) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.foo() when (default()) {}'))).toBeFalsy(); }); it('css guards with not', () => { - lessRules('.foo() when not (@variable = true) {}', (rule) => { - expect(isStandardSyntaxRule(rule)).toBeFalsy(); - }); + expect(isStandardSyntaxRule(lessNode('.foo() when not (@variable = true) {}'))).toBeFalsy(); }); }); - -function rules(css, cb) { - postcss.parse(css).walkRules(cb); -} - -function lessRules(css, cb) { - less.parse(css).walkRules(cb); -} diff --git a/lib/utils/isStandardSyntaxRule.js b/lib/utils/isStandardSyntaxRule.js index 038deeeecb..2ab8d3944a 100644 --- a/lib/utils/isStandardSyntaxRule.js +++ b/lib/utils/isStandardSyntaxRule.js @@ -11,6 +11,10 @@ const isStandardSyntaxSelector = require('../utils/isStandardSyntaxSelector'); * @returns {boolean} */ module.exports = function (rule) { + if (rule.type !== 'rule') { + return false; + } + // Get full selector const selector = _.get(rule, 'raws.selector.raw', rule.selector); From 6e1ab1c26c001ee0a80886ba79f965a22364332b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 13 Sep 2020 11:41:46 +0100 Subject: [PATCH 06/46] Bump typescript from 3.9.7 to 4.0.2 (#4914) * Bump typescript from 3.9.7 to 4.0.2 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.7 to 4.0.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.7...v4.0.2) Signed-off-by: dependabot-preview[bot] * Fix type errors in `lib/utils/whitespaceChecker.js` Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> --- lib/utils/whitespaceChecker.js | 31 ++++++++++++++++++++++++++----- package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/lib/utils/whitespaceChecker.js b/lib/utils/whitespaceChecker.js index 2402f42a9d..c7e7ca31de 100644 --- a/lib/utils/whitespaceChecker.js +++ b/lib/utils/whitespaceChecker.js @@ -225,7 +225,9 @@ module.exports = function (targetWhitespace, expectation, messages) { } } - activeArgs.err(messageFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); + const msgFunc = assertFunction(messageFunc); + + activeArgs.err(msgFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); } /** @@ -250,7 +252,9 @@ module.exports = function (targetWhitespace, expectation, messages) { continue; } - err(messageFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); + const msgFunc = assertFunction(messageFunc); + + err(msgFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); return; } @@ -267,7 +271,9 @@ module.exports = function (targetWhitespace, expectation, messages) { const oneCharBefore = source[index - 1]; if (isValue(oneCharBefore) && isWhitespace(oneCharBefore)) { - activeArgs.err(messageFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); + const msgFunc = assertFunction(messageFunc); + + activeArgs.err(msgFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); } } @@ -315,7 +321,9 @@ module.exports = function (targetWhitespace, expectation, messages) { } } - activeArgs.err(messageFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); + const msgFunc = assertFunction(messageFunc); + + activeArgs.err(msgFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); } /** @@ -329,7 +337,9 @@ module.exports = function (targetWhitespace, expectation, messages) { const oneCharAfter = source[index + 1]; if (isValue(oneCharAfter) && isWhitespace(oneCharAfter)) { - activeArgs.err(messageFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); + const msgFunc = assertFunction(messageFunc); + + activeArgs.err(msgFunc(activeArgs.errTarget ? activeArgs.errTarget : source[index])); } } @@ -347,3 +357,14 @@ module.exports = function (targetWhitespace, expectation, messages) { function isValue(x) { return x !== undefined && x !== null; } + +/** + * @param {unknown} x + */ +function assertFunction(x) { + if (typeof x === 'function') { + return x; + } + + throw new Error(`\`${x}\` must be a function`); +} diff --git a/package-lock.json b/package-lock.json index 8e436225f1..190dfb86f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9352,9 +9352,9 @@ } }, "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", + "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", "dev": true }, "unherit": { diff --git a/package.json b/package.json index 06866c17fe..cdcfe3806d 100644 --- a/package.json +++ b/package.json @@ -193,7 +193,7 @@ "postcss-import": "^12.0.1", "prettier": "^2.1.1", "remark-cli": "^8.0.1", - "typescript": "^3.9.6" + "typescript": "^4.0.2" }, "engines": { "node": ">=10.13.0" From 528c06d0ce4b30a695778b1be31ca8e406ed158a Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Sun, 13 Sep 2020 19:42:48 +0900 Subject: [PATCH 07/46] Add `@types/postcss-less` (#4920) This is a part of #4496 and improves type-checking about LESS. (fixing `// @ts-ignore`) https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/postcss-less --- lib/utils/isLessVariable.js | 8 +++++--- lib/utils/isStandardSyntaxAtRule.js | 8 +++----- lib/utils/isStandardSyntaxDeclaration.js | 5 ++--- lib/utils/isStandardSyntaxRule.js | 5 ++--- package-lock.json | 9 +++++++++ package.json | 1 + types/global.d.ts | 1 - 7 files changed, 22 insertions(+), 15 deletions(-) diff --git a/lib/utils/isLessVariable.js b/lib/utils/isLessVariable.js index 3231adaa05..aeb8ce3969 100644 --- a/lib/utils/isLessVariable.js +++ b/lib/utils/isLessVariable.js @@ -3,10 +3,12 @@ const hasBlock = require('./hasBlock'); /** - * @param {import('postcss').AtRule} atRule + * @param {import('postcss').AtRule | import('postcss-less').AtRule} atRule * @returns {boolean} */ module.exports = function (atRule) { - // @ts-ignore TODO TYPES LESS property variable does not exists in types - return (atRule.type === 'atrule' && atRule.variable && !hasBlock(atRule)) || false; + return ( + (atRule.type === 'atrule' && 'variable' in atRule && atRule.variable && !hasBlock(atRule)) || + false + ); }; diff --git a/lib/utils/isStandardSyntaxAtRule.js b/lib/utils/isStandardSyntaxAtRule.js index 98afdc6bf7..a874f40549 100644 --- a/lib/utils/isStandardSyntaxAtRule.js +++ b/lib/utils/isStandardSyntaxAtRule.js @@ -3,7 +3,7 @@ /** * Check whether a at-rule is standard * - * @param {import('postcss').AtRule} atRule postcss at-rule node + * @param {import('postcss').AtRule | import('postcss-less').AtRule} atRule postcss at-rule node * @return {boolean} If `true`, the declaration is standard */ module.exports = function (atRule) { @@ -13,15 +13,13 @@ module.exports = function (atRule) { } // Ignore Less mixins - // @ts-ignore TODO TYPES Is this property really exists? - if (atRule.mixin) { + if ('mixin' in atRule && atRule.mixin) { return false; } // Ignore Less detached ruleset `@detached-ruleset: { background: red; }; .top { @detached-ruleset(); }` if ( - // @ts-ignore TODO TYPES Is this property really exists? - atRule.variable || + ('variable' in atRule && atRule.variable) || (!atRule.nodes && atRule.raws.afterName === '' && atRule.params[0] === '(') ) { return false; diff --git a/lib/utils/isStandardSyntaxDeclaration.js b/lib/utils/isStandardSyntaxDeclaration.js index 7c6cc2e41e..7362513502 100644 --- a/lib/utils/isStandardSyntaxDeclaration.js +++ b/lib/utils/isStandardSyntaxDeclaration.js @@ -13,7 +13,7 @@ function isStandardSyntaxLang(lang) { /** * Check whether a declaration is standard * - * @param {import('postcss').Declaration} decl + * @param {import('postcss').Declaration | import('postcss-less').Declaration} decl */ module.exports = function (decl) { const prop = decl.prop; @@ -53,8 +53,7 @@ module.exports = function (decl) { } // Less &:extend - // @ts-ignore TODO TYPES extend does not exists - if (decl.extend) { + if ('extend' in decl && decl.extend) { return false; } diff --git a/lib/utils/isStandardSyntaxRule.js b/lib/utils/isStandardSyntaxRule.js index 2ab8d3944a..bca92da849 100644 --- a/lib/utils/isStandardSyntaxRule.js +++ b/lib/utils/isStandardSyntaxRule.js @@ -7,7 +7,7 @@ const isStandardSyntaxSelector = require('../utils/isStandardSyntaxSelector'); /** * Check whether a Node is a standard rule * - * @param {import('postcss').Rule} rule + * @param {import('postcss').Rule | import('postcss-less').Rule} rule * @returns {boolean} */ module.exports = function (rule) { @@ -39,8 +39,7 @@ module.exports = function (rule) { } // Ignore Less &:extend rule - // @ts-ignore TODO TYPES support LESS and SASS types somehow - if (rule.extend) { + if ('extend' in rule && rule.extend) { return false; } diff --git a/package-lock.json b/package-lock.json index 190dfb86f3..c010cd361e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -900,6 +900,15 @@ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, + "@types/postcss-less": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/postcss-less/-/postcss-less-3.1.1.tgz", + "integrity": "sha512-q2JTciLRkA5zHzChlfk0qRH5tMzIM7fmnfasiSNNjQbBtX8n3fx5OCokfltr9M87ZCpwklNFLN6v2MmKC6/dhg==", + "dev": true, + "requires": { + "postcss": "^7.0.32" + } + }, "@types/postcss-safe-parser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/postcss-safe-parser/-/postcss-safe-parser-4.0.0.tgz", diff --git a/package.json b/package.json index cdcfe3806d..eedd19d4be 100644 --- a/package.json +++ b/package.json @@ -171,6 +171,7 @@ "@types/imurmurhash": "^0.1.1", "@types/lodash": "^4.14.161", "@types/micromatch": "^4.0.1", + "@types/postcss-less": "^3.1.1", "@types/postcss-safe-parser": "^4.0.0", "@types/style-search": "^0.1.1", "@types/svg-tags": "^1.0.0", diff --git a/types/global.d.ts b/types/global.d.ts index 57e1654f4c..ee9b8cd876 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -2,6 +2,5 @@ declare module '@stylelint/postcss-css-in-js'; declare module '@stylelint/postcss-markdown'; declare module 'import-lazy'; declare module 'postcss-html'; -declare module 'postcss-less'; declare module 'postcss-sass'; declare module 'sugarss'; From 89a530b548d02ff267451b20c02060b6e6f1a567 Mon Sep 17 00:00:00 2001 From: Binyamin Aron Green Date: Sun, 13 Sep 2020 06:43:35 -0400 Subject: [PATCH 08/46] Add example to cli usage guide (#4926) --- docs/user-guide/usage/cli.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/user-guide/usage/cli.md b/docs/user-guide/usage/cli.md index 75bdcb45fb..b7c7e2a89d 100644 --- a/docs/user-guide/usage/cli.md +++ b/docs/user-guide/usage/cli.md @@ -114,6 +114,14 @@ Recursively linting all `.css` files in the `foo` directory using a custom synta stylelint "foo/**/*.css" --customSyntax path/to/my-custom-syntax.js ``` +### Example I - print on success + +Ensure output on successful runs: + +```shell +stylelint -f verbose "foo/**/*.css" +``` + ## Exit codes The CLI can exit the process with the following exit codes: From 1dfd78bb61c3286f71441eea22e392de25a450df Mon Sep 17 00:00:00 2001 From: theodab Date: Sun, 13 Sep 2020 03:47:59 -0700 Subject: [PATCH 09/46] Removed "hasMagic" check before escaping paths. (#4931) * Removed "hasMagic" check before escaping paths. Globby's "hasMagic" function, which is meant to detect if a path contains globbing characters, notably does not detect paths that contain matched parentheses, unless those matched parentheses have extra globbing characters attached to them. This is a problem because globby requires matches parentheses to be escaped, if they are part of the literal path. This changes the part of the code that escapes paths that literally exist to not check "hasMagic" first, to get around that oversight. * Add test * Update comment Co-authored-by: m-allanson --- lib/__tests__/fixtures/globs/a(b)/styles.css | 1 + lib/__tests__/standalone-globs.test.js | 1 + lib/standalone.js | 12 +++++------- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 lib/__tests__/fixtures/globs/a(b)/styles.css diff --git a/lib/__tests__/fixtures/globs/a(b)/styles.css b/lib/__tests__/fixtures/globs/a(b)/styles.css new file mode 100644 index 0000000000..077f6dd7c0 --- /dev/null +++ b/lib/__tests__/fixtures/globs/a(b)/styles.css @@ -0,0 +1 @@ +a {} diff --git a/lib/__tests__/standalone-globs.test.js b/lib/__tests__/standalone-globs.test.js index 2f3f486287..0d9d2c8255 100644 --- a/lib/__tests__/standalone-globs.test.js +++ b/lib/__tests__/standalone-globs.test.js @@ -21,6 +21,7 @@ describe('standalone globbing', () => { // ref https://github.com/micromatch/micromatch#matching-features const fixtureDirs = [ `[digit]/not-digits`, + `a(b)`, `with spaces`, `extglob!(s)`, `got!negate/negate`, diff --git a/lib/standalone.js b/lib/standalone.js index e92d9c1946..0f5b46a2dc 100644 --- a/lib/standalone.js +++ b/lib/standalone.js @@ -172,14 +172,12 @@ module.exports = function (options) { } fileList = fileList.map((entry) => { - if (globby.hasMagic(entry)) { - const cwd = _.get(globbyOptions, 'cwd', process.cwd()); - const absolutePath = !path.isAbsolute(entry) ? path.join(cwd, entry) : path.normalize(entry); + const cwd = _.get(globbyOptions, 'cwd', process.cwd()); + const absolutePath = !path.isAbsolute(entry) ? path.join(cwd, entry) : path.normalize(entry); - if (fs.existsSync(absolutePath)) { - // This glob-like path points to a file. Return an escaped path to avoid globbing - return fastGlob.escapePath(entry); - } + if (fs.existsSync(absolutePath)) { + // This path points to a file. Return an escaped path to avoid globbing + return fastGlob.escapePath(entry); } return entry; From d38ee62dce41543b9a9d7218acdc51f9e5146d81 Mon Sep 17 00:00:00 2001 From: Richard Hallows Date: Sun, 13 Sep 2020 11:50:05 +0100 Subject: [PATCH 10/46] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75e18e2861..bd027795ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project are documented in this file. +## Head + +- Fixed: use of full file path without converting it to glob ([#4931](https://github.com/stylelint/stylelint/pull/4931)). + ## 13.7.1 - Fixed: double-slash disable comments when followed by another comment ([#4913](https://github.com/stylelint/stylelint/pull/4913)). From 7449dc004c9e75119423cd7e4f3780ba895b5c89 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 15 Sep 2020 09:20:46 +0100 Subject: [PATCH 11/46] Bump husky from 4.2.5 to 4.3.0 (#4941) Bumps [husky](https://github.com/typicode/husky) from 4.2.5 to 4.3.0. - [Release notes](https://github.com/typicode/husky/releases) - [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md) - [Commits](https://github.com/typicode/husky/compare/v4.2.5...v4.3.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- package-lock.json | 23 ++++------------------- package.json | 2 +- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index c010cd361e..f20d082ffc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3766,36 +3766,21 @@ "dev": true }, "husky": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.5.tgz", - "integrity": "sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.0.tgz", + "integrity": "sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA==", "dev": true, "requires": { "chalk": "^4.0.0", "ci-info": "^2.0.0", "compare-versions": "^3.6.0", - "cosmiconfig": "^6.0.0", + "cosmiconfig": "^7.0.0", "find-versions": "^3.2.0", "opencollective-postinstall": "^2.0.2", "pkg-dir": "^4.2.0", "please-upgrade-node": "^3.2.0", "slash": "^3.0.0", "which-pm-runs": "^1.0.0" - }, - "dependencies": { - "cosmiconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", - "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "dev": true, - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.7.2" - } - } } }, "iconv-lite": { diff --git a/package.json b/package.json index eedd19d4be..5efe191f87 100644 --- a/package.json +++ b/package.json @@ -183,7 +183,7 @@ "eslint": "^7.7.0", "eslint-config-stylelint": "^12.0.0", "got": "^11.5.2", - "husky": "^4.2.5", + "husky": "^4.3.0", "jest": "^26.4.2", "jest-circus": "^26.4.2", "jest-preset-stylelint": "^3.0.0", From 4f068be333fdfa622f22a215487b3731acc43701 Mon Sep 17 00:00:00 2001 From: Jennifer Thakar Date: Thu, 24 Sep 2020 15:14:14 -0700 Subject: [PATCH 12/46] Improve inline comment merging (#4950) * Improve inline comment merging This now only starts a merge when the comment begins with `stylelint-` and either the first line contains `--` or the second line starts with `--`. The merge will end whenever another line starts with `stylelint-` to allow for adjacent stylelint commands. * Fix indentation * Explicitly check for ^stylelint-(disable|enable) * Use existing variables rather than hardcoding --- lib/__tests__/disableRanges.test.js | 139 ++++++++++++++++++++++++++++ lib/assignDisabledRanges.js | 65 +++++++++---- 2 files changed, 184 insertions(+), 20 deletions(-) diff --git a/lib/__tests__/disableRanges.test.js b/lib/__tests__/disableRanges.test.js index cef906a581..26e6696581 100644 --- a/lib/__tests__/disableRanges.test.js +++ b/lib/__tests__/disableRanges.test.js @@ -805,6 +805,29 @@ it('SCSS // disable comment (with // comment after blank line)', () => { }); }); +it('SCSS // disable comment (with // comment immediately after)', () => { + const scssSource = `a { + // stylelint-disable declaration-no-important + // Unrelated + color: pink !important; + }`; + + return postcss() + .use(assignDisabledRanges) + .process(scssSource, { syntax: scss, from: undefined }) + .then((result) => { + expect(result.stylelint.disabledRanges).toEqual({ + all: [], + 'declaration-no-important': [ + { + start: 2, + strictStart: true, + }, + ], + }); + }); +}); + it('SCSS /* disable comment (with // comment after blank line)', () => { const scssSource = `a { /* stylelint-disable declaration-no-important */ @@ -829,6 +852,122 @@ it('SCSS /* disable comment (with // comment after blank line)', () => { }); }); +it('SCSS // disable comment (with // comment immediately before)', () => { + const scssSource = `a { + // Unrelated + // stylelint-disable declaration-no-important + color: pink !important; + }`; + + return postcss() + .use(assignDisabledRanges) + .process(scssSource, { syntax: scss, from: undefined }) + .then((result) => { + expect(result.stylelint.disabledRanges).toEqual({ + all: [], + 'declaration-no-important': [ + { + start: 3, + strictStart: true, + }, + ], + }); + }); +}); + +it('SCSS two adjacent // disable comments ', () => { + const scssSource = `a { + // stylelint-disable declaration-no-important + // stylelint-disable foo-bar + color: pink !important; + }`; + + return postcss() + .use(assignDisabledRanges) + .process(scssSource, { syntax: scss, from: undefined }) + .then((result) => { + expect(result.stylelint.disabledRanges).toEqual({ + all: [], + 'declaration-no-important': [ + { + start: 2, + strictStart: true, + }, + ], + 'foo-bar': [ + { + start: 3, + strictStart: true, + }, + ], + }); + }); +}); + +it('SCSS two adjacent // disable comments with multi-line descriptions ', () => { + const scssSource = `a { + // stylelint-disable declaration-no-important -- + // Description 1 + // stylelint-disable foo-bar + // -- + // Description 2 + color: pink !important; + }`; + + return postcss() + .use(assignDisabledRanges) + .process(scssSource, { syntax: scss, from: undefined }) + .then((result) => { + expect(result.stylelint.disabledRanges).toEqual({ + all: [], + 'declaration-no-important': [ + { + start: 2, + strictStart: true, + description: 'Description 1', + }, + ], + 'foo-bar': [ + { + start: 4, + strictStart: true, + description: 'Description 2', + }, + ], + }); + }); +}); + +it('SCSS two // disable comments with an unrelated comment between them', () => { + const scssSource = `a { + // stylelint-disable declaration-no-important + // Unrelated + // stylelint-disable foo-bar + color: pink !important; + }`; + + return postcss() + .use(assignDisabledRanges) + .process(scssSource, { syntax: scss, from: undefined }) + .then((result) => { + expect(result.stylelint.disabledRanges).toEqual({ + all: [], + 'declaration-no-important': [ + { + start: 2, + strictStart: true, + }, + ], + 'foo-bar': [ + { + start: 4, + strictStart: true, + }, + ], + }); + }); +}); + it('Less // line-disabling comment (with description)', () => { const lessSource = `a { color: pink !important; // stylelint-disable-line declaration-no-important -- Description diff --git a/lib/assignDisabledRanges.js b/lib/assignDisabledRanges.js index d57043e059..0ba45742b1 100644 --- a/lib/assignDisabledRanges.js +++ b/lib/assignDisabledRanges.js @@ -66,35 +66,53 @@ module.exports = function (root, result) { if (inlineEnd) { // Ignore comments already processed by grouping with a previous one. if (inlineEnd === comment) inlineEnd = null; - } else if (isInlineComment(comment)) { - const fullComment = comment.clone(); - let next = comment.next(); - let lastLine = (comment.source && comment.source.end && comment.source.end.line) || 0; - while (next && next.type === 'comment') { - /** @type {PostcssComment} */ - const current = next; + return; + } - if (!isInlineComment(current)) break; + const next = comment.next(); + + // If any of these conditions are not met, do not merge comments. + if ( + !( + isInlineComment(comment) && + isStylelintCommand(comment) && + next && + next.type === 'comment' && + (comment.text.includes('--') || next.text.startsWith('--')) + ) + ) { + checkComment(comment); - const currentLine = (current.source && current.source.end && current.source.end.line) || 0; + return; + } - if (lastLine + 1 !== currentLine) break; + let lastLine = (comment.source && comment.source.end && comment.source.end.line) || 0; + const fullComment = comment.clone(); - fullComment.text += `\n${current.text}`; + /** @type {PostcssComment} */ + let current = next; - if (fullComment.source && current.source) { - fullComment.source.end = current.source.end; - } + while (isInlineComment(current) && !isStylelintCommand(current)) { + const currentLine = (current.source && current.source.end && current.source.end.line) || 0; + + if (lastLine + 1 !== currentLine) break; - inlineEnd = current; - next = current.next(); - lastLine = currentLine; + fullComment.text += `\n${current.text}`; + + if (fullComment.source && current.source) { + fullComment.source.end = current.source.end; } - checkComment(fullComment); - } else { - checkComment(comment); + + inlineEnd = current; + const next = current.next(); + + if (!next || next.type !== 'comment') break; + + current = next; + lastLine = currentLine; } + checkComment(fullComment); }); return result; @@ -108,6 +126,13 @@ module.exports = function (root, result) { return comment.inline || comment.raws.inline; } + /** + * @param {PostcssComment} comment + */ + function isStylelintCommand(comment) { + return comment.text.startsWith(disableCommand) || comment.text.startsWith(enableCommand); + } + /** * @param {PostcssComment} comment */ From ca6c9caca290f9ff682e545a575842f60456196d Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Fri, 25 Sep 2020 00:15:06 +0200 Subject: [PATCH 13/46] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd027795ff..cf38fc6187 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project are documented in this file. ## Head +- Fixed: regression for disable commands and adjacent double-slash comments ([#4950](https://github.com/stylelint/stylelint/pull/4950)). - Fixed: use of full file path without converting it to glob ([#4931](https://github.com/stylelint/stylelint/pull/4931)). ## 13.7.1 From 248d83ca902bb09adcb44bc1aca14dd71224165f Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Fri, 25 Sep 2020 20:31:07 +0900 Subject: [PATCH 14/46] Describe missing `reportedDisables` and `reportDescriptionlessDisables` (#4939) * Describe missing `reportedDisables` and `reportDescriptionlessDisables` This documentation change adds missing descriptions about: - the `reportedDisables` property in the returned data of Node.js API - the `reportDescriptionlessDisables` option (flag) Close #4912 * Fix grammar * Add `` * Add `stylelint-disable -- ` --- docs/user-guide/configure.md | 4 ++- docs/user-guide/usage/node-api.md | 12 +++++++-- docs/user-guide/usage/options.md | 43 +++++++++++++++++++++++++++++-- 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/docs/user-guide/configure.md b/docs/user-guide/configure.md index 4811b02908..b3455dbe08 100644 --- a/docs/user-guide/configure.md +++ b/docs/user-guide/configure.md @@ -137,7 +137,7 @@ Reporters may use these severity levels to display violations or exit the proces ### `reportDisables` -You can set the `reportDisables` secondary option to report any disable comments for this rule, effectively disallowing authors to opt out of it. +You can set the `reportDisables` secondary option to report any `stylelint-disable` comments for this rule, effectively disallowing authors to opt out of it. For example: @@ -155,6 +155,8 @@ For example: } ``` +The report is included in the [`reportedDisables`](usage/node-api.md#reporteddisables) property to the returned data of Node.js API. + ## `defaultSeverity` You can set the default severity level for all rules that do not have a severity specified in their secondary options. For example, you can set the default severity to `"warning"`: diff --git a/docs/user-guide/usage/node-api.md b/docs/user-guide/usage/node-api.md index 635b998b0d..902b0e4cae 100644 --- a/docs/user-guide/usage/node-api.md +++ b/docs/user-guide/usage/node-api.md @@ -66,13 +66,21 @@ An array containing all the stylelint result objects (the objects that formatter An object containing the maximum number of warnings and the amount found, e.g. `{ maxWarnings: 0, foundWarnings: 12 }`. +### `reportedDisables` + +An array of objects, one for each source, with tells you which `stylelint-disable` comments for rules enabled [`reportDisables`](../configure.md#reportdisables). + ### `needlessDisables` -An array of objects, one for each source, with tells you which stylelint-disable comments are not blocking a lint violation +An array of objects, one for each source, with tells you which `stylelint-disable` comments are not blocking a lint violation. ### `invalidScopeDisables` -An array of objects, one for each source, with tells you which rule in `stylelint-disable ` comment don't exist within the configuration object. +An array of objects, one for each source, with tells you which rule in a `stylelint-disable ` comment doesn't exist within the configuration object. + +### `descriptionlessDisables` + +An array of objects, one for each source, with tells you which `stylelint-disable` comments without a description. ## Syntax errors diff --git a/docs/user-guide/usage/options.md b/docs/user-guide/usage/options.md index c4df930e30..5676c715dc 100644 --- a/docs/user-guide/usage/options.md +++ b/docs/user-guide/usage/options.md @@ -141,7 +141,7 @@ You can use this option to see what your linting results would be like without t CLI flags: `--report-needless-disables, --rd` -Produce a report to clean up your codebase, keeping only the stylelint-disable comments that serve a purpose. +Produce a report to clean up your codebase, keeping only the `stylelint-disable` comments that serve a purpose. If needless disables are found, the: @@ -152,13 +152,52 @@ If needless disables are found, the: CLI flags: `--report-invalid-scope-disables, --risd` -Produce a report of the stylelint-disable comments that used for rules that don't exist within the configuration object. +Produce a report of the `stylelint-disable` comments that used for rules that don't exist within the configuration object. If invalid scope disables are found, the: - CLI process exits with code `2` - Node.js API adds a [`invalidScopeDisables`](node-api.md#invalidscopedisables) property to the returned data +## `reportDescriptionlessDisables` + +CLI flags: `--report-descriptionless-disables, --rdd` + +Produce a report of the `stylelint-disable` comments without a description. + +For example, when the configuration `{ block-no-empty: true }` is given, the following patterns are reported: + + +```css +/* stylelint-disable */ +a {} +``` + + +```css +/* stylelint-disable-next-line block-no-empty */ +a {} +``` + +But, the following patterns (`stylelint-disable -- `) are _not_ reported: + + +```css +/* stylelint-disable -- This violation is ignorable. */ +a {} +``` + + +```css +/* stylelint-disable-next-line block-no-empty -- This violation is ignorable. */ +a {} +``` + +If descriptionless disables are found, the: + +- CLI process exits with code `2` +- Node.js API adds a [`descriptionlessDisables`](node-api.md#descriptionlessdisables) property to the returned data + ## `codeFilename` CLI flag: `--stdin-filename` From 9499a3a62f2e9149f575e7a34d899f645bd769d6 Mon Sep 17 00:00:00 2001 From: Donovan Date: Fri, 25 Sep 2020 13:31:37 +0200 Subject: [PATCH 15/46] Add a specific meta to the deprecated rules (#2622) (#4943) --- lib/rules/at-rule-blacklist/__tests__/index.js | 7 ++++++- lib/rules/at-rule-blacklist/index.js | 2 ++ lib/rules/at-rule-property-requirelist/__tests__/index.js | 7 ++++++- lib/rules/at-rule-property-requirelist/index.js | 1 + lib/rules/at-rule-whitelist/__tests__/index.js | 7 ++++++- lib/rules/at-rule-whitelist/index.js | 2 ++ lib/rules/comment-word-blacklist/__tests__/index.js | 7 ++++++- lib/rules/comment-word-blacklist/index.js | 2 ++ .../__tests__/index.js | 7 ++++++- lib/rules/declaration-property-unit-blacklist/index.js | 2 ++ .../__tests__/index.js | 7 ++++++- lib/rules/declaration-property-unit-whitelist/index.js | 2 ++ .../__tests__/index.js | 7 ++++++- lib/rules/declaration-property-value-blacklist/index.js | 2 ++ .../__tests__/index.js | 7 ++++++- lib/rules/declaration-property-value-whitelist/index.js | 2 ++ lib/rules/function-blacklist/__tests__/index.js | 7 ++++++- lib/rules/function-blacklist/index.js | 2 ++ .../function-url-scheme-blacklist/__tests__/index.js | 7 ++++++- lib/rules/function-url-scheme-blacklist/index.js | 2 ++ .../function-url-scheme-whitelist/__tests__/index.js | 7 ++++++- lib/rules/function-url-scheme-whitelist/index.js | 2 ++ lib/rules/function-whitelist/__tests__/index.js | 7 ++++++- lib/rules/function-whitelist/index.js | 2 ++ lib/rules/media-feature-name-blacklist/__tests__/index.js | 7 ++++++- lib/rules/media-feature-name-blacklist/index.js | 2 ++ .../media-feature-name-value-whitelist/__tests__/index.js | 7 ++++++- lib/rules/media-feature-name-value-whitelist/index.js | 2 ++ lib/rules/media-feature-name-whitelist/__tests__/index.js | 7 ++++++- lib/rules/media-feature-name-whitelist/index.js | 2 ++ lib/rules/property-blacklist/__tests__/index.js | 7 ++++++- lib/rules/property-blacklist/index.js | 2 ++ lib/rules/property-whitelist/__tests__/index.js | 7 ++++++- lib/rules/property-whitelist/index.js | 2 ++ .../__tests__/index.js | 7 ++++++- lib/rules/selector-attribute-operator-blacklist/index.js | 2 ++ .../__tests__/index.js | 7 ++++++- lib/rules/selector-attribute-operator-whitelist/index.js | 2 ++ .../selector-combinator-blacklist/__tests__/index.js | 8 +++++++- lib/rules/selector-combinator-blacklist/index.js | 2 ++ .../selector-combinator-whitelist/__tests__/index.js | 7 ++++++- lib/rules/selector-combinator-whitelist/index.js | 2 ++ .../selector-pseudo-class-blacklist/__tests__/index.js | 7 ++++++- lib/rules/selector-pseudo-class-blacklist/index.js | 2 ++ .../selector-pseudo-class-whitelist/__tests__/index.js | 7 ++++++- lib/rules/selector-pseudo-class-whitelist/index.js | 2 ++ .../selector-pseudo-element-blacklist/__tests__/index.js | 7 ++++++- lib/rules/selector-pseudo-element-blacklist/index.js | 2 ++ .../selector-pseudo-element-whitelist/__tests__/index.js | 7 ++++++- lib/rules/selector-pseudo-element-whitelist/index.js | 2 ++ lib/rules/unit-blacklist/__tests__/index.js | 7 ++++++- lib/rules/unit-blacklist/index.js | 2 ++ lib/rules/unit-whitelist/__tests__/index.js | 7 ++++++- lib/rules/unit-whitelist/index.js | 2 ++ 54 files changed, 216 insertions(+), 27 deletions(-) diff --git a/lib/rules/at-rule-blacklist/__tests__/index.js b/lib/rules/at-rule-blacklist/__tests__/index.js index b7a1af7846..d0900a78a7 100644 --- a/lib/rules/at-rule-blacklist/__tests__/index.js +++ b/lib/rules/at-rule-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/at-rule-blacklist/index.js b/lib/rules/at-rule-blacklist/index.js index 3e056130e4..5f942de3ef 100644 --- a/lib/rules/at-rule-blacklist/index.js +++ b/lib/rules/at-rule-blacklist/index.js @@ -59,4 +59,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/at-rule-property-requirelist/__tests__/index.js b/lib/rules/at-rule-property-requirelist/__tests__/index.js index 183e7643b4..751f3ce403 100644 --- a/lib/rules/at-rule-property-requirelist/__tests__/index.js +++ b/lib/rules/at-rule-property-requirelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: { diff --git a/lib/rules/at-rule-property-requirelist/index.js b/lib/rules/at-rule-property-requirelist/index.js index e979f78b41..fec1038679 100644 --- a/lib/rules/at-rule-property-requirelist/index.js +++ b/lib/rules/at-rule-property-requirelist/index.js @@ -69,5 +69,6 @@ function rule(list) { rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; module.exports = rule; diff --git a/lib/rules/at-rule-whitelist/__tests__/index.js b/lib/rules/at-rule-whitelist/__tests__/index.js index 74f79a3e8c..cf2ca77dea 100644 --- a/lib/rules/at-rule-whitelist/__tests__/index.js +++ b/lib/rules/at-rule-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/at-rule-whitelist/index.js b/lib/rules/at-rule-whitelist/index.js index 716ee578b7..ae28687154 100644 --- a/lib/rules/at-rule-whitelist/index.js +++ b/lib/rules/at-rule-whitelist/index.js @@ -59,4 +59,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/comment-word-blacklist/__tests__/index.js b/lib/rules/comment-word-blacklist/__tests__/index.js index 70a331716c..2e5a7288c1 100644 --- a/lib/rules/comment-word-blacklist/__tests__/index.js +++ b/lib/rules/comment-word-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['bad-word'], diff --git a/lib/rules/comment-word-blacklist/index.js b/lib/rules/comment-word-blacklist/index.js index b58df52d93..ba75f9611e 100644 --- a/lib/rules/comment-word-blacklist/index.js +++ b/lib/rules/comment-word-blacklist/index.js @@ -61,4 +61,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/declaration-property-unit-blacklist/__tests__/index.js b/lib/rules/declaration-property-unit-blacklist/__tests__/index.js index bf4f9a2fff..3e09c79fe8 100644 --- a/lib/rules/declaration-property-unit-blacklist/__tests__/index.js +++ b/lib/rules/declaration-property-unit-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/declaration-property-unit-blacklist/index.js b/lib/rules/declaration-property-unit-blacklist/index.js index db1d840dd2..6f0d883f5c 100644 --- a/lib/rules/declaration-property-unit-blacklist/index.js +++ b/lib/rules/declaration-property-unit-blacklist/index.js @@ -81,4 +81,6 @@ function rule(list) { rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/declaration-property-unit-whitelist/__tests__/index.js b/lib/rules/declaration-property-unit-whitelist/__tests__/index.js index 9850fb4cfc..d37f31fe4d 100644 --- a/lib/rules/declaration-property-unit-whitelist/__tests__/index.js +++ b/lib/rules/declaration-property-unit-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/declaration-property-unit-whitelist/index.js b/lib/rules/declaration-property-unit-whitelist/index.js index cd2dc9eef0..002e595000 100644 --- a/lib/rules/declaration-property-unit-whitelist/index.js +++ b/lib/rules/declaration-property-unit-whitelist/index.js @@ -81,4 +81,6 @@ function rule(list) { rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/declaration-property-value-blacklist/__tests__/index.js b/lib/rules/declaration-property-value-blacklist/__tests__/index.js index a1d3005a29..5526e3a659 100644 --- a/lib/rules/declaration-property-value-blacklist/__tests__/index.js +++ b/lib/rules/declaration-property-value-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/declaration-property-value-blacklist/index.js b/lib/rules/declaration-property-value-blacklist/index.js index 3550bf70e4..7c7313632f 100644 --- a/lib/rules/declaration-property-value-blacklist/index.js +++ b/lib/rules/declaration-property-value-blacklist/index.js @@ -63,4 +63,6 @@ function rule(list) { rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/declaration-property-value-whitelist/__tests__/index.js b/lib/rules/declaration-property-value-whitelist/__tests__/index.js index 7f674ab4b7..2daf53488e 100644 --- a/lib/rules/declaration-property-value-whitelist/__tests__/index.js +++ b/lib/rules/declaration-property-value-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/declaration-property-value-whitelist/index.js b/lib/rules/declaration-property-value-whitelist/index.js index 3a20e2b340..076ac04a69 100644 --- a/lib/rules/declaration-property-value-whitelist/index.js +++ b/lib/rules/declaration-property-value-whitelist/index.js @@ -63,4 +63,6 @@ function rule(list) { rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/function-blacklist/__tests__/index.js b/lib/rules/function-blacklist/__tests__/index.js index 7d7db8d4ff..77bb83177d 100644 --- a/lib/rules/function-blacklist/__tests__/index.js +++ b/lib/rules/function-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/function-blacklist/index.js b/lib/rules/function-blacklist/index.js index e26654a22d..f3e59af866 100644 --- a/lib/rules/function-blacklist/index.js +++ b/lib/rules/function-blacklist/index.js @@ -66,4 +66,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/function-url-scheme-blacklist/__tests__/index.js b/lib/rules/function-url-scheme-blacklist/__tests__/index.js index d4ec6f2dbc..fb0f9513a3 100644 --- a/lib/rules/function-url-scheme-blacklist/__tests__/index.js +++ b/lib/rules/function-url-scheme-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: [[]], diff --git a/lib/rules/function-url-scheme-blacklist/index.js b/lib/rules/function-url-scheme-blacklist/index.js index c85bb0f68a..9580add5cb 100644 --- a/lib/rules/function-url-scheme-blacklist/index.js +++ b/lib/rules/function-url-scheme-blacklist/index.js @@ -71,4 +71,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/function-url-scheme-whitelist/__tests__/index.js b/lib/rules/function-url-scheme-whitelist/__tests__/index.js index f6e3823f86..7cfe199c9b 100644 --- a/lib/rules/function-url-scheme-whitelist/__tests__/index.js +++ b/lib/rules/function-url-scheme-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['https', 'data'], diff --git a/lib/rules/function-url-scheme-whitelist/index.js b/lib/rules/function-url-scheme-whitelist/index.js index 320453c993..9bcadd8930 100644 --- a/lib/rules/function-url-scheme-whitelist/index.js +++ b/lib/rules/function-url-scheme-whitelist/index.js @@ -71,4 +71,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/function-whitelist/__tests__/index.js b/lib/rules/function-whitelist/__tests__/index.js index e2843265d8..5563c23f1f 100644 --- a/lib/rules/function-whitelist/__tests__/index.js +++ b/lib/rules/function-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/function-whitelist/index.js b/lib/rules/function-whitelist/index.js index 95627bb108..7a72358f1d 100644 --- a/lib/rules/function-whitelist/index.js +++ b/lib/rules/function-whitelist/index.js @@ -68,4 +68,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/media-feature-name-blacklist/__tests__/index.js b/lib/rules/media-feature-name-blacklist/__tests__/index.js index bd28913d70..62855b5924 100644 --- a/lib/rules/media-feature-name-blacklist/__tests__/index.js +++ b/lib/rules/media-feature-name-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['max-width', '--wide-viewport', 'width', '/^my-/', 'color'], diff --git a/lib/rules/media-feature-name-blacklist/index.js b/lib/rules/media-feature-name-blacklist/index.js index 40f0a54db1..7dba881daa 100644 --- a/lib/rules/media-feature-name-blacklist/index.js +++ b/lib/rules/media-feature-name-blacklist/index.js @@ -81,4 +81,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/media-feature-name-value-whitelist/__tests__/index.js b/lib/rules/media-feature-name-value-whitelist/__tests__/index.js index e7d1f0baf2..4aadec3d88 100644 --- a/lib/rules/media-feature-name-value-whitelist/__tests__/index.js +++ b/lib/rules/media-feature-name-value-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: [ diff --git a/lib/rules/media-feature-name-value-whitelist/index.js b/lib/rules/media-feature-name-value-whitelist/index.js index 3eb18856e5..c730fe6601 100644 --- a/lib/rules/media-feature-name-value-whitelist/index.js +++ b/lib/rules/media-feature-name-value-whitelist/index.js @@ -94,4 +94,6 @@ function rule(list) { rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/media-feature-name-whitelist/__tests__/index.js b/lib/rules/media-feature-name-whitelist/__tests__/index.js index f0af8f625b..b711d1cbbb 100644 --- a/lib/rules/media-feature-name-whitelist/__tests__/index.js +++ b/lib/rules/media-feature-name-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['max-width', '/^my-/', 'color'], diff --git a/lib/rules/media-feature-name-whitelist/index.js b/lib/rules/media-feature-name-whitelist/index.js index ebfdff9fb6..6dfcb91ee8 100644 --- a/lib/rules/media-feature-name-whitelist/index.js +++ b/lib/rules/media-feature-name-whitelist/index.js @@ -81,4 +81,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/property-blacklist/__tests__/index.js b/lib/rules/property-blacklist/__tests__/index.js index 68a3c450aa..208fc96dc5 100644 --- a/lib/rules/property-blacklist/__tests__/index.js +++ b/lib/rules/property-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/property-blacklist/index.js b/lib/rules/property-blacklist/index.js index 6744c9dc16..88653adf85 100644 --- a/lib/rules/property-blacklist/index.js +++ b/lib/rules/property-blacklist/index.js @@ -62,4 +62,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/property-whitelist/__tests__/index.js b/lib/rules/property-whitelist/__tests__/index.js index 65efbc1efb..f66c7fea86 100644 --- a/lib/rules/property-whitelist/__tests__/index.js +++ b/lib/rules/property-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/property-whitelist/index.js b/lib/rules/property-whitelist/index.js index 81f4fb0f8a..ed423d3f93 100644 --- a/lib/rules/property-whitelist/index.js +++ b/lib/rules/property-whitelist/index.js @@ -62,4 +62,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/selector-attribute-operator-blacklist/__tests__/index.js b/lib/rules/selector-attribute-operator-blacklist/__tests__/index.js index e6d9f654d3..e36f2433a8 100644 --- a/lib/rules/selector-attribute-operator-blacklist/__tests__/index.js +++ b/lib/rules/selector-attribute-operator-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/selector-attribute-operator-blacklist/index.js b/lib/rules/selector-attribute-operator-blacklist/index.js index d28b3d09ea..da21a5206a 100644 --- a/lib/rules/selector-attribute-operator-blacklist/index.js +++ b/lib/rules/selector-attribute-operator-blacklist/index.js @@ -70,4 +70,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/selector-attribute-operator-whitelist/__tests__/index.js b/lib/rules/selector-attribute-operator-whitelist/__tests__/index.js index e43b0c1683..671b57e3e7 100644 --- a/lib/rules/selector-attribute-operator-whitelist/__tests__/index.js +++ b/lib/rules/selector-attribute-operator-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/selector-attribute-operator-whitelist/index.js b/lib/rules/selector-attribute-operator-whitelist/index.js index 34a39dfcc9..528303672f 100644 --- a/lib/rules/selector-attribute-operator-whitelist/index.js +++ b/lib/rules/selector-attribute-operator-whitelist/index.js @@ -70,4 +70,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/selector-combinator-blacklist/__tests__/index.js b/lib/rules/selector-combinator-blacklist/__tests__/index.js index e3ff4b7c43..7585ee6690 100644 --- a/lib/rules/selector-combinator-blacklist/__tests__/index.js +++ b/lib/rules/selector-combinator-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -24,6 +24,12 @@ it('warns that the rule is deprecated', () => { ); }); }); + +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['>', ' '], diff --git a/lib/rules/selector-combinator-blacklist/index.js b/lib/rules/selector-combinator-blacklist/index.js index 698dc7df4c..99116483ef 100644 --- a/lib/rules/selector-combinator-blacklist/index.js +++ b/lib/rules/selector-combinator-blacklist/index.js @@ -75,4 +75,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/selector-combinator-whitelist/__tests__/index.js b/lib/rules/selector-combinator-whitelist/__tests__/index.js index e08d23c145..cbfa4b6a5c 100644 --- a/lib/rules/selector-combinator-whitelist/__tests__/index.js +++ b/lib/rules/selector-combinator-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['>', ' '], diff --git a/lib/rules/selector-combinator-whitelist/index.js b/lib/rules/selector-combinator-whitelist/index.js index a2d28034c4..427334ac24 100644 --- a/lib/rules/selector-combinator-whitelist/index.js +++ b/lib/rules/selector-combinator-whitelist/index.js @@ -75,4 +75,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/selector-pseudo-class-blacklist/__tests__/index.js b/lib/rules/selector-pseudo-class-blacklist/__tests__/index.js index 9ee952df21..74a37f09a0 100644 --- a/lib/rules/selector-pseudo-class-blacklist/__tests__/index.js +++ b/lib/rules/selector-pseudo-class-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['focus', 'global', 'input-placeholder', 'not', 'nth-last-child', 'has'], diff --git a/lib/rules/selector-pseudo-class-blacklist/index.js b/lib/rules/selector-pseudo-class-blacklist/index.js index 73040ba475..f9c1032854 100644 --- a/lib/rules/selector-pseudo-class-blacklist/index.js +++ b/lib/rules/selector-pseudo-class-blacklist/index.js @@ -80,4 +80,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/selector-pseudo-class-whitelist/__tests__/index.js b/lib/rules/selector-pseudo-class-whitelist/__tests__/index.js index 136f7392a1..46ca294a12 100644 --- a/lib/rules/selector-pseudo-class-whitelist/__tests__/index.js +++ b/lib/rules/selector-pseudo-class-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['hover', 'nth-child', 'root', 'placeholder', 'has'], diff --git a/lib/rules/selector-pseudo-class-whitelist/index.js b/lib/rules/selector-pseudo-class-whitelist/index.js index 8f9d8d8773..cd602b05ed 100644 --- a/lib/rules/selector-pseudo-class-whitelist/index.js +++ b/lib/rules/selector-pseudo-class-whitelist/index.js @@ -79,4 +79,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/selector-pseudo-element-blacklist/__tests__/index.js b/lib/rules/selector-pseudo-element-blacklist/__tests__/index.js index 77cf01b66b..ad20bc0bcd 100644 --- a/lib/rules/selector-pseudo-element-blacklist/__tests__/index.js +++ b/lib/rules/selector-pseudo-element-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['before', 'selection', /^my/i], diff --git a/lib/rules/selector-pseudo-element-blacklist/index.js b/lib/rules/selector-pseudo-element-blacklist/index.js index 8333f37bbb..41975389a4 100644 --- a/lib/rules/selector-pseudo-element-blacklist/index.js +++ b/lib/rules/selector-pseudo-element-blacklist/index.js @@ -79,4 +79,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/selector-pseudo-element-whitelist/__tests__/index.js b/lib/rules/selector-pseudo-element-whitelist/__tests__/index.js index 20823c8a20..95a1944a54 100644 --- a/lib/rules/selector-pseudo-element-whitelist/__tests__/index.js +++ b/lib/rules/selector-pseudo-element-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, config: ['before', 'selection', /^my/i], diff --git a/lib/rules/selector-pseudo-element-whitelist/index.js b/lib/rules/selector-pseudo-element-whitelist/index.js index 949785a55b..679b76a715 100644 --- a/lib/rules/selector-pseudo-element-whitelist/index.js +++ b/lib/rules/selector-pseudo-element-whitelist/index.js @@ -79,4 +79,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/unit-blacklist/__tests__/index.js b/lib/rules/unit-blacklist/__tests__/index.js index 728701be94..20cb4bee23 100644 --- a/lib/rules/unit-blacklist/__tests__/index.js +++ b/lib/rules/unit-blacklist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/unit-blacklist/index.js b/lib/rules/unit-blacklist/index.js index b27a5ae3e7..dc8abc6465 100644 --- a/lib/rules/unit-blacklist/index.js +++ b/lib/rules/unit-blacklist/index.js @@ -127,4 +127,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; diff --git a/lib/rules/unit-whitelist/__tests__/index.js b/lib/rules/unit-whitelist/__tests__/index.js index 07ef614ca0..9c5f3f79d2 100644 --- a/lib/rules/unit-whitelist/__tests__/index.js +++ b/lib/rules/unit-whitelist/__tests__/index.js @@ -1,7 +1,7 @@ 'use strict'; const standalone = require('../../../standalone'); -const { messages, ruleName } = require('..'); +const { messages, ruleName, meta } = require('..'); it('warns that the rule is deprecated', () => { const config = { @@ -25,6 +25,11 @@ it('warns that the rule is deprecated', () => { }); }); +it('also warns that the rule is deprecated via a meta', () => { + expect(meta).not.toBeUndefined(); + expect(meta).toHaveProperty('deprecated', true); +}); + testRule({ ruleName, diff --git a/lib/rules/unit-whitelist/index.js b/lib/rules/unit-whitelist/index.js index b9f6b18b9f..86eea330e9 100644 --- a/lib/rules/unit-whitelist/index.js +++ b/lib/rules/unit-whitelist/index.js @@ -87,4 +87,6 @@ rule.primaryOptionArray = true; rule.ruleName = ruleName; rule.messages = messages; +rule.meta = { deprecated: true }; + module.exports = rule; From 65ab12ebfa08cf92525626836bd9847c8e740da9 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Fri, 25 Sep 2020 20:35:16 +0900 Subject: [PATCH 16/46] Add missing `media-feature-name-value-whitelist` to rule list (#4946) --- docs/user-guide/rules/list.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/user-guide/rules/list.md b/docs/user-guide/rules/list.md index 9c4f023149..06b93637b8 100644 --- a/docs/user-guide/rules/list.md +++ b/docs/user-guide/rules/list.md @@ -209,6 +209,7 @@ Grouped first by the following categories and then by the [_thing_](http://apps. - [`media-feature-name-disallowed-list`](../../../lib/rules/media-feature-name-disallowed-list/README.md): Specify a list of disallowed media feature names. - [`media-feature-name-no-vendor-prefix`](../../../lib/rules/media-feature-name-no-vendor-prefix/README.md): Disallow vendor prefixes for media feature names (Autofixable). - [`media-feature-name-value-allowed-list`](../../../lib/rules/media-feature-name-value-allowed-list/README.md): Specify a list of allowed media feature name and value pairs. +- [`media-feature-name-value-whitelist`](../../../lib/rules/media-feature-name-value-whitelist/README.md): Specify a list of allowed media feature name and value pairs. **(deprecated)** - [`media-feature-name-whitelist`](../../../lib/rules/media-feature-name-whitelist/README.md): Specify a list of allowed media feature names. **(deprecated)** ### Custom media From 119c42ecd315c9a51989fb6ce29ceb34124f1aee Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Fri, 25 Sep 2020 19:43:21 +0200 Subject: [PATCH 17/46] Prepare 13.7.2 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf38fc6187..d72f4a6a29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project are documented in this file. -## Head +## 13.7.2 - Fixed: regression for disable commands and adjacent double-slash comments ([#4950](https://github.com/stylelint/stylelint/pull/4950)). - Fixed: use of full file path without converting it to glob ([#4931](https://github.com/stylelint/stylelint/pull/4931)). From 2b8215b2eb1ced1c8cafb4de523789f525038906 Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Fri, 25 Sep 2020 19:46:25 +0200 Subject: [PATCH 18/46] 13.7.2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f20d082ffc..6fa22890d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "stylelint", - "version": "13.7.1", + "version": "13.7.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5efe191f87..65b8f1eda7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stylelint", - "version": "13.7.1", + "version": "13.7.2", "description": "A mighty, modern CSS linter.", "keywords": [ "css-in-js", From 0eaf3d456cdecdd698d5e4a9edc54d205d47d907 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 26 Sep 2020 11:57:30 +0100 Subject: [PATCH 19/46] Bump postcss-selector-parser from 6.0.2 to 6.0.4 (#4956) Bumps [postcss-selector-parser](https://github.com/postcss/postcss-selector-parser) from 6.0.2 to 6.0.4. - [Release notes](https://github.com/postcss/postcss-selector-parser/releases) - [Changelog](https://github.com/postcss/postcss-selector-parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss-selector-parser/compare/6.0.2...v6.0.4) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- package-lock.json | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6fa22890d4..a12670d3c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7394,13 +7394,14 @@ } }, "postcss-selector-parser": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", - "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", + "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", "requires": { "cssesc": "^3.0.0", "indexes-of": "^1.0.1", - "uniq": "^1.0.1" + "uniq": "^1.0.1", + "util-deprecate": "^1.0.2" } }, "postcss-syntax": { diff --git a/package.json b/package.json index 65b8f1eda7..16ddc5c7a2 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "postcss-safe-parser": "^4.0.2", "postcss-sass": "^0.4.4", "postcss-scss": "^2.1.1", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^6.0.4", "postcss-syntax": "^0.36.2", "postcss-value-parser": "^4.1.0", "resolve-from": "^5.0.0", From 0894cb407f6f2aef5727a6a06ed0ef32e0c6e9bd Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Fri, 2 Oct 2020 15:49:09 +0900 Subject: [PATCH 20/46] Fix `isStandardSyntaxCombinator.test.js` that use callbacks (#4959) --- .../isStandardSyntaxCombinator.test.js | 68 ++++++------------- 1 file changed, 21 insertions(+), 47 deletions(-) diff --git a/lib/utils/__tests__/isStandardSyntaxCombinator.test.js b/lib/utils/__tests__/isStandardSyntaxCombinator.test.js index 65b71d3454..3636a6ef01 100644 --- a/lib/utils/__tests__/isStandardSyntaxCombinator.test.js +++ b/lib/utils/__tests__/isStandardSyntaxCombinator.test.js @@ -6,86 +6,60 @@ const selectorParser = require('postcss-selector-parser'); describe('isStandardSyntaxCombinator', () => { it('tag', () => { - rules('a {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeTruthy(); - }); + expect(isStandardSyntaxCombinator(postcss.parse('a {}').first)).toBeFalsy(); }); it('descendant', () => { - rules('a b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeTruthy(); - }); + expect(isStandardSyntaxCombinator(combinator('a b {}'))).toBeTruthy(); }); it('descendant tab', () => { - rules('a\tb {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeTruthy(); - }); + expect(isStandardSyntaxCombinator(combinator('a\tb {}'))).toBeTruthy(); }); it('descendant newline', () => { - rules('a\nb {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeTruthy(); - }); + expect(isStandardSyntaxCombinator(combinator('a\nb {}'))).toBeTruthy(); }); it('descendant (double child)', () => { - rules('a >> b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeTruthy(); - }); + expect(isStandardSyntaxCombinator(combinator('a >> b {}'))).toBeTruthy(); }); it('child', () => { - rules('a > b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeTruthy(); - }); + expect(isStandardSyntaxCombinator(combinator('a > b {}'))).toBeTruthy(); }); it('next sibling', () => { - rules('a + b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeTruthy(); - }); + expect(isStandardSyntaxCombinator(combinator('a + b {}'))).toBeTruthy(); }); it('subsequent-sibling', () => { - rules('a ~ b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeTruthy(); - }); + expect(isStandardSyntaxCombinator(combinator('a ~ b {}'))).toBeTruthy(); }); it('lowercase reference', () => { - rules('a /for/ b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeFalsy(); - }); + expect(isStandardSyntaxCombinator(combinator('a /for/ b {}'))).toBeFalsy(); }); it('mixedcase reference', () => { - rules('a /fOr/ b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeFalsy(); - }); + expect(isStandardSyntaxCombinator(combinator('a /fOr/ b {}'))).toBeFalsy(); }); it('uppercase reference', () => { - rules('a /FOR/ b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeFalsy(); - }); + expect(isStandardSyntaxCombinator(combinator('a /FOR/ b {}'))).toBeFalsy(); }); it('last node is combinator', () => { - rules('a ~, {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeFalsy(); - }); + expect(isStandardSyntaxCombinator(combinator('a ~, {}'))).toBeFalsy(); }); it('first node is combinator', () => { - rules('~ b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeFalsy(); - }); + expect(isStandardSyntaxCombinator(combinator('~ b {}'))).toBeFalsy(); }); it('last node (in first container) is combinator', () => { - rules('a ~, b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeFalsy(); - }); + expect(isStandardSyntaxCombinator(combinator('a ~, b {}'))).toBeFalsy(); }); it('first node (in second container) is combinator', () => { - rules('a, ~ b {}', (func) => { - expect(isStandardSyntaxCombinator(func)).toBeFalsy(); - }); + expect(isStandardSyntaxCombinator(combinator('a, ~ b {}'))).toBeFalsy(); }); }); -function rules(css, cb) { +function combinator(css) { + const list = []; + postcss.parse(css).walkRules((rule) => { selectorParser((selectorAST) => { - selectorAST.walkCombinators(cb); + selectorAST.walkCombinators((combinator) => list.push(combinator)); }).processSync(rule.selector); }); + + return list[0]; } From a5e43557e4bb9f0da68860a07dce7a5e1fa54ee8 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Fri, 2 Oct 2020 15:49:35 +0900 Subject: [PATCH 21/46] Fix `isSharedLineComment.test.js` that uses callbacks (#4958) --- .../__tests__/isSharedLineComment.test.js | 132 ++++++++---------- 1 file changed, 62 insertions(+), 70 deletions(-) diff --git a/lib/utils/__tests__/isSharedLineComment.test.js b/lib/utils/__tests__/isSharedLineComment.test.js index 435e29c34a..ee08824c00 100644 --- a/lib/utils/__tests__/isSharedLineComment.test.js +++ b/lib/utils/__tests__/isSharedLineComment.test.js @@ -5,45 +5,45 @@ const postcss = require('postcss'); describe('isSharedLineComment', () => { it('returns false for the first node', () => { - const root = postcss.parse(` + const css = ` /* comment */ - `); + `; - expect(isSharedLineComment(root.nodes[0])).toBe(false); + expect(isSharedLineComment(comment(css))).toBe(false); }); it('returns false for a non-shared-line comment before a rule', () => { - const root = postcss.parse(` + const css = ` /* comment */ a {} - `); + `; - expect(isSharedLineComment(root.nodes[0])).toBe(false); + expect(isSharedLineComment(comment(css))).toBe(false); }); it('returns false for a non-shared-line comment after a rule', () => { - const root = postcss.parse(` + const css = ` a {} /* comment */ - `); + `; - expect(isSharedLineComment(root.nodes[1])).toBe(false); + expect(isSharedLineComment(comment(css))).toBe(false); }); it('returns true for a shared-line comment before a rule', () => { - const root = postcss.parse(` + const css = ` /* comment */ a {} - `); + `; - expect(isSharedLineComment(root.nodes[0])).toBe(true); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true for a shared-line comment after a rule', () => { - const root = postcss.parse(` + const css = ` a {} /* comment */ - `); + `; - expect(isSharedLineComment(root.nodes[1])).toBe(true); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns false for a shared-line non-comment', () => { @@ -56,152 +56,144 @@ describe('isSharedLineComment', () => { }); it('returns true when comment shares a line with the start of a rule block, before it', () => { - const root = postcss.parse(` + const css = ` /* comment */ a { color: pink; } - `); + `; - expect(isSharedLineComment(root.nodes[0])).toBe(true); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the start of a rule block with a multiline selector, before it', () => { - const root = postcss.parse(` + const css = ` /* comment */ a, b { color: pink; } - `); + `; - root.walkComments((comment) => { - expect(isSharedLineComment(comment)).toBe(true); - }); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the start of a rule block, after it', () => { - const root = postcss.parse(` + const css = ` a { /* comment */ color: pink; } - `); + `; - root.walkComments((comment) => { - expect(isSharedLineComment(comment)).toBe(true); - }); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the start of a rule block with a multiline selector, after it', () => { - const root = postcss.parse(` + const css = ` a, b { /* comment */ color: pink; } - `); + `; - root.walkComments((comment) => { - expect(isSharedLineComment(comment)).toBe(true); - }); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the start of an at-rule block, before it', () => { - const root = postcss.parse(` + const css = ` /* comment */ @media (min-width: 0px) { a { color: pink; } } - `); + `; - expect(isSharedLineComment(root.nodes[0])).toBe(true); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the start of an at-rule block with a multiline selector, before it', () => { - const root = postcss.parse(` + const css = ` /* comment */ @media (min-width: 0px) { a { color: pink; } } - `); + `; - expect(isSharedLineComment(root.nodes[0])).toBe(true); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the start of an at-rule block, after it', () => { - const root = postcss.parse(` + const css = ` @media (min-width: 0px) { /* comment */ a { color: pink; } } - `); + `; - root.walkComments((comment) => { - expect(isSharedLineComment(comment)).toBe(true); - }); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the start of an at-rule block with a multiline selector, after it', () => { - const root = postcss.parse(` + const css = ` @media (min-width: 0px) { /* comment */ a { color: pink; } } - `); + `; - root.walkComments((comment) => { - expect(isSharedLineComment(comment)).toBe(true); - }); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns false when comment shares a line with only another comment', () => { - const root = postcss.parse(` + const css = ` /* comment */ /* comment */ - `); + `; - expect(isSharedLineComment(root.nodes[0])).toBe(false); + expect(isSharedLineComment(comment(css))).toBe(false); }); it('returns true when comment shares a line with another comment and a non-comment', () => { - const root = postcss.parse(` + const css = ` /* comment */ /* comment */ a {} - `); + `; - expect(isSharedLineComment(root.nodes[0])).toBe(true); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the end of a multi-line rule block, after it', () => { - const root = postcss.parse(` + const css = ` a { color: pink; } /* comment */ - `); + `; - root.walkComments((comment) => { - expect(isSharedLineComment(comment)).toBe(true); - }); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the end of a multi-line property declaration, after it', () => { - const root = postcss.parse(` + const css = ` a { border-radius: 1em 0; /* comment */ } - `); + `; - root.walkComments((comment) => { - expect(isSharedLineComment(comment)).toBe(true); - }); + expect(isSharedLineComment(comment(css))).toBe(true); }); it('returns true when comment shares a line with the start of a multi-line property declaration, before it', () => { - const root = postcss.parse(` + const css = ` a { /* comment */ border-radius: 1em 0; } - `); + `; - root.walkComments((comment) => { - expect(isSharedLineComment(comment)).toBe(true); - }); + expect(isSharedLineComment(comment(css))).toBe(true); }); }); + +function comment(css) { + const comments = []; + + postcss.parse(css).walkComments((comment) => comments.push(comment)); + + return comments[0]; +} From 924646681a355b327ccfeb6f00be4e1636333911 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Mon, 5 Oct 2020 02:14:44 +0900 Subject: [PATCH 22/46] Fix `isStandardSyntaxAtRule.test.js` that use callbacks (#4957) * Fix `isStandardSyntaxAtRule.test.js` that use callbacks * Add `atRule()` helper to improve readability --- .../__tests__/isStandardSyntaxAtRule.test.js | 128 ++++++++---------- 1 file changed, 54 insertions(+), 74 deletions(-) diff --git a/lib/utils/__tests__/isStandardSyntaxAtRule.test.js b/lib/utils/__tests__/isStandardSyntaxAtRule.test.js index edb0f3fa52..3244ccf732 100644 --- a/lib/utils/__tests__/isStandardSyntaxAtRule.test.js +++ b/lib/utils/__tests__/isStandardSyntaxAtRule.test.js @@ -1,136 +1,116 @@ 'use strict'; const isStandardSyntaxAtRule = require('../isStandardSyntaxAtRule'); -const less = require('postcss-less'); const postcss = require('postcss'); -const sass = require('postcss-sass'); -const scss = require('postcss-scss'); +const postcssLess = require('postcss-less'); +const postcssSass = require('postcss-sass'); +const postcssScss = require('postcss-scss'); describe('isStandardSyntaxAtRule', () => { it('non nested at-rules without quotes', () => { - atRules('@charset UTF-8;', (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule('@charset UTF-8;'))).toBeTruthy(); }); it("non nested at-rules with `'` quotes", () => { - atRules("@charset 'UTF-8';", (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule("@charset 'UTF-8';"))).toBeTruthy(); }); it('non nested at-rules with `"` quotes', () => { - atRules('@charset "UTF-8";', (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule('@charset "UTF-8";'))).toBeTruthy(); }); it("non nested at-rules with `'` quotes and without space after name", () => { - atRules("@charset'UTF-8';", (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule("@charset'UTF-8';"))).toBeTruthy(); }); it('non nested at-rules with `"` quotes and without space after name', () => { - atRules('@charset"UTF-8";', (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule('@charset"UTF-8";'))).toBeTruthy(); }); it('non nested at-rules with function and without space after name', () => { - atRules('@import url("fineprint.css") print;', (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule('@import url("fineprint.css") print;'))).toBeTruthy(); }); it('nested at-rules', () => { - atRules('@media (min-width: 100px) {};', (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule('@media (min-width: 100px) {};'))).toBeTruthy(); }); it('nested at-rules with newline after name', () => { - atRules('@media\n(min-width: 100px) {};', (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule('@media\n(min-width: 100px) {};'))).toBeTruthy(); }); it('nested at-rules with windows newline after name', () => { - atRules('@media\r\n(min-width: 100px) {};', (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule('@media\r\n(min-width: 100px) {};'))).toBeTruthy(); }); it('nested at-rules without space after name', () => { - atRules('@media(min-width: 100px) {};', (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeTruthy(); - }); + expect(isStandardSyntaxAtRule(atRule('@media(min-width: 100px) {};'))).toBeTruthy(); }); - it('ignore `@content` inside mixins newline', () => { - const sass = '@mixin mixin()\n @content'; + // eslint-disable-next-line jest/no-disabled-tests -- TODO: `postcss-sass` parser does not support `@mixin`. + it.skip('ignore `@content` inside mixins newline', () => { + const rules = sassAtRules('@mixin mixin()\n @content'); - sassAtRules(sass, (atRule) => { - if (atRule.name === 'mixin') { - return; - } - - expect(isStandardSyntaxAtRule(atRule)).toBeFalsy(); - }); + expect(rules).toHaveLength(2); + expect(rules.map((rule) => rule.name)).toEqual(['mixin', 'content']); + expect(isStandardSyntaxAtRule(rules[0])).toBeTruthy(); + expect(isStandardSyntaxAtRule(rules[1])).toBeFalsy(); }); it('ignore `@content` inside mixins space', () => { - const scss = '@mixin mixin() { @content; };'; - - scssAtRules(scss, (atRule) => { - if (atRule.name === 'mixin') { - return; - } + const rules = scssAtRules('@mixin mixin() { @content; };'); - expect(isStandardSyntaxAtRule(atRule)).toBeFalsy(); - }); + expect(rules).toHaveLength(2); + expect(rules.map((rule) => rule.name)).toEqual(['mixin', 'content']); + expect(isStandardSyntaxAtRule(rules[0])).toBeTruthy(); + expect(isStandardSyntaxAtRule(rules[1])).toBeFalsy(); }); it('ignore passing rulesets to mixins', () => { - const less = '@detached-ruleset: { background: red; }; .top { @detached-ruleset(); }'; + const rules = lessAtRules( + '@detached-ruleset: { background: red; }; .top { @detached-ruleset(); }', + ); - lessAtRules(less, (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeFalsy(); - }); + expect(rules).toHaveLength(2); + expect(isStandardSyntaxAtRule(rules[0])).toBeFalsy(); + expect(isStandardSyntaxAtRule(rules[1])).toBeFalsy(); }); it('ignore calling of mixins', () => { - const less = 'a { .mixin(); }'; + const rules = lessAtRules('a { .mixin(); }'); - lessAtRules(less, (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeFalsy(); - }); + expect(rules).toHaveLength(1); + expect(isStandardSyntaxAtRule(rules[0])).toBeFalsy(); }); it('ignore variables', () => { - const less = ` - @my-variable: 10px; - .top { margin-top: @my-variable; } - `; - - lessAtRules(less, (atRule) => { - expect(isStandardSyntaxAtRule(atRule)).toBeFalsy(); - }); + const rules = lessAtRules('@my-variable: 10px; .top { margin-top: @my-variable; }'); + + expect(rules).toHaveLength(1); + expect(isStandardSyntaxAtRule(rules[0])).toBeFalsy(); }); }); -function atRules(css, cb) { - postcss.parse(css).walkAtRules(cb); +function atRules(code, parser = postcss) { + const rules = []; + + parser.parse(code).walkAtRules((rule) => rules.push(rule)); + + return rules; +} + +function atRule(code) { + return atRules(code)[0]; } -function sassAtRules(css, cb) { - sass.parse(css).walkAtRules(cb); +function sassAtRules(code) { + return atRules(code, postcssSass); } -function scssAtRules(css, cb) { - scss.parse(css).walkAtRules(cb); +function scssAtRules(code) { + return atRules(code, postcssScss); } -function lessAtRules(css, cb) { - less.parse(css).walkAtRules(cb); +function lessAtRules(code) { + return atRules(code, postcssLess); } From 69d4896829be3f0acaa1aa4185a9c8f5a10484c6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2020 09:06:41 +0100 Subject: [PATCH 23/46] Bump @types/table from 5.0.0 to 6.0.0 (#4964) Bumps [@types/table](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/table) from 5.0.0 to 6.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/table) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a12670d3c7..37fa726f1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -952,9 +952,9 @@ "dev": true }, "@types/table": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/table/-/table-5.0.0.tgz", - "integrity": "sha512-fQLtGLZXor264zUPWI95WNDsZ3QV43/c0lJpR/h1hhLJumXRmHNsrvBfEzW2YMhb0EWCsn4U6h82IgwsajAuTA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@types/table/-/table-6.0.0.tgz", + "integrity": "sha512-RSmRiYetRzpcZcgNo4x6C1VSsPGBHCGGDO7Rbnz5esVLbGONxBP1CUcn8JhAkVzUVLO+AY8yOSkb27jvfauLyg==", "dev": true }, "@types/unist": { diff --git a/package.json b/package.json index 16ddc5c7a2..9f5023b9ea 100644 --- a/package.json +++ b/package.json @@ -175,7 +175,7 @@ "@types/postcss-safe-parser": "^4.0.0", "@types/style-search": "^0.1.1", "@types/svg-tags": "^1.0.0", - "@types/table": "^5.0.0", + "@types/table": "^6.0.0", "@types/write-file-atomic": "^3.0.1", "benchmark": "^2.1.4", "common-tags": "^1.8.0", From bffb1755bc6ebc71abd98fc8cb90922c6b2c3ae4 Mon Sep 17 00:00:00 2001 From: Victor Homyakov Date: Sat, 10 Oct 2020 20:38:04 +0300 Subject: [PATCH 24/46] Bump known-css-properties from 0.19.0 to 0.20.0 (#4967) Co-authored-by: v-homyakov --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 37fa726f1f..b515b54f2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5210,9 +5210,9 @@ "dev": true }, "known-css-properties": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.19.0.tgz", - "integrity": "sha512-eYboRV94Vco725nKMlpkn3nV2+96p9c3gKXRsYqAJSswSENvBhN7n5L+uDhY58xQa0UukWsDMTGELzmD8Q+wTA==" + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.20.0.tgz", + "integrity": "sha512-URvsjaA9ypfreqJ2/ylDr5MUERhJZ+DhguoWRr2xgS5C7aGCalXo+ewL+GixgKBfhT2vuL02nbIgNGqVWgTOYw==" }, "latest-version": { "version": "5.1.0", diff --git a/package.json b/package.json index 9f5023b9ea..3630450bf5 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "ignore": "^5.1.8", "import-lazy": "^4.0.0", "imurmurhash": "^0.1.4", - "known-css-properties": "^0.19.0", + "known-css-properties": "^0.20.0", "lodash": "^4.17.20", "log-symbols": "^4.0.0", "mathml-tag-names": "^2.1.3", From 896db69ca7b353ce0a64ff0fd4c2c5386cfaa03a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 10 Oct 2020 20:20:21 +0200 Subject: [PATCH 25/46] Use Github Dependabot (#4969) * Update Dependabot config file * npm run format * Increase `open-pull-requests-limit` from 1 to 5 Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> --- .dependabot/config.yml | 9 --------- .github/dependabot.yml | 10 ++++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 .dependabot/config.yml create mode 100644 .github/dependabot.yml diff --git a/.dependabot/config.yml b/.dependabot/config.yml deleted file mode 100644 index b4b28aad7f..0000000000 --- a/.dependabot/config.yml +++ /dev/null @@ -1,9 +0,0 @@ -# https://dependabot.com/docs/config-file/ -version: 1 -update_configs: - - package_manager: 'javascript' - directory: '/' - update_schedule: 'weekly' - version_requirement_updates: 'increase_versions' - default_labels: - - 'pr: dependencies' diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..51c9edbfb8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: '/' + schedule: + interval: weekly + open-pull-requests-limit: 5 + labels: + - 'pr: dependencies' + versioning-strategy: increase From 9dd32c496e8fa5da1bcd4813c6604337f3117f02 Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Sun, 11 Oct 2020 20:49:53 +0200 Subject: [PATCH 26/46] Add Node.js 14 to CI (#4976) * Add Node.js 14 to CI * Use Node.js 14 by default --- .github/workflows/linting.yml | 2 +- .github/workflows/testing.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 4bf520e85c..ffdac5fc42 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - node: [12] + node: [14] os: [ubuntu-latest] steps: diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4cd17afc4e..2083db4aaa 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,11 +21,11 @@ jobs: strategy: fail-fast: false matrix: - node: [10, 12] + node: [10, 12, 14] os: [ubuntu-latest, windows-latest, macos-latest] exclude: - os: ubuntu-latest - node: 12 + node: 14 steps: - uses: actions/checkout@v2 @@ -51,7 +51,7 @@ jobs: strategy: matrix: - node: [12] + node: [14] os: [ubuntu-latest] steps: From 72d7bab805af3b7a02df5081b83f007b3b290af0 Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Sun, 11 Oct 2020 20:50:29 +0200 Subject: [PATCH 27/46] Use own vendor utility instead of PostCSS (#4942) (#4963) --- lib/rules/at-rule-allowed-list/index.js | 4 +- lib/rules/at-rule-blacklist/index.js | 4 +- lib/rules/at-rule-disallowed-list/index.js | 4 +- lib/rules/at-rule-no-unknown/index.js | 4 +- lib/rules/at-rule-whitelist/index.js | 4 +- .../index.js | 6 +-- .../index.js | 6 +-- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- lib/rules/function-allowed-list/index.js | 4 +- lib/rules/function-blacklist/index.js | 4 +- lib/rules/function-disallowed-list/index.js | 4 +- .../index.js | 4 +- lib/rules/function-whitelist/index.js | 4 +- .../media-feature-name-no-unknown/index.js | 7 +-- .../index.js | 4 +- .../index.js | 4 +- lib/rules/property-allowed-list/index.js | 4 +- lib/rules/property-blacklist/index.js | 4 +- lib/rules/property-disallowed-list/index.js | 4 +- lib/rules/property-no-unknown/index.js | 4 +- lib/rules/property-no-vendor-prefix/index.js | 4 +- lib/rules/property-whitelist/index.js | 4 +- .../index.js | 4 +- .../selector-pseudo-class-blacklist/index.js | 4 +- .../index.js | 4 +- .../selector-pseudo-class-no-unknown/index.js | 6 +-- .../selector-pseudo-class-whitelist/index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- .../index.js | 4 +- lib/rules/time-min-milliseconds/index.js | 3 +- lib/rules/unit-no-unknown/index.js | 4 +- lib/rules/value-no-vendor-prefix/index.js | 4 +- lib/utils/__tests__/vendor.test.js | 17 +++++++ lib/utils/vendor.js | 45 +++++++++++++++++++ 45 files changed, 151 insertions(+), 91 deletions(-) create mode 100644 lib/utils/__tests__/vendor.test.js create mode 100644 lib/utils/vendor.js diff --git a/lib/rules/at-rule-allowed-list/index.js b/lib/rules/at-rule-allowed-list/index.js index 65f950d34c..6f0ec3a717 100644 --- a/lib/rules/at-rule-allowed-list/index.js +++ b/lib/rules/at-rule-allowed-list/index.js @@ -4,10 +4,10 @@ const _ = require('lodash'); const isStandardSyntaxAtRule = require('../../utils/isStandardSyntaxAtRule'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'at-rule-allowed-list'; @@ -36,7 +36,7 @@ function rule(listInput) { return; } - if (list.includes(postcss.vendor.unprefixed(name).toLowerCase())) { + if (list.includes(vendor.unprefixed(name).toLowerCase())) { return; } diff --git a/lib/rules/at-rule-blacklist/index.js b/lib/rules/at-rule-blacklist/index.js index 5f942de3ef..ee90505aeb 100644 --- a/lib/rules/at-rule-blacklist/index.js +++ b/lib/rules/at-rule-blacklist/index.js @@ -4,10 +4,10 @@ const _ = require('lodash'); const isStandardSyntaxAtRule = require('../../utils/isStandardSyntaxAtRule'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'at-rule-blacklist'; @@ -41,7 +41,7 @@ function rule(listInput) { return; } - if (!list.includes(postcss.vendor.unprefixed(name).toLowerCase())) { + if (!list.includes(vendor.unprefixed(name).toLowerCase())) { return; } diff --git a/lib/rules/at-rule-disallowed-list/index.js b/lib/rules/at-rule-disallowed-list/index.js index f593ecdb29..48da6ebecf 100644 --- a/lib/rules/at-rule-disallowed-list/index.js +++ b/lib/rules/at-rule-disallowed-list/index.js @@ -4,10 +4,10 @@ const _ = require('lodash'); const isStandardSyntaxAtRule = require('../../utils/isStandardSyntaxAtRule'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'at-rule-disallowed-list'; @@ -36,7 +36,7 @@ function rule(listInput) { return; } - if (!list.includes(postcss.vendor.unprefixed(name).toLowerCase())) { + if (!list.includes(vendor.unprefixed(name).toLowerCase())) { return; } diff --git a/lib/rules/at-rule-no-unknown/index.js b/lib/rules/at-rule-no-unknown/index.js index 6abe49baf2..b0dee3d3b2 100644 --- a/lib/rules/at-rule-no-unknown/index.js +++ b/lib/rules/at-rule-no-unknown/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isStandardSyntaxAtRule = require('../../utils/isStandardSyntaxAtRule'); const keywordSets = require('../../reference/keywordSets'); const optionsMatches = require('../../utils/optionsMatches'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'at-rule-no-unknown'; @@ -48,7 +48,7 @@ function rule(actual, options) { return; } - if (postcss.vendor.prefix(name) || keywordSets.atRules.has(name.toLowerCase())) { + if (vendor.prefix(name) || keywordSets.atRules.has(name.toLowerCase())) { return; } diff --git a/lib/rules/at-rule-whitelist/index.js b/lib/rules/at-rule-whitelist/index.js index ae28687154..afba56047c 100644 --- a/lib/rules/at-rule-whitelist/index.js +++ b/lib/rules/at-rule-whitelist/index.js @@ -4,10 +4,10 @@ const _ = require('lodash'); const isStandardSyntaxAtRule = require('../../utils/isStandardSyntaxAtRule'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'at-rule-whitelist'; @@ -41,7 +41,7 @@ function rule(listInput) { return; } - if (list.includes(postcss.vendor.unprefixed(name).toLowerCase())) { + if (list.includes(vendor.unprefixed(name).toLowerCase())) { return; } diff --git a/lib/rules/declaration-block-no-redundant-longhand-properties/index.js b/lib/rules/declaration-block-no-redundant-longhand-properties/index.js index c8911d2e57..2e2f5ad818 100644 --- a/lib/rules/declaration-block-no-redundant-longhand-properties/index.js +++ b/lib/rules/declaration-block-no-redundant-longhand-properties/index.js @@ -5,11 +5,11 @@ const _ = require('lodash'); const eachDeclarationBlock = require('../../utils/eachDeclarationBlock'); const optionsMatches = require('../../utils/optionsMatches'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const shorthandData = require('../../reference/shorthandData'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-block-no-redundant-longhand-properties'; @@ -51,8 +51,8 @@ function rule(actual, options) { eachDecl((decl) => { const prop = decl.prop.toLowerCase(); - const unprefixedProp = postcss.vendor.unprefixed(prop); - const prefix = postcss.vendor.prefix(prop); + const unprefixedProp = vendor.unprefixed(prop); + const prefix = vendor.prefix(prop); const shorthandProperties = longhandProperties[unprefixedProp]; diff --git a/lib/rules/declaration-block-no-shorthand-property-overrides/index.js b/lib/rules/declaration-block-no-shorthand-property-overrides/index.js index 5fb62fd694..a40e26b3bb 100644 --- a/lib/rules/declaration-block-no-shorthand-property-overrides/index.js +++ b/lib/rules/declaration-block-no-shorthand-property-overrides/index.js @@ -3,11 +3,11 @@ 'use strict'; const eachDeclarationBlock = require('../../utils/eachDeclarationBlock'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const shorthandData = require('../../reference/shorthandData'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-block-no-shorthand-property-overrides'; @@ -28,8 +28,8 @@ function rule(actual) { eachDecl((decl) => { const prop = decl.prop; - const unprefixedProp = postcss.vendor.unprefixed(prop); - const prefix = postcss.vendor.prefix(prop).toLowerCase(); + const unprefixedProp = vendor.unprefixed(prop); + const prefix = vendor.prefix(prop).toLowerCase(); const overrideables = shorthandData[unprefixedProp.toLowerCase()]; diff --git a/lib/rules/declaration-property-unit-allowed-list/index.js b/lib/rules/declaration-property-unit-allowed-list/index.js index f57ad17b66..9cec92b445 100644 --- a/lib/rules/declaration-property-unit-allowed-list/index.js +++ b/lib/rules/declaration-property-unit-allowed-list/index.js @@ -6,11 +6,11 @@ const _ = require('lodash'); const declarationValueIndex = require('../../utils/declarationValueIndex'); const getUnitFromValueNode = require('../../utils/getUnitFromValueNode'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-property-unit-allowed-list'; @@ -33,7 +33,7 @@ function rule(list) { const prop = decl.prop; const value = decl.value; - const unprefixedProp = postcss.vendor.unprefixed(prop); + const unprefixedProp = vendor.unprefixed(prop); const propList = _.find(list, (units, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), diff --git a/lib/rules/declaration-property-unit-blacklist/index.js b/lib/rules/declaration-property-unit-blacklist/index.js index 6f0d883f5c..15eaf928c5 100644 --- a/lib/rules/declaration-property-unit-blacklist/index.js +++ b/lib/rules/declaration-property-unit-blacklist/index.js @@ -6,11 +6,11 @@ const _ = require('lodash'); const declarationValueIndex = require('../../utils/declarationValueIndex'); const getUnitFromValueNode = require('../../utils/getUnitFromValueNode'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-property-unit-blacklist'; @@ -41,7 +41,7 @@ function rule(list) { const prop = decl.prop; const value = decl.value; - const unprefixedProp = postcss.vendor.unprefixed(prop); + const unprefixedProp = vendor.unprefixed(prop); const propList = _.find(list, (units, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), diff --git a/lib/rules/declaration-property-unit-disallowed-list/index.js b/lib/rules/declaration-property-unit-disallowed-list/index.js index e4924d7be5..2f0f37cf12 100644 --- a/lib/rules/declaration-property-unit-disallowed-list/index.js +++ b/lib/rules/declaration-property-unit-disallowed-list/index.js @@ -6,11 +6,11 @@ const _ = require('lodash'); const declarationValueIndex = require('../../utils/declarationValueIndex'); const getUnitFromValueNode = require('../../utils/getUnitFromValueNode'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-property-unit-disallowed-list'; @@ -33,7 +33,7 @@ function rule(list) { const prop = decl.prop; const value = decl.value; - const unprefixedProp = postcss.vendor.unprefixed(prop); + const unprefixedProp = vendor.unprefixed(prop); const propList = _.find(list, (units, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), diff --git a/lib/rules/declaration-property-unit-whitelist/index.js b/lib/rules/declaration-property-unit-whitelist/index.js index 002e595000..a70bcfd512 100644 --- a/lib/rules/declaration-property-unit-whitelist/index.js +++ b/lib/rules/declaration-property-unit-whitelist/index.js @@ -6,11 +6,11 @@ const _ = require('lodash'); const declarationValueIndex = require('../../utils/declarationValueIndex'); const getUnitFromValueNode = require('../../utils/getUnitFromValueNode'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-property-unit-whitelist'; @@ -41,7 +41,7 @@ function rule(list) { const prop = decl.prop; const value = decl.value; - const unprefixedProp = postcss.vendor.unprefixed(prop); + const unprefixedProp = vendor.unprefixed(prop); const propList = _.find(list, (units, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), diff --git a/lib/rules/declaration-property-value-allowed-list/index.js b/lib/rules/declaration-property-value-allowed-list/index.js index 227bad0f83..4985a2aaa3 100644 --- a/lib/rules/declaration-property-value-allowed-list/index.js +++ b/lib/rules/declaration-property-value-allowed-list/index.js @@ -4,10 +4,10 @@ const _ = require('lodash'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-property-value-allowed-list'; @@ -30,7 +30,7 @@ function rule(list) { const prop = decl.prop; const value = decl.value; - const unprefixedProp = postcss.vendor.unprefixed(prop); + const unprefixedProp = vendor.unprefixed(prop); const propList = _.find(list, (values, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), ); diff --git a/lib/rules/declaration-property-value-blacklist/index.js b/lib/rules/declaration-property-value-blacklist/index.js index 7c7313632f..ced1e21978 100644 --- a/lib/rules/declaration-property-value-blacklist/index.js +++ b/lib/rules/declaration-property-value-blacklist/index.js @@ -4,10 +4,10 @@ const _ = require('lodash'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-property-value-blacklist'; @@ -38,7 +38,7 @@ function rule(list) { const prop = decl.prop; const value = decl.value; - const unprefixedProp = postcss.vendor.unprefixed(prop); + const unprefixedProp = vendor.unprefixed(prop); const propList = _.find(list, (values, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), ); diff --git a/lib/rules/declaration-property-value-disallowed-list/index.js b/lib/rules/declaration-property-value-disallowed-list/index.js index 21f3b7f0c9..ad7e4de385 100644 --- a/lib/rules/declaration-property-value-disallowed-list/index.js +++ b/lib/rules/declaration-property-value-disallowed-list/index.js @@ -4,10 +4,10 @@ const _ = require('lodash'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-property-value-disallowed-list'; @@ -30,7 +30,7 @@ function rule(list) { const prop = decl.prop; const value = decl.value; - const unprefixedProp = postcss.vendor.unprefixed(prop); + const unprefixedProp = vendor.unprefixed(prop); const propList = _.find(list, (values, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), ); diff --git a/lib/rules/declaration-property-value-whitelist/index.js b/lib/rules/declaration-property-value-whitelist/index.js index 076ac04a69..e6d95577e2 100644 --- a/lib/rules/declaration-property-value-whitelist/index.js +++ b/lib/rules/declaration-property-value-whitelist/index.js @@ -4,10 +4,10 @@ const _ = require('lodash'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'declaration-property-value-whitelist'; @@ -38,7 +38,7 @@ function rule(list) { const prop = decl.prop; const value = decl.value; - const unprefixedProp = postcss.vendor.unprefixed(prop); + const unprefixedProp = vendor.unprefixed(prop); const propList = _.find(list, (values, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), ); diff --git a/lib/rules/function-allowed-list/index.js b/lib/rules/function-allowed-list/index.js index d162557a56..4ff2a0c067 100644 --- a/lib/rules/function-allowed-list/index.js +++ b/lib/rules/function-allowed-list/index.js @@ -6,11 +6,11 @@ const _ = require('lodash'); const declarationValueIndex = require('../../utils/declarationValueIndex'); const isStandardSyntaxFunction = require('../../utils/isStandardSyntaxFunction'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'function-allowed-list'; @@ -43,7 +43,7 @@ function rule(listInput) { return; } - if (matchesStringOrRegExp(postcss.vendor.unprefixed(node.value), list)) { + if (matchesStringOrRegExp(vendor.unprefixed(node.value), list)) { return; } diff --git a/lib/rules/function-blacklist/index.js b/lib/rules/function-blacklist/index.js index f3e59af866..1c1e09cdc9 100644 --- a/lib/rules/function-blacklist/index.js +++ b/lib/rules/function-blacklist/index.js @@ -6,11 +6,11 @@ const _ = require('lodash'); const declarationValueIndex = require('../../utils/declarationValueIndex'); const isStandardSyntaxFunction = require('../../utils/isStandardSyntaxFunction'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'function-blacklist'; @@ -46,7 +46,7 @@ function rule(list) { return; } - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(node.value), list)) { + if (!matchesStringOrRegExp(vendor.unprefixed(node.value), list)) { return; } diff --git a/lib/rules/function-disallowed-list/index.js b/lib/rules/function-disallowed-list/index.js index 5f30bb862a..5b7cdea5d2 100644 --- a/lib/rules/function-disallowed-list/index.js +++ b/lib/rules/function-disallowed-list/index.js @@ -6,11 +6,11 @@ const _ = require('lodash'); const declarationValueIndex = require('../../utils/declarationValueIndex'); const isStandardSyntaxFunction = require('../../utils/isStandardSyntaxFunction'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'function-disallowed-list'; @@ -41,7 +41,7 @@ function rule(list) { return; } - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(node.value), list)) { + if (!matchesStringOrRegExp(vendor.unprefixed(node.value), list)) { return; } diff --git a/lib/rules/function-linear-gradient-no-nonstandard-direction/index.js b/lib/rules/function-linear-gradient-no-nonstandard-direction/index.js index 6476dde8ee..319b3b9c41 100644 --- a/lib/rules/function-linear-gradient-no-nonstandard-direction/index.js +++ b/lib/rules/function-linear-gradient-no-nonstandard-direction/index.js @@ -5,11 +5,11 @@ const declarationValueIndex = require('../../utils/declarationValueIndex'); const functionArgumentsSearch = require('../../utils/functionArgumentsSearch'); const isStandardSyntaxValue = require('../../utils/isStandardSyntaxValue'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'function-linear-gradient-no-nonstandard-direction'; @@ -83,7 +83,7 @@ function rule(actual) { return; } - const withToPrefix = !postcss.vendor.prefix(valueNode.value); + const withToPrefix = !vendor.prefix(valueNode.value); if (!isStandardDirection(firstArg, withToPrefix)) { complain(); diff --git a/lib/rules/function-whitelist/index.js b/lib/rules/function-whitelist/index.js index 7a72358f1d..d64abb84df 100644 --- a/lib/rules/function-whitelist/index.js +++ b/lib/rules/function-whitelist/index.js @@ -6,11 +6,11 @@ const _ = require('lodash'); const declarationValueIndex = require('../../utils/declarationValueIndex'); const isStandardSyntaxFunction = require('../../utils/isStandardSyntaxFunction'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'function-whitelist'; @@ -48,7 +48,7 @@ function rule(listInput) { return; } - if (matchesStringOrRegExp(postcss.vendor.unprefixed(node.value), list)) { + if (matchesStringOrRegExp(vendor.unprefixed(node.value), list)) { return; } diff --git a/lib/rules/media-feature-name-no-unknown/index.js b/lib/rules/media-feature-name-no-unknown/index.js index 38b27b29e9..491542d9ad 100644 --- a/lib/rules/media-feature-name-no-unknown/index.js +++ b/lib/rules/media-feature-name-no-unknown/index.js @@ -10,11 +10,11 @@ const isStandardSyntaxMediaFeatureName = require('../../utils/isStandardSyntaxMe const keywordSets = require('../../reference/keywordSets'); const mediaParser = require('postcss-media-query-parser').default; const optionsMatches = require('../../utils/optionsMatches'); -const postcss = require('postcss'); const rangeContextNodeParser = require('../rangeContextNodeParser'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'media-feature-name-no-unknown'; @@ -67,10 +67,7 @@ function rule(actual, options) { return; } - if ( - postcss.vendor.prefix(value) || - keywordSets.mediaFeatureNames.has(value.toLowerCase()) - ) { + if (vendor.prefix(value) || keywordSets.mediaFeatureNames.has(value.toLowerCase())) { return; } diff --git a/lib/rules/media-feature-name-value-allowed-list/index.js b/lib/rules/media-feature-name-value-allowed-list/index.js index 60272c91af..801551a29a 100644 --- a/lib/rules/media-feature-name-value-allowed-list/index.js +++ b/lib/rules/media-feature-name-value-allowed-list/index.js @@ -7,11 +7,11 @@ const atRuleParamIndex = require('../../utils/atRuleParamIndex'); const isRangeContextMediaFeature = require('../../utils/isRangeContextMediaFeature'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const mediaParser = require('postcss-media-query-parser').default; -const postcss = require('postcss'); const rangeContextNodeParser = require('../rangeContextNodeParser'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'media-feature-name-value-allowed-list'; @@ -57,7 +57,7 @@ function rule(list) { for (let i = 0; i < values.length; i++) { const valueNode = values[i]; const value = valueNode.value; - const unprefixedMediaFeatureName = postcss.vendor.unprefixed(mediaFeatureName); + const unprefixedMediaFeatureName = vendor.unprefixed(mediaFeatureName); const allowedValues = _.find(list, (v, featureName) => matchesStringOrRegExp(unprefixedMediaFeatureName, featureName), diff --git a/lib/rules/media-feature-name-value-whitelist/index.js b/lib/rules/media-feature-name-value-whitelist/index.js index c730fe6601..c410017924 100644 --- a/lib/rules/media-feature-name-value-whitelist/index.js +++ b/lib/rules/media-feature-name-value-whitelist/index.js @@ -7,11 +7,11 @@ const atRuleParamIndex = require('../../utils/atRuleParamIndex'); const isRangeContextMediaFeature = require('../../utils/isRangeContextMediaFeature'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const mediaParser = require('postcss-media-query-parser').default; -const postcss = require('postcss'); const rangeContextNodeParser = require('../rangeContextNodeParser'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'media-feature-name-value-whitelist'; @@ -65,7 +65,7 @@ function rule(list) { for (let i = 0; i < values.length; i++) { const valueNode = values[i]; const value = valueNode.value; - const unprefixedMediaFeatureName = postcss.vendor.unprefixed(mediaFeatureName); + const unprefixedMediaFeatureName = vendor.unprefixed(mediaFeatureName); const allowedValues = _.find(list, (v, featureName) => matchesStringOrRegExp(unprefixedMediaFeatureName, featureName), diff --git a/lib/rules/property-allowed-list/index.js b/lib/rules/property-allowed-list/index.js index 28f9df5be8..e94029db71 100644 --- a/lib/rules/property-allowed-list/index.js +++ b/lib/rules/property-allowed-list/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isCustomProperty = require('../../utils/isCustomProperty'); const isStandardSyntaxProperty = require('../../utils/isStandardSyntaxProperty'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'property-allowed-list'; @@ -39,7 +39,7 @@ function rule(list) { return; } - if (matchesStringOrRegExp(postcss.vendor.unprefixed(prop), list)) { + if (matchesStringOrRegExp(vendor.unprefixed(prop), list)) { return; } diff --git a/lib/rules/property-blacklist/index.js b/lib/rules/property-blacklist/index.js index 88653adf85..f1584acf86 100644 --- a/lib/rules/property-blacklist/index.js +++ b/lib/rules/property-blacklist/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isCustomProperty = require('../../utils/isCustomProperty'); const isStandardSyntaxProperty = require('../../utils/isStandardSyntaxProperty'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'property-blacklist'; @@ -44,7 +44,7 @@ function rule(list) { return; } - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(prop), list)) { + if (!matchesStringOrRegExp(vendor.unprefixed(prop), list)) { return; } diff --git a/lib/rules/property-disallowed-list/index.js b/lib/rules/property-disallowed-list/index.js index 21aff9a130..ca4bf45ab2 100644 --- a/lib/rules/property-disallowed-list/index.js +++ b/lib/rules/property-disallowed-list/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isCustomProperty = require('../../utils/isCustomProperty'); const isStandardSyntaxProperty = require('../../utils/isStandardSyntaxProperty'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'property-disallowed-list'; @@ -39,7 +39,7 @@ function rule(list) { return; } - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(prop), list)) { + if (!matchesStringOrRegExp(vendor.unprefixed(prop), list)) { return; } diff --git a/lib/rules/property-no-unknown/index.js b/lib/rules/property-no-unknown/index.js index ec9045042c..1b368cd7f7 100644 --- a/lib/rules/property-no-unknown/index.js +++ b/lib/rules/property-no-unknown/index.js @@ -7,11 +7,11 @@ const isCustomProperty = require('../../utils/isCustomProperty'); const isStandardSyntaxDeclaration = require('../../utils/isStandardSyntaxDeclaration'); const isStandardSyntaxProperty = require('../../utils/isStandardSyntaxProperty'); const optionsMatches = require('../../utils/optionsMatches'); -const postcss = require('postcss'); const properties = require('known-css-properties').all; const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'property-no-unknown'; @@ -59,7 +59,7 @@ function rule(actual, options) { return; } - if (!shouldCheckPrefixed && postcss.vendor.prefix(prop)) { + if (!shouldCheckPrefixed && vendor.prefix(prop)) { return; } diff --git a/lib/rules/property-no-vendor-prefix/index.js b/lib/rules/property-no-vendor-prefix/index.js index d5fbcc0969..8dcfc3c565 100644 --- a/lib/rules/property-no-vendor-prefix/index.js +++ b/lib/rules/property-no-vendor-prefix/index.js @@ -5,10 +5,10 @@ const _ = require('lodash'); const isAutoprefixable = require('../../utils/isAutoprefixable'); const optionsMatches = require('../../utils/optionsMatches'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'property-no-vendor-prefix'; @@ -37,7 +37,7 @@ function rule(actual, options, context) { root.walkDecls((decl) => { const prop = decl.prop; - const unprefixedProp = postcss.vendor.unprefixed(prop); + const unprefixedProp = vendor.unprefixed(prop); //return early if property is to be ignored if (optionsMatches(options, 'ignoreProperties', unprefixedProp)) { diff --git a/lib/rules/property-whitelist/index.js b/lib/rules/property-whitelist/index.js index ed423d3f93..65904a4664 100644 --- a/lib/rules/property-whitelist/index.js +++ b/lib/rules/property-whitelist/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isCustomProperty = require('../../utils/isCustomProperty'); const isStandardSyntaxProperty = require('../../utils/isStandardSyntaxProperty'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'property-whitelist'; @@ -44,7 +44,7 @@ function rule(list) { return; } - if (matchesStringOrRegExp(postcss.vendor.unprefixed(prop), list)) { + if (matchesStringOrRegExp(vendor.unprefixed(prop), list)) { return; } diff --git a/lib/rules/selector-pseudo-class-allowed-list/index.js b/lib/rules/selector-pseudo-class-allowed-list/index.js index 55f3da6f6b..a1dc06ac98 100644 --- a/lib/rules/selector-pseudo-class-allowed-list/index.js +++ b/lib/rules/selector-pseudo-class-allowed-list/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isStandardSyntaxRule = require('../../utils/isStandardSyntaxRule'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-class-allowed-list'; @@ -50,7 +50,7 @@ function rule(list) { const name = value.slice(1); - if (matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { + if (matchesStringOrRegExp(vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/selector-pseudo-class-blacklist/index.js b/lib/rules/selector-pseudo-class-blacklist/index.js index f9c1032854..991c913383 100644 --- a/lib/rules/selector-pseudo-class-blacklist/index.js +++ b/lib/rules/selector-pseudo-class-blacklist/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isStandardSyntaxRule = require('../../utils/isStandardSyntaxRule'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-class-blacklist'; @@ -59,7 +59,7 @@ function rule(list) { const name = value.slice(1); - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { + if (!matchesStringOrRegExp(vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/selector-pseudo-class-disallowed-list/index.js b/lib/rules/selector-pseudo-class-disallowed-list/index.js index ff36ae15ce..3bf8ebe198 100644 --- a/lib/rules/selector-pseudo-class-disallowed-list/index.js +++ b/lib/rules/selector-pseudo-class-disallowed-list/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isStandardSyntaxRule = require('../../utils/isStandardSyntaxRule'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-class-disallowed-list'; @@ -51,7 +51,7 @@ function rule(list) { const name = value.slice(1); - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { + if (!matchesStringOrRegExp(vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/selector-pseudo-class-no-unknown/index.js b/lib/rules/selector-pseudo-class-no-unknown/index.js index c00c0b7fdc..6278988f5e 100644 --- a/lib/rules/selector-pseudo-class-no-unknown/index.js +++ b/lib/rules/selector-pseudo-class-no-unknown/index.js @@ -11,10 +11,10 @@ const isStandardSyntaxSelector = require('../../utils/isStandardSyntaxSelector') const keywordSets = require('../../reference/keywordSets'); const optionsMatches = require('../../utils/optionsMatches'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-class-no-unknown'; @@ -74,7 +74,7 @@ function rule(actual, options) { index = atRuleParamIndex(node) + pseudoNode.sourceIndex; } else { if ( - postcss.vendor.prefix(name) || + vendor.prefix(name) || keywordSets.pseudoClasses.has(name) || keywordSets.pseudoElements.has(name) ) { @@ -92,7 +92,7 @@ function rule(actual, options) { } while (prevPseudoElement); if (prevPseudoElement) { - const prevPseudoElementValue = postcss.vendor.unprefixed( + const prevPseudoElementValue = vendor.unprefixed( prevPseudoElement.value.toLowerCase().slice(2), ); diff --git a/lib/rules/selector-pseudo-class-whitelist/index.js b/lib/rules/selector-pseudo-class-whitelist/index.js index cd602b05ed..0c8a82d937 100644 --- a/lib/rules/selector-pseudo-class-whitelist/index.js +++ b/lib/rules/selector-pseudo-class-whitelist/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isStandardSyntaxRule = require('../../utils/isStandardSyntaxRule'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-class-whitelist'; @@ -58,7 +58,7 @@ function rule(list) { const name = value.slice(1); - if (matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { + if (matchesStringOrRegExp(vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/selector-pseudo-element-allowed-list/index.js b/lib/rules/selector-pseudo-element-allowed-list/index.js index 3c39bf2e9d..8663aff392 100644 --- a/lib/rules/selector-pseudo-element-allowed-list/index.js +++ b/lib/rules/selector-pseudo-element-allowed-list/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isStandardSyntaxRule = require('../../utils/isStandardSyntaxRule'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-element-allowed-list'; @@ -50,7 +50,7 @@ function rule(list) { const name = value.slice(2); - if (matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { + if (matchesStringOrRegExp(vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/selector-pseudo-element-blacklist/index.js b/lib/rules/selector-pseudo-element-blacklist/index.js index 41975389a4..4ae53a1d85 100644 --- a/lib/rules/selector-pseudo-element-blacklist/index.js +++ b/lib/rules/selector-pseudo-element-blacklist/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isStandardSyntaxRule = require('../../utils/isStandardSyntaxRule'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-element-blacklist'; @@ -58,7 +58,7 @@ function rule(list) { const name = value.slice(2); - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { + if (!matchesStringOrRegExp(vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/selector-pseudo-element-disallowed-list/index.js b/lib/rules/selector-pseudo-element-disallowed-list/index.js index 0c9552b39b..a0349904c4 100644 --- a/lib/rules/selector-pseudo-element-disallowed-list/index.js +++ b/lib/rules/selector-pseudo-element-disallowed-list/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isStandardSyntaxRule = require('../../utils/isStandardSyntaxRule'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-element-disallowed-list'; @@ -50,7 +50,7 @@ function rule(list) { const name = value.slice(2); - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { + if (!matchesStringOrRegExp(vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/selector-pseudo-element-no-unknown/index.js b/lib/rules/selector-pseudo-element-no-unknown/index.js index 54d2ecb570..970b60c720 100644 --- a/lib/rules/selector-pseudo-element-no-unknown/index.js +++ b/lib/rules/selector-pseudo-element-no-unknown/index.js @@ -8,10 +8,10 @@ const isStandardSyntaxSelector = require('../../utils/isStandardSyntaxSelector') const keywordSets = require('../../reference/keywordSets'); const optionsMatches = require('../../utils/optionsMatches'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-element-no-unknown'; @@ -70,7 +70,7 @@ function rule(actual, options) { const name = value.slice(2); - if (postcss.vendor.prefix(name) || keywordSets.pseudoElements.has(name.toLowerCase())) { + if (vendor.prefix(name) || keywordSets.pseudoElements.has(name.toLowerCase())) { return; } diff --git a/lib/rules/selector-pseudo-element-whitelist/index.js b/lib/rules/selector-pseudo-element-whitelist/index.js index 679b76a715..cd6a8d7c89 100644 --- a/lib/rules/selector-pseudo-element-whitelist/index.js +++ b/lib/rules/selector-pseudo-element-whitelist/index.js @@ -6,10 +6,10 @@ const _ = require('lodash'); const isStandardSyntaxRule = require('../../utils/isStandardSyntaxRule'); const matchesStringOrRegExp = require('../../utils/matchesStringOrRegExp'); const parseSelector = require('../../utils/parseSelector'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'selector-pseudo-element-whitelist'; @@ -58,7 +58,7 @@ function rule(list) { const name = value.slice(2); - if (matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { + if (matchesStringOrRegExp(vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/shorthand-property-no-redundant-values/index.js b/lib/rules/shorthand-property-no-redundant-values/index.js index aea549e688..a4fe764c7d 100644 --- a/lib/rules/shorthand-property-no-redundant-values/index.js +++ b/lib/rules/shorthand-property-no-redundant-values/index.js @@ -4,11 +4,11 @@ const isStandardSyntaxDeclaration = require('../../utils/isStandardSyntaxDeclaration'); const isStandardSyntaxProperty = require('../../utils/isStandardSyntaxProperty'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'shorthand-property-no-redundant-values'; @@ -90,7 +90,7 @@ function rule(actual, secondary, context) { const prop = decl.prop; const value = decl.value; - const normalizedProp = postcss.vendor.unprefixed(prop.toLowerCase()); + const normalizedProp = vendor.unprefixed(prop.toLowerCase()); if (hasIgnoredCharacters(value) || !isShorthandProperty(normalizedProp)) { return; diff --git a/lib/rules/time-min-milliseconds/index.js b/lib/rules/time-min-milliseconds/index.js index 7971a757b1..0e36002d66 100644 --- a/lib/rules/time-min-milliseconds/index.js +++ b/lib/rules/time-min-milliseconds/index.js @@ -11,6 +11,7 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'time-min-milliseconds'; @@ -43,7 +44,7 @@ function rule(minimum, options) { } root.walkDecls((decl) => { - const propertyName = postcss.vendor.unprefixed(decl.prop.toLowerCase()); + const propertyName = vendor.unprefixed(decl.prop.toLowerCase()); if ( keywordSets.longhandTimeProperties.has(propertyName) && diff --git a/lib/rules/unit-no-unknown/index.js b/lib/rules/unit-no-unknown/index.js index a7378b3605..090a6dce3e 100644 --- a/lib/rules/unit-no-unknown/index.js +++ b/lib/rules/unit-no-unknown/index.js @@ -10,11 +10,11 @@ const isMap = require('../../utils/isMap'); const keywordSets = require('../../reference/keywordSets'); const mediaParser = require('postcss-media-query-parser').default; const optionsMatches = require('../../utils/optionsMatches'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); +const vendor = require('../../utils/vendor'); const ruleName = 'unit-no-unknown'; @@ -121,7 +121,7 @@ function rule(actual, options) { if (/^(?:-webkit-)?image-set[\s(]/i.test(value)) { const imageSet = parsedValue.nodes.find( - (node) => postcss.vendor.unprefixed(node.value) === 'image-set', + (node) => vendor.unprefixed(node.value) === 'image-set', ); const imageSetValueLastIndex = _.last(imageSet.nodes).sourceIndex; diff --git a/lib/rules/value-no-vendor-prefix/index.js b/lib/rules/value-no-vendor-prefix/index.js index ba4b3609c3..416b28c0f0 100644 --- a/lib/rules/value-no-vendor-prefix/index.js +++ b/lib/rules/value-no-vendor-prefix/index.js @@ -7,11 +7,11 @@ const isAutoprefixable = require('../../utils/isAutoprefixable'); const isStandardSyntaxDeclaration = require('../../utils/isStandardSyntaxDeclaration'); const isStandardSyntaxProperty = require('../../utils/isStandardSyntaxProperty'); const optionsMatches = require('../../utils/optionsMatches'); -const postcss = require('postcss'); const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const styleSearch = require('style-search'); const validateOptions = require('../../utils/validateOptions'); +const vendor = require('../../utils/vendor'); const ruleName = 'value-no-vendor-prefix'; @@ -51,7 +51,7 @@ function rule(actual, options, context) { const prop = decl.prop; const value = decl.value; - const unprefixedValue = postcss.vendor.unprefixed(value); + const unprefixedValue = vendor.unprefixed(value); //return early if value is to be ignored if (optionsMatches(options, 'ignoreValues', unprefixedValue)) { diff --git a/lib/utils/__tests__/vendor.test.js b/lib/utils/__tests__/vendor.test.js new file mode 100644 index 0000000000..27e95f7bd7 --- /dev/null +++ b/lib/utils/__tests__/vendor.test.js @@ -0,0 +1,17 @@ +'use strict'; + +const vendor = require('../vendor'); + +const VALUE = '-1px -1px 1px rgba(0, 0, 0, 0.2) inset'; + +it('returns prefix', () => { + expect(vendor.prefix('-moz-color')).toEqual('-moz-'); + expect(vendor.prefix('color')).toEqual(''); + expect(vendor.prefix(VALUE)).toEqual(''); +}); + +it('returns unprefixed version', () => { + expect(vendor.unprefixed('-moz-color')).toEqual('color'); + expect(vendor.unprefixed('color')).toEqual('color'); + expect(vendor.unprefixed(VALUE)).toEqual(VALUE); +}); diff --git a/lib/utils/vendor.js b/lib/utils/vendor.js new file mode 100644 index 0000000000..b56b180c0d --- /dev/null +++ b/lib/utils/vendor.js @@ -0,0 +1,45 @@ +'use strict'; + +/** + * Contains helpers for working with vendor prefixes. + * + * Copied from https://github.com/postcss/postcss/commit/777c55b5d2a10605313a4972888f4f32005f5ac2 + * + * @namespace vendor + */ +module.exports = { + /** + * Returns the vendor prefix extracted from an input string. + * + * @param {string} prop String with or without vendor prefix. + * + * @return {string} vendor prefix or empty string + * + * @example + * vendor.prefix('-moz-tab-size') //=> '-moz-' + * vendor.prefix('tab-size') //=> '' + */ + prefix(prop) { + let match = prop.match(/^(-\w+-)/); + + if (match) { + return match[0]; + } + + return ''; + }, + + /** + * Returns the input string stripped of its vendor prefix. + * + * @param {string} prop String with or without vendor prefix. + * + * @return {string} String name without vendor prefixes. + * + * @example + * vendor.unprefixed('-moz-tab-size') //=> 'tab-size' + */ + unprefixed(prop) { + return prop.replace(/^-\w+-/, ''); + }, +}; From 847fddc9cf9790df7cd865a3f437b5038a35efca Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Tue, 13 Oct 2020 23:08:39 +0900 Subject: [PATCH 28/46] Fix some tests that use callbacks (#4970) --- lib/utils/__tests__/findAtRuleContext.test.js | 45 ++++++++----------- .../isContextFunctionalPseudoClass.test.js | 40 ++++++----------- lib/utils/__tests__/isMap.test.js | 40 +++++++++++------ .../isStandardSyntaxFunction.test.js | 28 +++++------- 4 files changed, 70 insertions(+), 83 deletions(-) diff --git a/lib/utils/__tests__/findAtRuleContext.test.js b/lib/utils/__tests__/findAtRuleContext.test.js index 0d32536094..3718ec5914 100644 --- a/lib/utils/__tests__/findAtRuleContext.test.js +++ b/lib/utils/__tests__/findAtRuleContext.test.js @@ -5,31 +5,24 @@ const postcss = require('postcss'); it('findAtRuleContext', () => { const css = ` - a {} - @media print { - b {} - } - @media (min-width: 900px) { - c {} - } - d {} - `; + a {} + @media print { + b {} + } + @media (min-width: 900px) { + c {} + } + `; - postcss.parse(css).walkRules((rule) => { - switch (rule.selector) { - case 'a': - expect(findAtRuleContext(rule)).toBeNull(); - break; - case 'b': - expect(findAtRuleContext(rule).params).toBe('print'); - break; - case 'c': - expect(findAtRuleContext(rule).params).toBe('(min-width: 900px)'); - break; - case 'd': - expect(findAtRuleContext(rule)).toBeNull(); - break; - default: - } - }); + expect(findAtRuleContext(rule(css, 'a'))).toBeNull(); + expect(findAtRuleContext(rule(css, 'b'))).toHaveProperty('params', 'print'); + expect(findAtRuleContext(rule(css, 'c'))).toHaveProperty('params', '(min-width: 900px)'); }); + +function rule(css, selector) { + const rules = []; + + postcss.parse(css).walkRules(selector, (r) => rules.push(r)); + + return rules[0]; +} diff --git a/lib/utils/__tests__/isContextFunctionalPseudoClass.test.js b/lib/utils/__tests__/isContextFunctionalPseudoClass.test.js index f3f506128b..6ad9396d9b 100644 --- a/lib/utils/__tests__/isContextFunctionalPseudoClass.test.js +++ b/lib/utils/__tests__/isContextFunctionalPseudoClass.test.js @@ -4,45 +4,33 @@ const isContextFunctionalPseudoClass = require('../isContextFunctionalPseudoClas const parseSelector = require('postcss-selector-parser'); const postcss = require('postcss'); -function selector(css, cb) { +function pseudo(css) { + const pseudos = []; + postcss.parse(css).walkRules((rule) => { parseSelector((selectorAST) => { - selectorAST.walkPseudos(cb); + selectorAST.walkPseudos((p) => pseudos.push(p)); }).processSync(rule.selector); }); + + return pseudos[0]; } describe('isContextFunctionalPseudoClass', () => { it('handles non-context-functional pseudo-classes, like hover', () => { - selector('a:hover {}', (selector) => { - expect(isContextFunctionalPseudoClass(selector)).toBe(false); - }); + expect(isContextFunctionalPseudoClass(pseudo('a:hover {}'))).toBe(false); }); it('handles logical combinations, ', () => { - selector('a:has(.foo) {}', (selector) => { - expect(isContextFunctionalPseudoClass(selector)).toBe(true); - }); - selector('a:is(.foo) {}', (selector) => { - expect(isContextFunctionalPseudoClass(selector)).toBe(true); - }); - selector('a:matches(.foo) {}', (selector) => { - expect(isContextFunctionalPseudoClass(selector)).toBe(true); - }); - selector('a:not(.foo) {}', (selector) => { - expect(isContextFunctionalPseudoClass(selector)).toBe(true); - }); - selector('a:where(.foo) {}', (selector) => { - expect(isContextFunctionalPseudoClass(selector)).toBe(true); - }); + expect(isContextFunctionalPseudoClass(pseudo('a:has(.foo) {}'))).toBe(true); + expect(isContextFunctionalPseudoClass(pseudo('a:is(.foo) {}'))).toBe(true); + expect(isContextFunctionalPseudoClass(pseudo('a:matches(.foo) {}'))).toBe(true); + expect(isContextFunctionalPseudoClass(pseudo('a:not(.foo) {}'))).toBe(true); + expect(isContextFunctionalPseudoClass(pseudo('a:where(.foo) {}'))).toBe(true); }); it('handles tree structural/NPlusBOfSNotationPseudoClasses classes', () => { - selector('a:nth-child(n+7) {}', (selector) => { - expect(isContextFunctionalPseudoClass(selector)).toBe(true); - }); - selector('a:nth-last-child(n+7) {}', (selector) => { - expect(isContextFunctionalPseudoClass(selector)).toBe(true); - }); + expect(isContextFunctionalPseudoClass(pseudo('a:nth-child(n+7) {}'))).toBe(true); + expect(isContextFunctionalPseudoClass(pseudo('a:nth-last-child(n+7) {}'))).toBe(true); }); }); diff --git a/lib/utils/__tests__/isMap.test.js b/lib/utils/__tests__/isMap.test.js index 99a950878f..126ef96276 100644 --- a/lib/utils/__tests__/isMap.test.js +++ b/lib/utils/__tests__/isMap.test.js @@ -19,7 +19,11 @@ describe('isMap', () => { ]; test.each(simpleMaps)('simple maps', (css, expected) => { - runTests(css, (decl) => { + const decls = declarations(css); + + expect(decls).toHaveLength(2); + + decls.forEach((decl) => { const parsedValue = valueParser(decl.value).nodes[0]; expect(isMap(parsedValue)).toBe(expected); @@ -27,10 +31,19 @@ describe('isMap', () => { }); test.each(nestedMaps)('nested maps', (css, expected) => { - runTests(css, (decl) => { + const decls = declarations(css); + + expect(decls).toHaveLength(2); + + decls.forEach((decl) => { const parsedValue = valueParser(decl.value); - parsedValue.walk((valueNode) => { + const valueNodes = []; + + parsedValue.walk((valueNode) => valueNodes.push(valueNode)); + + expect(valueNodes.length).toBeGreaterThan(0); + valueNodes.forEach((valueNode) => { if (expected.includes(valueNode.sourceIndex)) { expect(isMap(valueNode)).toBeTruthy(); } else { @@ -43,7 +56,11 @@ describe('isMap', () => { it('empty map returns `false`', () => { const emptyMap = '$map: ();'; - runTests(emptyMap, (decl) => { + const decls = declarations(emptyMap); + + expect(decls).toHaveLength(2); + + decls.forEach((decl) => { const parsedValue = valueParser(decl.value); expect(isMap(parsedValue)).toBeFalsy(); @@ -51,16 +68,11 @@ describe('isMap', () => { }); }); -function sassDecls(css, cb) { - sass.parse(css).walkDecls(cb); -} +function declarations(css) { + const list = []; -function scssDecls(css, cb) { - scss.parse(css).walkDecls(cb); -} + sass.parse(css).walkDecls((decl) => list.push(decl)); + scss.parse(css).walkDecls((decl) => list.push(decl)); -function runTests(css, cb) { - [sassDecls, scssDecls].forEach((fn) => { - fn(css, cb); - }); + return list; } diff --git a/lib/utils/__tests__/isStandardSyntaxFunction.test.js b/lib/utils/__tests__/isStandardSyntaxFunction.test.js index 49136e94f4..28baa672a8 100644 --- a/lib/utils/__tests__/isStandardSyntaxFunction.test.js +++ b/lib/utils/__tests__/isStandardSyntaxFunction.test.js @@ -6,38 +6,32 @@ const valueParser = require('postcss-value-parser'); describe('isStandardSyntaxFunction', () => { it('calc', () => { - funcs('a { prop: calc(a + b) }', (func) => { - expect(isStandardSyntaxFunction(func)).toBeTruthy(); - }); + expect(isStandardSyntaxFunction(func('a { prop: calc(a + b) }'))).toBe(true); }); it('url', () => { - funcs("a { prop: url('x.css') }", (func) => { - expect(isStandardSyntaxFunction(func)).toBeTruthy(); - }); + expect(isStandardSyntaxFunction(func("a { prop: url('x.css') }"))).toBe(true); }); it('scss list', () => { - funcs('a { $list: (list) }', (func) => { - expect(isStandardSyntaxFunction(func)).toBeFalsy(); - }); + expect(isStandardSyntaxFunction(func('a { $list: (list) }'))).toBe(false); }); it('scss map', () => { - funcs('a { $map: (key: value) }', (func) => { - expect(isStandardSyntaxFunction(func)).toBeFalsy(); - }); + expect(isStandardSyntaxFunction(func('a { $map: (key: value) }'))).toBe(false); }); }); -function funcs(css, cb) { +function func(css) { + const functions = []; + postcss.parse(css).walkDecls((decl) => { valueParser(decl.value).walk((valueNode) => { - if (valueNode.type !== 'function') { - return; + if (valueNode.type === 'function') { + functions.push(valueNode); } - - cb(valueNode); }); }); + + return functions[0]; } From a922acf2f946f10070313d0f8c5b83fd1f23675d Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Wed, 14 Oct 2020 11:05:24 +0200 Subject: [PATCH 29/46] Update dependencies (#4982) --- .github/workflows/code-scanning.yml | 1 - lib/__tests__/disableRanges.test.js | 4 +- lib/__tests__/standalone.test.js | 74 +- .../isContextFunctionalPseudoClass.test.js | 2 +- .../isStandardSyntaxMediaFeatureName.test.js | 2 +- package-lock.json | 1011 +++++++++-------- package.json | 28 +- 7 files changed, 606 insertions(+), 516 deletions(-) diff --git a/.github/workflows/code-scanning.yml b/.github/workflows/code-scanning.yml index 3f811bc964..ff827220a1 100644 --- a/.github/workflows/code-scanning.yml +++ b/.github/workflows/code-scanning.yml @@ -27,7 +27,6 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v1 - # Override language selection by uncommenting this and choosing your languages # with: # languages: go, javascript, csharp, python, cpp, java diff --git a/lib/__tests__/disableRanges.test.js b/lib/__tests__/disableRanges.test.js index 26e6696581..2b86021182 100644 --- a/lib/__tests__/disableRanges.test.js +++ b/lib/__tests__/disableRanges.test.js @@ -875,7 +875,7 @@ it('SCSS // disable comment (with // comment immediately before)', () => { }); }); -it('SCSS two adjacent // disable comments ', () => { +it('SCSS two adjacent // disable comments', () => { const scssSource = `a { // stylelint-disable declaration-no-important // stylelint-disable foo-bar @@ -904,7 +904,7 @@ it('SCSS two adjacent // disable comments ', () => { }); }); -it('SCSS two adjacent // disable comments with multi-line descriptions ', () => { +it('SCSS two adjacent // disable comments with multi-line descriptions', () => { const scssSource = `a { // stylelint-disable declaration-no-important -- // Description 1 diff --git a/lib/__tests__/standalone.test.js b/lib/__tests__/standalone.test.js index 523ff0b928..d5fca2a58b 100644 --- a/lib/__tests__/standalone.test.js +++ b/lib/__tests__/standalone.test.js @@ -31,40 +31,46 @@ describe('standalone with one input file', () => { }); }); -describe('standalone with two file-specific globs', () => { - const twoCsses = [`${fixturesPath}/e*y-block.*`, `${fixturesPath}/invalid-h*.css`]; - - let output; - let results; - - beforeEach(() => { - return standalone({ - files: twoCsses, - config: { - rules: { 'block-no-empty': true, 'color-no-invalid-hex': true }, - }, - }).then((data) => { - output = data.output; - results = data.results; - }); - }); - - it('triggers warnings', () => { - expect(output).toContain('block-no-empty'); - expect(output).toContain('color-no-invalid-hex'); - expect(results).toHaveLength(2); - expect(results[0].warnings).toHaveLength(1); - expect(results[1].warnings).toHaveLength(1); - - // Ordering of the files is non-deterministic, I believe - if (results[0].source.includes('empty-block')) { - expect(results[0].warnings[0].rule).toBe('block-no-empty'); - expect(results[1].warnings[0].rule).toBe('color-no-invalid-hex'); - } else { - expect(results[1].warnings[0].rule).toBe('block-no-empty'); - expect(results[0].warnings[0].rule).toBe('color-no-invalid-hex'); - } - }); +it('standalone with two file-specific globs', async () => { + const { output, results } = await standalone({ + files: [`${fixturesPath}/e*y-block.*`, `${fixturesPath}/invalid-h*.css`], + config: { + rules: { 'block-no-empty': true, 'color-no-invalid-hex': true }, + }, + }); + + expect(output).toContain('block-no-empty'); + expect(output).toContain('color-no-invalid-hex'); + expect(results).toHaveLength(2); + expect(results[0].warnings).toHaveLength(1); + expect(results[1].warnings).toHaveLength(1); + + /** + * Expecting warnings for these two rules, and order of warnings is not important, + * because files could be linted in any order + * [ + * { warnings: [{ rule: 'block-no-empty' }] }, + * { warnings: [{ rule: 'color-no-invalid-hex' }] }, + * ] + */ + expect(results).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + warnings: expect.arrayContaining([ + expect.objectContaining({ + rule: 'block-no-empty', + }), + ]), + }), + expect.objectContaining({ + warnings: expect.arrayContaining([ + expect.objectContaining({ + rule: 'color-no-invalid-hex', + }), + ]), + }), + ]), + ); }); describe('standalone with files and globbyOptions', () => { diff --git a/lib/utils/__tests__/isContextFunctionalPseudoClass.test.js b/lib/utils/__tests__/isContextFunctionalPseudoClass.test.js index 6ad9396d9b..4c8b642df1 100644 --- a/lib/utils/__tests__/isContextFunctionalPseudoClass.test.js +++ b/lib/utils/__tests__/isContextFunctionalPseudoClass.test.js @@ -21,7 +21,7 @@ describe('isContextFunctionalPseudoClass', () => { expect(isContextFunctionalPseudoClass(pseudo('a:hover {}'))).toBe(false); }); - it('handles logical combinations, ', () => { + it('handles logical combinations', () => { expect(isContextFunctionalPseudoClass(pseudo('a:has(.foo) {}'))).toBe(true); expect(isContextFunctionalPseudoClass(pseudo('a:is(.foo) {}'))).toBe(true); expect(isContextFunctionalPseudoClass(pseudo('a:matches(.foo) {}'))).toBe(true); diff --git a/lib/utils/__tests__/isStandardSyntaxMediaFeatureName.test.js b/lib/utils/__tests__/isStandardSyntaxMediaFeatureName.test.js index e05e4d9db9..061fddd8a6 100644 --- a/lib/utils/__tests__/isStandardSyntaxMediaFeatureName.test.js +++ b/lib/utils/__tests__/isStandardSyntaxMediaFeatureName.test.js @@ -24,7 +24,7 @@ describe('isStandardSyntaxMediaFeatureName', () => { it('scss var single quoted addition', () => { expect(isStandardSyntaxMediaFeatureName("'min-width + $value'")).toBeFalsy(); }); - it('scss var single quoted added to ', () => { + it('scss var single quoted added to', () => { expect(isStandardSyntaxMediaFeatureName("'$value + min-width'")).toBeFalsy(); }); it('scss var doubled quoted addition', () => { diff --git a/package-lock.json b/package-lock.json index b515b54f2e..62f0188753 100644 --- a/package-lock.json +++ b/package-lock.json @@ -328,6 +328,47 @@ "minimist": "^1.2.0" } }, + "@eslint/eslintrc": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", + "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -348,48 +389,48 @@ "dev": true }, "@jest/console": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.3.0.tgz", - "integrity": "sha512-/5Pn6sJev0nPUcAdpJHMVIsA8sKizL2ZkcKPE5+dJrCccks7tcM7c9wbgHudBJbxXLoTbqsHkG1Dofoem4F09w==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.5.2.tgz", + "integrity": "sha512-lJELzKINpF1v74DXHbCRIkQ/+nUV1M+ntj+X1J8LxCgpmJZjfLmhFejiMSbjjD66fayxl5Z06tbs3HMyuik6rw==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^26.3.0", - "jest-util": "^26.3.0", + "jest-message-util": "^26.5.2", + "jest-util": "^26.5.2", "slash": "^3.0.0" } }, "@jest/core": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.4.2.tgz", - "integrity": "sha512-sDva7YkeNprxJfepOctzS8cAk9TOekldh+5FhVuXS40+94SHbiicRO1VV2tSoRtgIo+POs/Cdyf8p76vPTd6dg==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.5.3.tgz", + "integrity": "sha512-CiU0UKFF1V7KzYTVEtFbFmGLdb2g4aTtY0WlyUfLgj/RtoTnJFhh50xKKr7OYkdmBUlGFSa2mD1TU3UZ6OLd4g==", "dev": true, "requires": { - "@jest/console": "^26.3.0", - "@jest/reporters": "^26.4.1", - "@jest/test-result": "^26.3.0", - "@jest/transform": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/console": "^26.5.2", + "@jest/reporters": "^26.5.3", + "@jest/test-result": "^26.5.2", + "@jest/transform": "^26.5.2", + "@jest/types": "^26.5.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.3.0", - "jest-config": "^26.4.2", - "jest-haste-map": "^26.3.0", - "jest-message-util": "^26.3.0", + "jest-changed-files": "^26.5.2", + "jest-config": "^26.5.3", + "jest-haste-map": "^26.5.2", + "jest-message-util": "^26.5.2", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.4.0", - "jest-resolve-dependencies": "^26.4.2", - "jest-runner": "^26.4.2", - "jest-runtime": "^26.4.2", - "jest-snapshot": "^26.4.2", - "jest-util": "^26.3.0", - "jest-validate": "^26.4.2", - "jest-watcher": "^26.3.0", + "jest-resolve": "^26.5.2", + "jest-resolve-dependencies": "^26.5.3", + "jest-runner": "^26.5.3", + "jest-runtime": "^26.5.3", + "jest-snapshot": "^26.5.3", + "jest-util": "^26.5.2", + "jest-validate": "^26.5.3", + "jest-watcher": "^26.5.2", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "rimraf": "^3.0.0", @@ -409,53 +450,53 @@ } }, "@jest/environment": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.3.0.tgz", - "integrity": "sha512-EW+MFEo0DGHahf83RAaiqQx688qpXgl99wdb8Fy67ybyzHwR1a58LHcO376xQJHfmoXTu89M09dH3J509cx2AA==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.5.2.tgz", + "integrity": "sha512-YjhCD/Zhkz0/1vdlS/QN6QmuUdDkpgBdK4SdiVg4Y19e29g4VQYN5Xg8+YuHjdoWGY7wJHMxc79uDTeTOy9Ngw==", "dev": true, "requires": { - "@jest/fake-timers": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/fake-timers": "^26.5.2", + "@jest/types": "^26.5.2", "@types/node": "*", - "jest-mock": "^26.3.0" + "jest-mock": "^26.5.2" } }, "@jest/fake-timers": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.3.0.tgz", - "integrity": "sha512-ZL9ytUiRwVP8ujfRepffokBvD2KbxbqMhrXSBhSdAhISCw3gOkuntisiSFv+A6HN0n0fF4cxzICEKZENLmW+1A==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.5.2.tgz", + "integrity": "sha512-09Hn5Oraqt36V1akxQeWMVL0fR9c6PnEhpgLaYvREXZJAh2H2Y+QLCsl0g7uMoJeoWJAuz4tozk1prbR1Fc1sw==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "@sinonjs/fake-timers": "^6.0.1", "@types/node": "*", - "jest-message-util": "^26.3.0", - "jest-mock": "^26.3.0", - "jest-util": "^26.3.0" + "jest-message-util": "^26.5.2", + "jest-mock": "^26.5.2", + "jest-util": "^26.5.2" } }, "@jest/globals": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.4.2.tgz", - "integrity": "sha512-Ot5ouAlehhHLRhc+sDz2/9bmNv9p5ZWZ9LE1pXGGTCXBasmi5jnYjlgYcYt03FBwLmZXCZ7GrL29c33/XRQiow==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.5.3.tgz", + "integrity": "sha512-7QztI0JC2CuB+Wx1VdnOUNeIGm8+PIaqngYsZXQCkH2QV0GFqzAYc9BZfU0nuqA6cbYrWh5wkuMzyii3P7deug==", "dev": true, "requires": { - "@jest/environment": "^26.3.0", - "@jest/types": "^26.3.0", - "expect": "^26.4.2" + "@jest/environment": "^26.5.2", + "@jest/types": "^26.5.2", + "expect": "^26.5.3" } }, "@jest/reporters": { - "version": "26.4.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.4.1.tgz", - "integrity": "sha512-aROTkCLU8++yiRGVxLsuDmZsQEKO6LprlrxtAuzvtpbIFl3eIjgIf3EUxDKgomkS25R9ZzwGEdB5weCcBZlrpQ==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.5.3.tgz", + "integrity": "sha512-X+vR0CpfMQzYcYmMFKNY9n4jklcb14Kffffp7+H/MqitWnb0440bW2L76NGWKAa+bnXhNoZr+lCVtdtPmfJVOQ==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.3.0", - "@jest/test-result": "^26.3.0", - "@jest/transform": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/console": "^26.5.2", + "@jest/test-result": "^26.5.2", + "@jest/transform": "^26.5.2", + "@jest/types": "^26.5.2", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", @@ -466,16 +507,16 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.3.0", - "jest-resolve": "^26.4.0", - "jest-util": "^26.3.0", - "jest-worker": "^26.3.0", + "jest-haste-map": "^26.5.2", + "jest-resolve": "^26.5.2", + "jest-util": "^26.5.2", + "jest-worker": "^26.5.0", "node-notifier": "^8.0.0", "slash": "^3.0.0", "source-map": "^0.6.0", "string-length": "^4.0.1", "terminal-link": "^2.0.0", - "v8-to-istanbul": "^5.0.1" + "v8-to-istanbul": "^6.0.1" }, "dependencies": { "source-map": { @@ -487,9 +528,9 @@ } }, "@jest/source-map": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.3.0.tgz", - "integrity": "sha512-hWX5IHmMDWe1kyrKl7IhFwqOuAreIwHhbe44+XH2ZRHjrKIh0LO5eLQ/vxHFeAfRwJapmxuqlGAEYLadDq6ZGQ==", + "version": "26.5.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.5.0.tgz", + "integrity": "sha512-jWAw9ZwYHJMe9eZq/WrsHlwF8E3hM9gynlcDpOyCb9bR8wEd9ZNBZCi7/jZyzHxC7t3thZ10gO2IDhu0bPKS5g==", "dev": true, "requires": { "callsites": "^3.0.0", @@ -506,46 +547,46 @@ } }, "@jest/test-result": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.3.0.tgz", - "integrity": "sha512-a8rbLqzW/q7HWheFVMtghXV79Xk+GWwOK1FrtimpI5n1la2SY0qHri3/b0/1F0Ve0/yJmV8pEhxDfVwiUBGtgg==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.5.2.tgz", + "integrity": "sha512-E/Zp6LURJEGSCWpoMGmCFuuEI1OWuI3hmZwmULV0GsgJBh7u0rwqioxhRU95euUuviqBDN8ruX/vP/4bwYolXw==", "dev": true, "requires": { - "@jest/console": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/console": "^26.5.2", + "@jest/types": "^26.5.2", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.4.2.tgz", - "integrity": "sha512-83DRD8N3M0tOhz9h0bn6Kl6dSp+US6DazuVF8J9m21WAp5x7CqSMaNycMP0aemC/SH/pDQQddbsfHRTBXVUgog==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.5.3.tgz", + "integrity": "sha512-Wqzb7aQ13L3T47xHdpUqYMOpiqz6Dx2QDDghp5AV/eUDXR7JieY+E1s233TQlNyl+PqtqgjVokmyjzX/HA51BA==", "dev": true, "requires": { - "@jest/test-result": "^26.3.0", + "@jest/test-result": "^26.5.2", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.3.0", - "jest-runner": "^26.4.2", - "jest-runtime": "^26.4.2" + "jest-haste-map": "^26.5.2", + "jest-runner": "^26.5.3", + "jest-runtime": "^26.5.3" } }, "@jest/transform": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.3.0.tgz", - "integrity": "sha512-Isj6NB68QorGoFWvcOjlUhpkT56PqNIsXKR7XfvoDlCANn/IANlh8DrKAA2l2JKC3yWSMH5wS0GwuQM20w3b2A==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.5.2.tgz", + "integrity": "sha512-AUNjvexh+APhhmS8S+KboPz+D3pCxPvEAGduffaAJYxIFxGi/ytZQkrqcKDUU0ERBAo5R7087fyOYr2oms1seg==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.3.0", + "jest-haste-map": "^26.5.2", "jest-regex-util": "^26.0.0", - "jest-util": "^26.3.0", + "jest-util": "^26.5.2", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", @@ -562,9 +603,9 @@ } }, "@jest/types": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.3.0.tgz", - "integrity": "sha512-BDPG23U0qDeAvU4f99haztXwdAg3hz4El95LkAM+tHAqqhiVzRpEGHHU8EDxT/AnxOrA65YjLBwDahdJ9pTLJQ==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz", + "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -686,9 +727,9 @@ } }, "@types/babel__core": { - "version": "7.1.9", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.9.tgz", - "integrity": "sha512-sY2RsIJ5rpER1u3/aQ8OFSI7qGIy8o1NEEbgb2UaJcvOtXOMpd39ko723NBpjQFg9SIX7TXtjejZVGeIMLhoOw==", + "version": "7.1.10", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.10.tgz", + "integrity": "sha512-x8OM8XzITIMyiwl5Vmo2B1cR1S1Ipkyv4mdlbJjMa1lmuKvKY9FrBbEANIaMlnWn5Rf7uO+rC/VgYabNkE17Hw==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -699,18 +740,18 @@ } }, "@types/babel__generator": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.1.tgz", - "integrity": "sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", + "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", "dev": true, "requires": { "@babel/types": "^7.0.0" } }, "@types/babel__template": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.2.tgz", - "integrity": "sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.3.tgz", + "integrity": "sha512-uCoznIPDmnickEi6D0v11SBpW0OuVqHJCa7syXqQHy5uktSCreIlt0iglsCnmvz8yCb38hGcWeseA8cWJSwv5Q==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -718,9 +759,9 @@ } }, "@types/babel__traverse": { - "version": "7.0.13", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.13.tgz", - "integrity": "sha512-i+zS7t6/s9cdQvbqKDARrcbrPvtJGlbYsMkazo03nTAK3RX9FNrLllXys22uiTGJapPOTZTQ35nHh4ISph4SLQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.15.tgz", + "integrity": "sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A==", "dev": true, "requires": { "@babel/types": "^7.3.0" @@ -844,9 +885,9 @@ } }, "@types/json-schema": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz", - "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", + "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", "dev": true }, "@types/keyv": { @@ -859,9 +900,9 @@ } }, "@types/lodash": { - "version": "4.14.161", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.161.tgz", - "integrity": "sha512-EP6O3Jkr7bXvZZSZYlsgt5DIjiGr0dXP1/jVEwVLTFgg0d+3lWVQkRavYVQszV7dYUwvg0B8R0MBDpcmXg7XIA==", + "version": "4.14.162", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.162.tgz", + "integrity": "sha512-alvcho1kRUnnD1Gcl4J+hK0eencvzq9rmzvFPRmP5rPHx9VVsJj6bKLTATPVf9ktgv4ujzh7T+XWKp+jhuODig==", "dev": true }, "@types/micromatch": { @@ -919,9 +960,9 @@ } }, "@types/prettier": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.0.tgz", - "integrity": "sha512-hiYA88aHiEIgDmeKlsyVsuQdcFn3Z2VuFd/Xm/HCnGnPD8UFU5BM128uzzRVVGEzKDKYUrRsRH9S2o+NUy/3IA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.2.tgz", + "integrity": "sha512-IiPhNnenzkqdSdQH3ifk9LoX7oQe61ZlDdDO4+MUv6FyWdPGDPr26gCPVs3oguZEMq//nFZZpwUZcVuNJsG+DQ==", "dev": true }, "@types/responselike": { @@ -934,9 +975,9 @@ } }, "@types/stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", + "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", "dev": true }, "@types/style-search": { @@ -972,9 +1013,9 @@ } }, "@types/yargs": { - "version": "15.0.5", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.5.tgz", - "integrity": "sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w==", + "version": "15.0.8", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.8.tgz", + "integrity": "sha512-b0BYzFUzBpOhPjpl1wtAHU994jBeKF4TKVlT7ssFv44T617XNcPdRoG4AzHLVshLzlrF7i3lTelH7UbuNYV58Q==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -987,26 +1028,45 @@ "dev": true }, "@typescript-eslint/experimental-utils": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz", - "integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.4.0.tgz", + "integrity": "sha512-01+OtK/oWeSJTjQcyzDztfLF1YjvKpLFo+JZmurK/qjSRcyObpIecJ4rckDoRCSh5Etw+jKfdSzVEHevh9gJ1w==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.34.0", + "@typescript-eslint/scope-manager": "4.4.0", + "@typescript-eslint/types": "4.4.0", + "@typescript-eslint/typescript-estree": "4.4.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, + "@typescript-eslint/scope-manager": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.4.0.tgz", + "integrity": "sha512-r2FIeeU1lmW4K3CxgOAt8djI5c6Q/5ULAgdVo9AF3hPMpu0B14WznBAtxrmB/qFVbVIB6fSx2a+EVXuhSVMEyA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.4.0", + "@typescript-eslint/visitor-keys": "4.4.0" + } + }, + "@typescript-eslint/types": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.4.0.tgz", + "integrity": "sha512-nU0VUpzanFw3jjX+50OTQy6MehVvf8pkqFcURPAE06xFNFenMj1GPEI6IESvp7UOHAnq+n/brMirZdR+7rCrlA==", + "dev": true + }, "@typescript-eslint/typescript-estree": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz", - "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.4.0.tgz", + "integrity": "sha512-Fh85feshKXwki4nZ1uhCJHmqKJqCMba+8ZicQIhNi5d5jSQFteWiGeF96DTjO8br7fn+prTP+t3Cz/a/3yOKqw==", "dev": true, "requires": { + "@typescript-eslint/types": "4.4.0", + "@typescript-eslint/visitor-keys": "4.4.0", "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", + "globby": "^11.0.1", "is-glob": "^4.0.1", "lodash": "^4.17.15", "semver": "^7.3.2", @@ -1021,16 +1081,26 @@ } } }, + "@typescript-eslint/visitor-keys": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.4.0.tgz", + "integrity": "sha512-oBWeroUZCVsHLiWRdcTXJB7s1nB3taFY8WGvS23tiAlT6jXVvsdAV4rs581bgdEjOhn43q6ro7NkOiLKu6kFqA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.4.0", + "eslint-visitor-keys": "^2.0.0" + } + }, "abab": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.4.tgz", - "integrity": "sha512-Eu9ELJWCz/c1e9gTiCY+FceWxcqzjYEbqMgtndnuSqZSUCOL73TWNK2mHfIj4Cw2E/ongOp+JISVNCmovt2KYQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", "dev": true }, "acorn": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", - "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, "acorn-globals": { @@ -1044,9 +1114,9 @@ } }, "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", "dev": true }, "acorn-walk": { @@ -1066,9 +1136,9 @@ } }, "ajv": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", - "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1297,16 +1367,16 @@ "dev": true }, "babel-jest": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.3.0.tgz", - "integrity": "sha512-sxPnQGEyHAOPF8NcUsD0g7hDCnvLL2XyblRBcgrzTWBB/mAIpWow3n1bEL+VghnnZfreLhFSBsFluRoK2tRK4g==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.5.2.tgz", + "integrity": "sha512-U3KvymF3SczA3vOL/cgiUFOznfMET+XDIXiWnoJV45siAp2pLMG8i2+/MGZlAC3f/F6Q40LR4M4qDrWZ9wkK8A==", "dev": true, "requires": { - "@jest/transform": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/transform": "^26.5.2", + "@jest/types": "^26.5.2", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^26.3.0", + "babel-preset-jest": "^26.5.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" @@ -1326,9 +1396,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "26.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.2.0.tgz", - "integrity": "sha512-B/hVMRv8Nh1sQ1a3EY8I0n4Y1Wty3NrR5ebOyVT302op+DOAau+xNEImGMsUWOC3++ZlMooCytKz+NgN8aKGbA==", + "version": "26.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.5.0.tgz", + "integrity": "sha512-ck17uZFD3CDfuwCLATWZxkkuGGFhMij8quP8CNhwj8ek1mqFgbFzRJ30xwC04LLscj/aKsVFfRST+b5PT7rSuw==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -1338,9 +1408,9 @@ } }, "babel-preset-current-node-syntax": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.3.tgz", - "integrity": "sha512-uyexu1sVwcdFnyq9o8UQYsXwXflIh8LvrF5+cKrYam93ned1CStffB3+BEcsxGSgagoA3GEyjDqO4a/58hyPYQ==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.4.tgz", + "integrity": "sha512-5/INNCYhUGqw7VbVjT/hb3ucjgkVHKXY7lX3ZjlN4gm565VyFmJUrJ/h+h16ECVB38R/9SF6aACydpKMLZ/c9w==", "dev": true, "requires": { "@babel/plugin-syntax-async-generators": "^7.8.4", @@ -1357,12 +1427,12 @@ } }, "babel-preset-jest": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.3.0.tgz", - "integrity": "sha512-5WPdf7nyYi2/eRxCbVrE1kKCWxgWY4RsPEbdJWFm7QsesFGqjdkyLeu1zRkwM1cxK6EPIlNd6d2AxLk7J+t4pw==", + "version": "26.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.5.0.tgz", + "integrity": "sha512-F2vTluljhqkiGSJGBg/jOruA8vIIIL11YrxRcO7nviNTMbbofPSHwnm8mgP7d/wS7wRSexRoI6X1A6T74d4LQA==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^26.2.0", + "babel-plugin-jest-hoist": "^26.5.0", "babel-preset-current-node-syntax": "^0.1.3" } }, @@ -1823,12 +1893,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -2124,11 +2193,11 @@ "dev": true }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "decamelize": { @@ -2153,9 +2222,9 @@ } }, "decimal.js": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.0.tgz", - "integrity": "sha512-vDPw+rDgn3bZe1+F/pyEwb1oMG2XTlRVgAa6B4KccTEpYgF8w6eQllVbQcfIJnZyvzFtFpxnpGtx8dd7DJp/Rw==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz", + "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==", "dev": true }, "decode-uri-component": { @@ -2262,35 +2331,28 @@ } }, "del": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", - "integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz", + "integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==", "dev": true, "requires": { - "globby": "^10.0.1", - "graceful-fs": "^4.2.2", + "globby": "^11.0.1", + "graceful-fs": "^4.2.4", "is-glob": "^4.0.1", "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.1", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", + "is-path-inside": "^3.0.2", + "p-map": "^4.0.0", + "rimraf": "^3.0.2", "slash": "^3.0.0" }, "dependencies": { - "globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "requires": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" + "aggregate-error": "^3.0.0" } }, "rimraf": { @@ -2323,9 +2385,9 @@ "dev": true }, "diff-sequences": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.3.0.tgz", - "integrity": "sha512-5j5vdRcw3CNctePNYN0Wy2e/JbWT6cAYnXv5OuqPhDpyCGc0uLu2TK0zOCJWNB9kOIfYMSpIulRaDgIi4HJ6Ig==", + "version": "26.5.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.5.0.tgz", + "integrity": "sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q==", "dev": true }, "dir-glob": { @@ -2599,22 +2661,23 @@ } }, "eslint": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.7.0.tgz", - "integrity": "sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", + "integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.1.3", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", - "eslint-scope": "^5.1.0", + "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^1.3.0", - "espree": "^7.2.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.0", "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -2741,9 +2804,9 @@ } }, "eslint-config-prettier": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", - "integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.12.0.tgz", + "integrity": "sha512-9jWPlFlgNwRUYVoujvWTQ1aMO8o6648r+K7qU7K5Jmkbyqav1fuEZC0COYpGBxyiAJb65Ra9hrmFx19xRGwXWw==", "dev": true, "requires": { "get-stdin": "^6.0.0" @@ -2758,14 +2821,14 @@ } }, "eslint-config-stylelint": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-stylelint/-/eslint-config-stylelint-12.0.0.tgz", - "integrity": "sha512-6Q9KCFShMFsYX7YzevtEdxWW8BMWo9M6kw0mdIsv9m/I6B7tFCNo9bYmF3khMQ/yN27Zy62ezRgr+lUHIhQUrA==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-stylelint/-/eslint-config-stylelint-12.1.0.tgz", + "integrity": "sha512-DDqptL24madtUumh/LPTDugdQXM2dkcL98Bzec5mv9htYdHzIoAbtsO4u9eziGsuw0kv6BvDs+qDLoCugYNUWQ==", "dev": true, "requires": { "eslint-config-prettier": "^6.10.1", "eslint-plugin-eslint-comments": "^3.1.2", - "eslint-plugin-jest": "^23.8.2", + "eslint-plugin-jest": "^24.0.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-sort-requires": "^2.1.0" } @@ -2791,12 +2854,12 @@ } }, "eslint-plugin-jest": { - "version": "23.20.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.20.0.tgz", - "integrity": "sha512-+6BGQt85OREevBDWCvhqj1yYA4+BFK4XnRZSGJionuEYmcglMZYLNNBBemwzbqUAckURaHdJSBcjHPyrtypZOw==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.1.0.tgz", + "integrity": "sha512-827YJ+E8B9PvXu/0eiVSNFfxxndbKv+qE/3GSMhdorCaeaOehtqHGX2YDW9B85TEOre9n/zscledkFW/KbnyGg==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "^2.5.0" + "@typescript-eslint/experimental-utils": "^4.0.1" } }, "eslint-plugin-node": { @@ -2828,12 +2891,12 @@ "dev": true }, "eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, @@ -2844,12 +2907,20 @@ "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true }, "espree": { @@ -2861,6 +2932,14 @@ "acorn": "^7.4.0", "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "esprima": { @@ -2887,12 +2966,20 @@ } }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "estraverse": { @@ -3038,26 +3125,25 @@ } }, "expect": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-26.4.2.tgz", - "integrity": "sha512-IlJ3X52Z0lDHm7gjEp+m76uX46ldH5VpqmU0006vqDju/285twh7zaWMRhs67VpQhBwjjMchk+p5aA0VkERCAA==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.5.3.tgz", + "integrity": "sha512-kkpOhGRWGOr+TEFUnYAjfGvv35bfP+OlPtqPIJpOCR9DVtv8QV+p8zG0Edqafh80fsjeE+7RBcVUq1xApnYglw==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "ansi-styles": "^4.0.0", "jest-get-type": "^26.3.0", - "jest-matcher-utils": "^26.4.2", - "jest-message-util": "^26.3.0", + "jest-matcher-utils": "^26.5.2", + "jest-message-util": "^26.5.2", "jest-regex-util": "^26.0.0" }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -3533,19 +3619,19 @@ } }, "got": { - "version": "11.5.2", - "resolved": "https://registry.npmjs.org/got/-/got-11.5.2.tgz", - "integrity": "sha512-yUhpEDLeuGiGJjRSzEq3kvt4zJtAcjKmhIiwNp/eUs75tRlXfWcHo5tcBaMQtnjHWC7nQYT5HkY/l0QOQTkVww==", + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/got/-/got-11.7.0.tgz", + "integrity": "sha512-7en2XwH2MEqOsrK0xaKhbWibBoZqy+f1RSUoIeF1BLcnf+pyQdDsljWMfmOh+QKJwuvDIiKx38GtPh5wFdGGjg==", "dev": true, "requires": { - "@sindresorhus/is": "^3.0.0", + "@sindresorhus/is": "^3.1.1", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", "cacheable-lookup": "^5.0.3", "cacheable-request": "^7.0.1", "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.0", + "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", "p-cancelable": "^2.0.0", "responselike": "^2.0.0" @@ -4514,46 +4600,46 @@ } }, "jest": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-26.4.2.tgz", - "integrity": "sha512-LLCjPrUh98Ik8CzW8LLVnSCfLaiY+wbK53U7VxnFSX7Q+kWC4noVeDvGWIFw0Amfq1lq2VfGm7YHWSLBV62MJw==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-26.5.3.tgz", + "integrity": "sha512-uJi3FuVSLmkZrWvaDyaVTZGLL8WcfynbRnFXyAHuEtYiSZ+ijDDIMOw1ytmftK+y/+OdAtsG9QrtbF7WIBmOyA==", "dev": true, "requires": { - "@jest/core": "^26.4.2", + "@jest/core": "^26.5.3", "import-local": "^3.0.2", - "jest-cli": "^26.4.2" + "jest-cli": "^26.5.3" }, "dependencies": { "jest-cli": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.4.2.tgz", - "integrity": "sha512-zb+lGd/SfrPvoRSC/0LWdaWCnscXc1mGYW//NP4/tmBvRPT3VntZ2jtKUONsRi59zc5JqmsSajA9ewJKFYp8Cw==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.5.3.tgz", + "integrity": "sha512-HkbSvtugpSXBf2660v9FrNVUgxvPkssN8CRGj9gPM8PLhnaa6zziFiCEKQAkQS4uRzseww45o0TR+l6KeRYV9A==", "dev": true, "requires": { - "@jest/core": "^26.4.2", - "@jest/test-result": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/core": "^26.5.3", + "@jest/test-result": "^26.5.2", + "@jest/types": "^26.5.2", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^26.4.2", - "jest-util": "^26.3.0", - "jest-validate": "^26.4.2", + "jest-config": "^26.5.3", + "jest-util": "^26.5.2", + "jest-validate": "^26.5.3", "prompts": "^2.0.1", - "yargs": "^15.3.1" + "yargs": "^15.4.1" } } } }, "jest-changed-files": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.3.0.tgz", - "integrity": "sha512-1C4R4nijgPltX6fugKxM4oQ18zimS7LqQ+zTTY8lMCMFPrxqBFb7KJH0Z2fRQJvw2Slbaipsqq7s1mgX5Iot+g==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.5.2.tgz", + "integrity": "sha512-qSmssmiIdvM5BWVtyK/nqVpN3spR5YyvkvPqz1x3BR1bwIxsWmU/MGwLoCrPNLbkG2ASAKfvmJpOduEApBPh2w==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "execa": "^4.0.0", "throat": "^5.0.0" }, @@ -4593,29 +4679,30 @@ } }, "jest-circus": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-26.4.2.tgz", - "integrity": "sha512-gzxoteivskdUTNxT7Jx6hrANsEm+x1wh8jaXmQCtzC7zoNWirk9chYdSosHFC4tJlfDZa0EsPreVAxLicLsV0w==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-26.5.3.tgz", + "integrity": "sha512-d3kCp2ASCG9aq63KZi1VyNDcWCiBwlUfEQfGuKd9aPs45L5J69SsjQjhjAqhVjX0eld8cZMJZS1VC4OuXoQ+8A==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.3.0", - "@jest/test-result": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/environment": "^26.5.2", + "@jest/test-result": "^26.5.2", + "@jest/types": "^26.5.2", + "@types/babel__traverse": "^7.0.4", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^26.4.2", + "expect": "^26.5.3", "is-generator-fn": "^2.0.0", - "jest-each": "^26.4.2", - "jest-matcher-utils": "^26.4.2", - "jest-message-util": "^26.3.0", - "jest-runner": "^26.4.2", - "jest-runtime": "^26.4.2", - "jest-snapshot": "^26.4.2", - "jest-util": "^26.3.0", - "pretty-format": "^26.4.2", + "jest-each": "^26.5.2", + "jest-matcher-utils": "^26.5.2", + "jest-message-util": "^26.5.2", + "jest-runner": "^26.5.3", + "jest-runtime": "^26.5.3", + "jest-snapshot": "^26.5.3", + "jest-util": "^26.5.2", + "pretty-format": "^26.5.2", "stack-utils": "^2.0.2", "throat": "^5.0.0" }, @@ -4629,41 +4716,41 @@ } }, "jest-config": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.4.2.tgz", - "integrity": "sha512-QBf7YGLuToiM8PmTnJEdRxyYy3mHWLh24LJZKVdXZ2PNdizSe1B/E8bVm+HYcjbEzGuVXDv/di+EzdO/6Gq80A==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.5.3.tgz", + "integrity": "sha512-NVhZiIuN0GQM6b6as4CI5FSCyXKxdrx5ACMCcv/7Pf+TeCajJhJc+6dwgdAVPyerUFB9pRBIz3bE7clSrRge/w==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.4.2", - "@jest/types": "^26.3.0", - "babel-jest": "^26.3.0", + "@jest/test-sequencer": "^26.5.3", + "@jest/types": "^26.5.2", + "babel-jest": "^26.5.2", "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.3.0", - "jest-environment-node": "^26.3.0", + "jest-environment-jsdom": "^26.5.2", + "jest-environment-node": "^26.5.2", "jest-get-type": "^26.3.0", - "jest-jasmine2": "^26.4.2", + "jest-jasmine2": "^26.5.3", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.4.0", - "jest-util": "^26.3.0", - "jest-validate": "^26.4.2", + "jest-resolve": "^26.5.2", + "jest-util": "^26.5.2", + "jest-validate": "^26.5.3", "micromatch": "^4.0.2", - "pretty-format": "^26.4.2" + "pretty-format": "^26.5.2" } }, "jest-diff": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.4.2.tgz", - "integrity": "sha512-6T1XQY8U28WH0Z5rGpQ+VqZSZz8EN8rZcBtfvXaOkbwxIEeRre6qnuZQlbY1AJ4MKDxQF8EkrCvK+hL/VkyYLQ==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.5.2.tgz", + "integrity": "sha512-HCSWDUGwsov5oTlGzrRM+UPJI/Dpqi9jzeV0fdRNi3Ch5bnoXhnyJMmVg2juv9081zLIy3HGPI5mcuGgXM2xRA==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^26.3.0", + "diff-sequences": "^26.5.0", "jest-get-type": "^26.3.0", - "pretty-format": "^26.4.2" + "pretty-format": "^26.5.2" } }, "jest-docblock": { @@ -4676,45 +4763,45 @@ } }, "jest-each": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.4.2.tgz", - "integrity": "sha512-p15rt8r8cUcRY0Mvo1fpkOGYm7iI8S6ySxgIdfh3oOIv+gHwrHTy5VWCGOecWUhDsit4Nz8avJWdT07WLpbwDA==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.5.2.tgz", + "integrity": "sha512-w7D9FNe0m2D3yZ0Drj9CLkyF/mGhmBSULMQTypzAKR746xXnjUrK8GUJdlLTWUF6dd0ks3MtvGP7/xNFr9Aphg==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "chalk": "^4.0.0", "jest-get-type": "^26.3.0", - "jest-util": "^26.3.0", - "pretty-format": "^26.4.2" + "jest-util": "^26.5.2", + "pretty-format": "^26.5.2" } }, "jest-environment-jsdom": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.3.0.tgz", - "integrity": "sha512-zra8He2btIMJkAzvLaiZ9QwEPGEetbxqmjEBQwhH3CA+Hhhu0jSiEJxnJMbX28TGUvPLxBt/zyaTLrOPF4yMJA==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.5.2.tgz", + "integrity": "sha512-fWZPx0bluJaTQ36+PmRpvUtUlUFlGGBNyGX1SN3dLUHHMcQ4WseNEzcGGKOw4U5towXgxI4qDoI3vwR18H0RTw==", "dev": true, "requires": { - "@jest/environment": "^26.3.0", - "@jest/fake-timers": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/environment": "^26.5.2", + "@jest/fake-timers": "^26.5.2", + "@jest/types": "^26.5.2", "@types/node": "*", - "jest-mock": "^26.3.0", - "jest-util": "^26.3.0", - "jsdom": "^16.2.2" + "jest-mock": "^26.5.2", + "jest-util": "^26.5.2", + "jsdom": "^16.4.0" } }, "jest-environment-node": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.3.0.tgz", - "integrity": "sha512-c9BvYoo+FGcMj5FunbBgtBnbR5qk3uky8PKyRVpSfe2/8+LrNQMiXX53z6q2kY+j15SkjQCOSL/6LHnCPLVHNw==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.5.2.tgz", + "integrity": "sha512-YHjnDsf/GKFCYMGF1V+6HF7jhY1fcLfLNBDjhAOvFGvt6d8vXvNdJGVM7uTZ2VO/TuIyEFhPGaXMX5j3h7fsrA==", "dev": true, "requires": { - "@jest/environment": "^26.3.0", - "@jest/fake-timers": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/environment": "^26.5.2", + "@jest/fake-timers": "^26.5.2", + "@jest/types": "^26.5.2", "@types/node": "*", - "jest-mock": "^26.3.0", - "jest-util": "^26.3.0" + "jest-mock": "^26.5.2", + "jest-util": "^26.5.2" } }, "jest-get-type": { @@ -4724,12 +4811,12 @@ "dev": true }, "jest-haste-map": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.3.0.tgz", - "integrity": "sha512-DHWBpTJgJhLLGwE5Z1ZaqLTYqeODQIZpby0zMBsCU9iRFHYyhklYqP4EiG73j5dkbaAdSZhgB938mL51Q5LeZA==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.5.2.tgz", + "integrity": "sha512-lJIAVJN3gtO3k4xy+7i2Xjtwh8CfPcH08WYjZpe9xzveDaqGw9fVNCpkYu6M525wKFVkLmyi7ku+DxCAP1lyMA==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", @@ -4737,37 +4824,37 @@ "fsevents": "^2.1.2", "graceful-fs": "^4.2.4", "jest-regex-util": "^26.0.0", - "jest-serializer": "^26.3.0", - "jest-util": "^26.3.0", - "jest-worker": "^26.3.0", + "jest-serializer": "^26.5.0", + "jest-util": "^26.5.2", + "jest-worker": "^26.5.0", "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7" } }, "jest-jasmine2": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.4.2.tgz", - "integrity": "sha512-z7H4EpCldHN1J8fNgsja58QftxBSL+JcwZmaXIvV9WKIM+x49F4GLHu/+BQh2kzRKHAgaN/E82od+8rTOBPyPA==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.5.3.tgz", + "integrity": "sha512-nFlZOpnGlNc7y/+UkkeHnvbOM+rLz4wB1AimgI9QhtnqSZte0wYjbAm8hf7TCwXlXgDwZxAXo6z0a2Wzn9FoOg==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.3.0", - "@jest/source-map": "^26.3.0", - "@jest/test-result": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/environment": "^26.5.2", + "@jest/source-map": "^26.5.0", + "@jest/test-result": "^26.5.2", + "@jest/types": "^26.5.2", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^26.4.2", + "expect": "^26.5.3", "is-generator-fn": "^2.0.0", - "jest-each": "^26.4.2", - "jest-matcher-utils": "^26.4.2", - "jest-message-util": "^26.3.0", - "jest-runtime": "^26.4.2", - "jest-snapshot": "^26.4.2", - "jest-util": "^26.3.0", - "pretty-format": "^26.4.2", + "jest-each": "^26.5.2", + "jest-matcher-utils": "^26.5.2", + "jest-message-util": "^26.5.2", + "jest-runtime": "^26.5.3", + "jest-snapshot": "^26.5.3", + "jest-util": "^26.5.2", + "pretty-format": "^26.5.2", "throat": "^5.0.0" }, "dependencies": { @@ -4780,36 +4867,36 @@ } }, "jest-leak-detector": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.4.2.tgz", - "integrity": "sha512-akzGcxwxtE+9ZJZRW+M2o+nTNnmQZxrHJxX/HjgDaU5+PLmY1qnQPnMjgADPGCRPhB+Yawe1iij0REe+k/aHoA==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.5.2.tgz", + "integrity": "sha512-h7ia3dLzBFItmYERaLPEtEKxy3YlcbcRSjj0XRNJgBEyODuu+3DM2o62kvIFvs3PsaYoIIv+e+nLRI61Dj1CNw==", "dev": true, "requires": { "jest-get-type": "^26.3.0", - "pretty-format": "^26.4.2" + "pretty-format": "^26.5.2" } }, "jest-matcher-utils": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.4.2.tgz", - "integrity": "sha512-KcbNqWfWUG24R7tu9WcAOKKdiXiXCbMvQYT6iodZ9k1f7065k0keUOW6XpJMMvah+hTfqkhJhRXmA3r3zMAg0Q==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.5.2.tgz", + "integrity": "sha512-W9GO9KBIC4gIArsNqDUKsLnhivaqf8MSs6ujO/JDcPIQrmY+aasewweXVET8KdrJ6ADQaUne5UzysvF/RR7JYA==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^26.4.2", + "jest-diff": "^26.5.2", "jest-get-type": "^26.3.0", - "pretty-format": "^26.4.2" + "pretty-format": "^26.5.2" } }, "jest-message-util": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.3.0.tgz", - "integrity": "sha512-xIavRYqr4/otGOiLxLZGj3ieMmjcNE73Ui+LdSW/Y790j5acqCsAdDiLIbzHCZMpN07JOENRWX5DcU+OQ+TjTA==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.5.2.tgz", + "integrity": "sha512-Ocp9UYZ5Jl15C5PNsoDiGEk14A4NG0zZKknpWdZGoMzJuGAkVt10e97tnEVMYpk7LnQHZOfuK2j/izLBMcuCZw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.3.0", - "@types/stack-utils": "^1.0.1", + "@jest/types": "^26.5.2", + "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "micromatch": "^4.0.2", @@ -4818,12 +4905,12 @@ } }, "jest-mock": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.3.0.tgz", - "integrity": "sha512-PeaRrg8Dc6mnS35gOo/CbZovoDPKAeB1FICZiuagAgGvbWdNNyjQjkOaGUa/3N3JtpQ/Mh9P4A2D4Fv51NnP8Q==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.5.2.tgz", + "integrity": "sha512-9SiU4b5PtO51v0MtJwVRqeGEroH66Bnwtq4ARdNP7jNXbpT7+ByeWNAk4NeT/uHfNSVDXEXgQo1XRuwEqS6Rdw==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "@types/node": "*" } }, @@ -4846,98 +4933,98 @@ "dev": true }, "jest-resolve": { - "version": "26.4.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.4.0.tgz", - "integrity": "sha512-bn/JoZTEXRSlEx3+SfgZcJAVuTMOksYq9xe9O6s4Ekg84aKBObEaVXKOEilULRqviSLAYJldnoWV9c07kwtiCg==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.5.2.tgz", + "integrity": "sha512-XsPxojXGRA0CoDD7Vis59ucz2p3cQFU5C+19tz3tLEAlhYKkK77IL0cjYjikY9wXnOaBeEdm1rOgSJjbZWpcZg==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^26.3.0", + "jest-util": "^26.5.2", "read-pkg-up": "^7.0.1", "resolve": "^1.17.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.4.2.tgz", - "integrity": "sha512-ADHaOwqEcVc71uTfySzSowA/RdxUpCxhxa2FNLiin9vWLB1uLPad3we+JSSROq5+SrL9iYPdZZF8bdKM7XABTQ==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.5.3.tgz", + "integrity": "sha512-+KMDeke/BFK+mIQ2IYSyBz010h7zQaVt4Xie6cLqUGChorx66vVeQVv4ErNoMwInnyYHi1Ud73tDS01UbXbfLQ==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "jest-regex-util": "^26.0.0", - "jest-snapshot": "^26.4.2" + "jest-snapshot": "^26.5.3" } }, "jest-runner": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.4.2.tgz", - "integrity": "sha512-FgjDHeVknDjw1gRAYaoUoShe1K3XUuFMkIaXbdhEys+1O4bEJS8Avmn4lBwoMfL8O5oFTdWYKcf3tEJyyYyk8g==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.5.3.tgz", + "integrity": "sha512-qproP0Pq7IIule+263W57k2+8kWCszVJTC9TJWGUz0xJBr+gNiniGXlG8rotd0XxwonD5UiJloYoSO5vbUr5FQ==", "dev": true, "requires": { - "@jest/console": "^26.3.0", - "@jest/environment": "^26.3.0", - "@jest/test-result": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/console": "^26.5.2", + "@jest/environment": "^26.5.2", + "@jest/test-result": "^26.5.2", + "@jest/types": "^26.5.2", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.7.1", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^26.4.2", + "jest-config": "^26.5.3", "jest-docblock": "^26.0.0", - "jest-haste-map": "^26.3.0", - "jest-leak-detector": "^26.4.2", - "jest-message-util": "^26.3.0", - "jest-resolve": "^26.4.0", - "jest-runtime": "^26.4.2", - "jest-util": "^26.3.0", - "jest-worker": "^26.3.0", + "jest-haste-map": "^26.5.2", + "jest-leak-detector": "^26.5.2", + "jest-message-util": "^26.5.2", + "jest-resolve": "^26.5.2", + "jest-runtime": "^26.5.3", + "jest-util": "^26.5.2", + "jest-worker": "^26.5.0", "source-map-support": "^0.5.6", "throat": "^5.0.0" } }, "jest-runtime": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.4.2.tgz", - "integrity": "sha512-4Pe7Uk5a80FnbHwSOk7ojNCJvz3Ks2CNQWT5Z7MJo4tX0jb3V/LThKvD9tKPNVNyeMH98J/nzGlcwc00R2dSHQ==", - "dev": true, - "requires": { - "@jest/console": "^26.3.0", - "@jest/environment": "^26.3.0", - "@jest/fake-timers": "^26.3.0", - "@jest/globals": "^26.4.2", - "@jest/source-map": "^26.3.0", - "@jest/test-result": "^26.3.0", - "@jest/transform": "^26.3.0", - "@jest/types": "^26.3.0", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.5.3.tgz", + "integrity": "sha512-IDjalmn2s/Tc4GvUwhPHZ0iaXCdMRq5p6taW9P8RpU+FpG01O3+H8z+p3rDCQ9mbyyyviDgxy/LHPLzrIOKBkQ==", + "dev": true, + "requires": { + "@jest/console": "^26.5.2", + "@jest/environment": "^26.5.2", + "@jest/fake-timers": "^26.5.2", + "@jest/globals": "^26.5.3", + "@jest/source-map": "^26.5.0", + "@jest/test-result": "^26.5.2", + "@jest/transform": "^26.5.2", + "@jest/types": "^26.5.2", "@types/yargs": "^15.0.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^26.4.2", - "jest-haste-map": "^26.3.0", - "jest-message-util": "^26.3.0", - "jest-mock": "^26.3.0", + "jest-config": "^26.5.3", + "jest-haste-map": "^26.5.2", + "jest-message-util": "^26.5.2", + "jest-mock": "^26.5.2", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.4.0", - "jest-snapshot": "^26.4.2", - "jest-util": "^26.3.0", - "jest-validate": "^26.4.2", + "jest-resolve": "^26.5.2", + "jest-snapshot": "^26.5.3", + "jest-util": "^26.5.2", + "jest-validate": "^26.5.3", "slash": "^3.0.0", "strip-bom": "^4.0.0", - "yargs": "^15.3.1" + "yargs": "^15.4.1" } }, "jest-serializer": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.3.0.tgz", - "integrity": "sha512-IDRBQBLPlKa4flg77fqg0n/pH87tcRKwe8zxOVTWISxGpPHYkRZ1dXKyh04JOja7gppc60+soKVZ791mruVdow==", + "version": "26.5.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.5.0.tgz", + "integrity": "sha512-+h3Gf5CDRlSLdgTv7y0vPIAoLgX/SI7T4v6hy+TEXMgYbv+ztzbg5PSN6mUXAT/hXYHvZRWm+MaObVfqkhCGxA==", "dev": true, "requires": { "@types/node": "*", @@ -4945,25 +5032,26 @@ } }, "jest-snapshot": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.4.2.tgz", - "integrity": "sha512-N6Uub8FccKlf5SBFnL2Ri/xofbaA68Cc3MGjP/NuwgnsvWh+9hLIR/DhrxbSiKXMY9vUW5dI6EW1eHaDHqe9sg==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.5.3.tgz", + "integrity": "sha512-ZgAk0Wm0JJ75WS4lGaeRfa0zIgpL0KD595+XmtwlIEMe8j4FaYHyZhP1LNOO+8fXq7HJ3hll54+sFV9X4+CGVw==", "dev": true, "requires": { "@babel/types": "^7.0.0", - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", + "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.0.0", "chalk": "^4.0.0", - "expect": "^26.4.2", + "expect": "^26.5.3", "graceful-fs": "^4.2.4", - "jest-diff": "^26.4.2", + "jest-diff": "^26.5.2", "jest-get-type": "^26.3.0", - "jest-haste-map": "^26.3.0", - "jest-matcher-utils": "^26.4.2", - "jest-message-util": "^26.3.0", - "jest-resolve": "^26.4.0", + "jest-haste-map": "^26.5.2", + "jest-matcher-utils": "^26.5.2", + "jest-message-util": "^26.5.2", + "jest-resolve": "^26.5.2", "natural-compare": "^1.4.0", - "pretty-format": "^26.4.2", + "pretty-format": "^26.5.2", "semver": "^7.3.2" }, "dependencies": { @@ -4976,12 +5064,12 @@ } }, "jest-util": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.3.0.tgz", - "integrity": "sha512-4zpn6bwV0+AMFN0IYhH/wnzIQzRaYVrz1A8sYnRnj4UXDXbOVtWmlaZkO9mipFqZ13okIfN87aDoJWB7VH6hcw==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.5.2.tgz", + "integrity": "sha512-WTL675bK+GSSAYgS8z9FWdCT2nccO1yTIplNLPlP0OD8tUk/H5IrWKMMRudIQQ0qp8bb4k+1Qa8CxGKq9qnYdg==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "@types/node": "*", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", @@ -4990,61 +5078,61 @@ } }, "jest-validate": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.4.2.tgz", - "integrity": "sha512-blft+xDX7XXghfhY0mrsBCYhX365n8K5wNDC4XAcNKqqjEzsRUSXP44m6PL0QJEW2crxQFLLztVnJ4j7oPlQrQ==", + "version": "26.5.3", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.5.3.tgz", + "integrity": "sha512-LX07qKeAtY+lsU0o3IvfDdN5KH9OulEGOMN1sFo6PnEf5/qjS1LZIwNk9blcBeW94pQUI9dLN9FlDYDWI5tyaA==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "camelcase": "^6.0.0", "chalk": "^4.0.0", "jest-get-type": "^26.3.0", "leven": "^3.1.0", - "pretty-format": "^26.4.2" + "pretty-format": "^26.5.2" }, "dependencies": { "camelcase": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.0.0.tgz", - "integrity": "sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.1.0.tgz", + "integrity": "sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ==", "dev": true } } }, "jest-watch-typeahead": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/jest-watch-typeahead/-/jest-watch-typeahead-0.6.0.tgz", - "integrity": "sha512-mY0u5D1U/mEzeO/tpcDWnWaakuQiBp8gZY1K0HxduMeKSYm4WvbBVfU15a/hWMMs4J9FrXaYjAWs5XGlOpx5IQ==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/jest-watch-typeahead/-/jest-watch-typeahead-0.6.1.tgz", + "integrity": "sha512-ITVnHhj3Jd/QkqQcTqZfRgjfyRhDFM/auzgVo2RKvSwi18YMvh0WvXDJFoFED6c7jd/5jxtu4kSOb9PTu2cPVg==", "dev": true, "requires": { "ansi-escapes": "^4.3.1", "chalk": "^4.0.0", "jest-regex-util": "^26.0.0", - "jest-watcher": "^26.0.0", + "jest-watcher": "^26.3.0", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0" } }, "jest-watcher": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.3.0.tgz", - "integrity": "sha512-XnLdKmyCGJ3VoF6G/p5ohbJ04q/vv5aH9ENI+i6BL0uu9WWB6Z7Z2lhQQk0d2AVZcRGp1yW+/TsoToMhBFPRdQ==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.5.2.tgz", + "integrity": "sha512-i3m1NtWzF+FXfJ3ljLBB/WQEp4uaNhX7QcQUWMokcifFTUQBDFyUMEwk0JkJ1kopHbx7Een3KX0Q7+9koGM/Pw==", "dev": true, "requires": { - "@jest/test-result": "^26.3.0", - "@jest/types": "^26.3.0", + "@jest/test-result": "^26.5.2", + "@jest/types": "^26.5.2", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^26.3.0", + "jest-util": "^26.5.2", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.3.0.tgz", - "integrity": "sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw==", + "version": "26.5.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.5.0.tgz", + "integrity": "sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug==", "dev": true, "requires": { "@types/node": "*", @@ -5298,9 +5386,9 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, "lint-staged": { - "version": "10.2.13", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.2.13.tgz", - "integrity": "sha512-conwlukNV6aL9SiMWjFtDp5exeDnTMekdNPDZsKGnpfQuHcO0E3L3Bbf58lcR+M7vk6LpCilxDAVks/DDVBYlA==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.4.0.tgz", + "integrity": "sha512-uaiX4U5yERUSiIEQc329vhCTDDwUcSvKdRLsNomkYLRzijk3v8V9GWm2Nz0RMVB87VcuzLvtgy6OsjoH++QHIg==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -7278,9 +7366,9 @@ "dev": true }, "postcss": { - "version": "7.0.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", - "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", + "version": "7.0.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", + "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -7427,9 +7515,9 @@ "dev": true }, "prettier": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz", - "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", + "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", "dev": true }, "prettier-plugin-packagejson": { @@ -7442,24 +7530,23 @@ } }, "pretty-format": { - "version": "26.4.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.4.2.tgz", - "integrity": "sha512-zK6Gd8zDsEiVydOCGLkoBoZuqv8VTiHyAbKznXe/gaph/DAeZOmit9yMfgIz5adIgAMMs5XfoYSwAX3jcCO1tA==", + "version": "26.5.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz", + "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==", "dev": true, "requires": { - "@jest/types": "^26.3.0", + "@jest/types": "^26.5.2", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -8537,11 +8624,10 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -9105,9 +9191,9 @@ "dev": true }, "table": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.1.tgz", - "integrity": "sha512-fmr6168splcy/3XIvhSm5w6hYYOqyr3plAsd7OqoerzyoMnIpoxYuwrpdO2Cm22dh6KCnvirvigPrFZp+tdWFA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.3.tgz", + "integrity": "sha512-8321ZMcf1B9HvVX/btKv8mMZahCjn2aYrDlpqHaBFCfnox64edeH9kEid0vTLTRR8gWR2A20aDgeuTTea4sVtw==", "requires": { "ajv": "^6.12.4", "lodash": "^4.17.20", @@ -9347,9 +9433,9 @@ } }, "typescript": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", - "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", + "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==", "dev": true }, "unherit": { @@ -9735,9 +9821,9 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", - "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==", "dev": true, "optional": true }, @@ -9747,9 +9833,9 @@ "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==" }, "v8-to-istanbul": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-5.0.1.tgz", - "integrity": "sha512-mbDNjuDajqYe3TXFk5qxcQy8L1msXNE37WTlLoqqpBfRsimbNcrlhQlDPntmECEcUvdC+AQ8CyMMf6EUx1r74Q==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-6.0.1.tgz", + "integrity": "sha512-PzM1WlqquhBvsV+Gco6WSFeg1AGdD53ccMRkFeyHRE/KRZaVacPOmQYP3EeVgDBtKD2BJ8kgynBQ5OtKiHCH+w==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.1", @@ -9906,9 +9992,9 @@ "dev": true }, "whatwg-url": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.2.1.tgz", - "integrity": "sha512-ZmVCr6nfBeaMxEHALLEGy0LszYjpJqf6PVNQUQ1qd9Et+q7Jpygd4rGGDXgHjD8e99yLFseD69msHDM4YwPZ4A==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.4.0.tgz", + "integrity": "sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw==", "dev": true, "requires": { "lodash.sortby": "^4.7.0", @@ -9963,12 +10049,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, diff --git a/package.json b/package.json index 3630450bf5..967aa17543 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "balanced-match": "^1.0.0", "chalk": "^4.1.0", "cosmiconfig": "^7.0.0", - "debug": "^4.1.1", + "debug": "^4.2.0", "execall": "^2.0.0", "fast-glob": "^3.2.4", "fastest-levenshtein": "^1.0.12", @@ -136,7 +136,7 @@ "meow": "^7.1.1", "micromatch": "^4.0.2", "normalize-selector": "^0.2.0", - "postcss": "^7.0.32", + "postcss": "^7.0.35", "postcss-html": "^0.36.0", "postcss-less": "^3.1.4", "postcss-media-query-parser": "^0.2.3", @@ -155,7 +155,7 @@ "style-search": "^0.1.0", "sugarss": "^2.0.0", "svg-tags": "^1.0.0", - "table": "^6.0.1", + "table": "^6.0.3", "v8-compile-cache": "^2.1.1", "write-file-atomic": "^3.0.3" }, @@ -169,7 +169,7 @@ "@types/global-modules": "^2.0.0", "@types/globjoin": "^0.1.0", "@types/imurmurhash": "^0.1.1", - "@types/lodash": "^4.14.161", + "@types/lodash": "^4.14.162", "@types/micromatch": "^4.0.1", "@types/postcss-less": "^3.1.1", "@types/postcss-safe-parser": "^4.0.0", @@ -179,22 +179,22 @@ "@types/write-file-atomic": "^3.0.1", "benchmark": "^2.1.4", "common-tags": "^1.8.0", - "del": "^5.1.0", - "eslint": "^7.7.0", - "eslint-config-stylelint": "^12.0.0", - "got": "^11.5.2", + "del": "^6.0.0", + "eslint": "^7.11.0", + "eslint-config-stylelint": "^12.1.0", + "got": "^11.7.0", "husky": "^4.3.0", - "jest": "^26.4.2", - "jest-circus": "^26.4.2", + "jest": "^26.5.3", + "jest-circus": "^26.5.3", "jest-preset-stylelint": "^3.0.0", - "jest-watch-typeahead": "^0.6.0", - "lint-staged": "^10.2.13", + "jest-watch-typeahead": "^0.6.1", + "lint-staged": "^10.4.0", "np": "^6.5.0", "npm-run-all": "^4.1.5", "postcss-import": "^12.0.1", - "prettier": "^2.1.1", + "prettier": "^2.1.2", "remark-cli": "^8.0.1", - "typescript": "^4.0.2" + "typescript": "^4.0.3" }, "engines": { "node": ">=10.13.0" From a0eab085a09315bcad5e044271c127821851244b Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Wed, 14 Oct 2020 12:51:54 -0700 Subject: [PATCH 30/46] Report disables in the same manner as lints (#4973) Rather than returning disables that are considered "invalid" for various reasons (such as --report-needless-disables) as a separate list of objects that formatters must handle individually, stylelint now converts them into standard lint warnings. This allows formatters to automatically format them the same as normal warnings without any extra disable-specific code. Closes #4896 --- CHANGELOG.md | 5 + docs/developer-guide/formatters.md | 24 -- docs/user-guide/configure.md | 2 +- docs/user-guide/usage/node-api.md | 16 - docs/user-guide/usage/options.md | 6 +- lib/__tests__/cli.test.js | 21 +- lib/__tests__/descriptionlessDisables.test.js | 39 ++- lib/__tests__/disableRanges.test.js | 274 +++++++++--------- lib/__tests__/invalidScopeDisables.test.js | 94 ++++-- lib/__tests__/needlessDisables.test.js | 149 ++++++++-- lib/__tests__/reportDisables.test.js | 69 +++-- lib/__tests__/standalone-formatter.test.js | 50 ---- .../standalone-invalidScopeDisables.test.js | 53 ---- .../standalone-needlessDisables.test.js | 138 --------- lib/assignDisabledRanges.js | 31 +- lib/descriptionlessDisables.js | 37 +-- lib/invalidScopeDisables.js | 28 +- lib/needlessDisables.js | 99 ++++--- lib/prepareReturnValue.js | 22 +- lib/reportDisables.js | 29 +- lib/utils/putIfAbsent.js | 22 ++ scripts/visual.css | 1 + types/stylelint/index.d.ts | 3 +- 23 files changed, 549 insertions(+), 663 deletions(-) delete mode 100644 lib/__tests__/standalone-invalidScopeDisables.test.js delete mode 100644 lib/__tests__/standalone-needlessDisables.test.js create mode 100644 lib/utils/putIfAbsent.js diff --git a/CHANGELOG.md b/CHANGELOG.md index d72f4a6a29..0234ea34d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project are documented in this file. +## Head + +- Added: disable comments that are reported as errors for various reasons are now reported as standard lint errors rather than a separate class of errors that must be handled specially. +- Deprecated: `StylelintStandaloneReturnValue.reportedDisables`, `.descriptionlessDisables`, `.needlessDisables`, and `.invalidScopeDisables`. `.reportedDisables` will always be empty and the other properties will always be undefined, since these errors now show up in `.results` instead. + ## 13.7.2 - Fixed: regression for disable commands and adjacent double-slash comments ([#4950](https://github.com/stylelint/stylelint/pull/4950)). diff --git a/docs/developer-guide/formatters.md b/docs/developer-guide/formatters.md index ad1b2f280d..75099772a9 100644 --- a/docs/developer-guide/formatters.md +++ b/docs/developer-guide/formatters.md @@ -50,30 +50,6 @@ And the second argument (`returnValue`) is an object (type `StylelintStandaloneR ```js { "errored": false, // `true` if there were any warnings with "error" severity - "needlessDisables": [ - // Present if stylelint was configured with `reportNeedlessDisables: true` - { - "source": "path/to/file.css", - "ranges": [ - { - "start": 10, - "rule": "indentation" - } - ] - } - ], - "invalidScopeDisables": [ - // Present if stylelint was configured with `reportInvalidScopeDisables: true` - { - "source": "path/to/file.css", - "ranges": [ - { - "start": 1, - "rule": "color-named" - } - ] - } - ], "maxWarningsExceeded": { // Present if stylelint was configured with a `maxWarnings` count "maxWarnings": 10, diff --git a/docs/user-guide/configure.md b/docs/user-guide/configure.md index b3455dbe08..9c380e808c 100644 --- a/docs/user-guide/configure.md +++ b/docs/user-guide/configure.md @@ -155,7 +155,7 @@ For example: } ``` -The report is included in the [`reportedDisables`](usage/node-api.md#reporteddisables) property to the returned data of Node.js API. +The report is considered to be a lint error. ## `defaultSeverity` diff --git a/docs/user-guide/usage/node-api.md b/docs/user-guide/usage/node-api.md index 902b0e4cae..055daa10e4 100644 --- a/docs/user-guide/usage/node-api.md +++ b/docs/user-guide/usage/node-api.md @@ -66,22 +66,6 @@ An array containing all the stylelint result objects (the objects that formatter An object containing the maximum number of warnings and the amount found, e.g. `{ maxWarnings: 0, foundWarnings: 12 }`. -### `reportedDisables` - -An array of objects, one for each source, with tells you which `stylelint-disable` comments for rules enabled [`reportDisables`](../configure.md#reportdisables). - -### `needlessDisables` - -An array of objects, one for each source, with tells you which `stylelint-disable` comments are not blocking a lint violation. - -### `invalidScopeDisables` - -An array of objects, one for each source, with tells you which rule in a `stylelint-disable ` comment doesn't exist within the configuration object. - -### `descriptionlessDisables` - -An array of objects, one for each source, with tells you which `stylelint-disable` comments without a description. - ## Syntax errors `stylelint.lint()` does not reject the Promise when your CSS contains syntax errors. diff --git a/docs/user-guide/usage/options.md b/docs/user-guide/usage/options.md index 5676c715dc..f4850701a8 100644 --- a/docs/user-guide/usage/options.md +++ b/docs/user-guide/usage/options.md @@ -146,7 +146,7 @@ Produce a report to clean up your codebase, keeping only the `stylelint-disable` If needless disables are found, the: - CLI process exits with code `2` -- Node.js API adds a [`needlessDisables`](node-api.md#needlessdisables) property to the returned data +- Node.js API adds errors to the returned data ## `reportInvalidScopeDisables` @@ -157,7 +157,7 @@ Produce a report of the `stylelint-disable` comments that used for rules that do If invalid scope disables are found, the: - CLI process exits with code `2` -- Node.js API adds a [`invalidScopeDisables`](node-api.md#invalidscopedisables) property to the returned data +- Node.js API adds errors to the returned data ## `reportDescriptionlessDisables` @@ -196,7 +196,7 @@ a {} If descriptionless disables are found, the: - CLI process exits with code `2` -- Node.js API adds a [`descriptionlessDisables`](node-api.md#descriptionlessdisables) property to the returned data +- Node.js API adds errors to the returned data ## `codeFilename` diff --git a/lib/__tests__/cli.test.js b/lib/__tests__/cli.test.js index 9599f39d4e..99d5f2491d 100644 --- a/lib/__tests__/cli.test.js +++ b/lib/__tests__/cli.test.js @@ -232,14 +232,9 @@ describe('CLI', () => { expect(process.exitCode).toBe(2); - expect(process.stdout.write).toHaveBeenCalledTimes(2); - expect(process.stdout.write).toHaveBeenNthCalledWith( - 1, - expect.stringContaining('needless disable: color-named'), - ); - expect(process.stdout.write).toHaveBeenNthCalledWith( - 2, - expect.stringContaining('Unexpected empty block'), + expect(process.stdout.write).toHaveBeenCalledTimes(1); + expect(process.stdout.write).toHaveBeenCalledWith( + expect.stringMatching(/Needless disable for "color-named".*Unexpected empty block/s), ); }); @@ -253,9 +248,8 @@ describe('CLI', () => { expect(process.exitCode).toBe(2); expect(process.stdout.write).toHaveBeenCalledTimes(1); - expect(process.stdout.write).toHaveBeenNthCalledWith( - 1, - expect.stringContaining('forbidden disable: block-no-empty'), + expect(process.stdout.write).toHaveBeenCalledWith( + expect.stringContaining('Rule "block-no-empty" may not be disabled'), ); }); @@ -270,9 +264,8 @@ describe('CLI', () => { expect(process.exitCode).toBe(2); expect(process.stdout.write).toHaveBeenCalledTimes(1); - expect(process.stdout.write).toHaveBeenNthCalledWith( - 1, - expect.stringContaining('descriptionless disable: block-no-empty'), + expect(process.stdout.write).toHaveBeenCalledWith( + expect.stringContaining('Disable for "block-no-empty" is missing a description'), ); }); diff --git a/lib/__tests__/descriptionlessDisables.test.js b/lib/__tests__/descriptionlessDisables.test.js index d1983b83f3..b515bc79d7 100644 --- a/lib/__tests__/descriptionlessDisables.test.js +++ b/lib/__tests__/descriptionlessDisables.test.js @@ -14,7 +14,7 @@ it('descriptionlessDisables', () => { /* stylelint-enable */ a { b {} /* stylelint-disable-line block-no-empty -- Description */ - } + } /* stylelint-disable-next-line block-no-empty * -- * Description */ @@ -35,27 +35,34 @@ it('descriptionlessDisables', () => { code: css, reportDescriptionlessDisables: true, }).then((linted) => { - const report = linted.descriptionlessDisables; + const results = linted.results; + + expect(results).toHaveLength(1); + const warnings = results[0].warnings.filter( + (warning) => warning.rule === '--report-descriptionless-disables', + ); - expect(report).toHaveLength(1); - expect(report[0].ranges).toEqual([ + expect(warnings).toEqual([ { - start: 12, - end: 14, - rule: 'all', - unusedRule: 'all', + line: 12, + column: 1, + rule: '--report-descriptionless-disables', + severity: 'error', + text: 'Disable for "all" is missing a description', }, { - start: 16, - end: 16, - rule: 'block-no-empty', - unusedRule: 'block-no-empty', + line: 16, + column: 8, + rule: '--report-descriptionless-disables', + severity: 'error', + text: 'Disable for "block-no-empty" is missing a description', }, { - start: 19, - end: 19, - rule: 'block-no-empty', - unusedRule: 'block-no-empty', + line: 18, + column: 1, + rule: '--report-descriptionless-disables', + severity: 'error', + text: 'Disable for "block-no-empty" is missing a description', }, ]); }); diff --git a/lib/__tests__/disableRanges.test.js b/lib/__tests__/disableRanges.test.js index 2b86021182..e309f1884e 100644 --- a/lib/__tests__/disableRanges.test.js +++ b/lib/__tests__/disableRanges.test.js @@ -1,10 +1,13 @@ 'use strict'; +const _ = require('lodash'); const assignDisabledRanges = require('../assignDisabledRanges'); const less = require('postcss-less'); const postcss = require('postcss'); const scss = require('postcss-scss'); +/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["expect*"] }] */ + it('no disabling', () => { return testDisableRanges('a {}').then((result) => { expect(result.stylelint.disabledRanges).toEqual({ all: [] }); @@ -13,7 +16,7 @@ it('no disabling', () => { it('disable without re-enabling', () => { return testDisableRanges('/* stylelint-disable */\na {}').then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [ { start: 1, @@ -30,7 +33,7 @@ it('disable and re-enable', () => { b {} /* stylelint-enable */ .foo {}`).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [ { start: 2, @@ -53,7 +56,7 @@ it('disable and re-enable twice', () => { b {} /* stylelint-enable */ .foo {}`).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [ { start: 2, @@ -75,7 +78,7 @@ it('disable and re-enable twice', () => { it('disable rule without re-enabling', () => { return testDisableRanges('/* stylelint-disable foo-bar */\na {}') .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'foo-bar': [ { @@ -91,7 +94,7 @@ it('disable rule without re-enabling', () => { return testDisableRanges( '/* stylelint-disable selector-combinator-space-before */\n' + 'a {}', ).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'selector-combinator-space-before': [ { @@ -116,7 +119,7 @@ it('mixed disabling of specific and all rules, enabling of all', () => { b {} /* stylelint-enable */ .foo {}`).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'foo-bar': [ { @@ -147,7 +150,7 @@ it('mixed disabling of specific and all rules, enabling of all', () => { it('disable rules with newline in rule list', () => { return testDisableRanges('/* stylelint-disable foo-bar, hoo-hah,\n\tslime */\n' + 'b {}\n').then( (result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'foo-bar': [ { @@ -174,66 +177,57 @@ it('disable rules with newline in rule list', () => { it('disable single line all rules', () => { return testDisableRanges('a {} /* stylelint-disable-line */').then((result) => { - expect(result.stylelint.disabledRanges).toEqual( - { - all: [ - { - start: 1, - end: 1, - strictStart: true, - strictEnd: true, - }, - ], - }, - 'disabling all rules', - ); + expectDisableRanges(result, { + all: [ + { + start: 1, + end: 1, + strictStart: true, + strictEnd: true, + }, + ], + }); }); }); it('disable single line one rule', () => { return testDisableRanges('a {} /* stylelint-disable-line block-no-empty */').then((result) => { - expect(result.stylelint.disabledRanges).toEqual( - { + expectDisableRanges(result, { + all: [], + 'block-no-empty': [ + { + start: 1, + end: 1, + strictStart: true, + strictEnd: true, + }, + ], + }); + }); +}); + +it('disable single line multiple rules', () => { + return testDisableRanges('b {}\n\na {} /* stylelint-disable-line block-no-empty, blergh */').then( + (result) => { + expectDisableRanges(result, { all: [], 'block-no-empty': [ { - start: 1, - end: 1, + start: 3, + end: 3, strictStart: true, strictEnd: true, }, ], - }, - 'disabling a single rule', - ); - }); -}); - -it('disable single line multiple rules', () => { - return testDisableRanges('b {}\n\na {} /* stylelint-disable-line block-no-empty, blergh */').then( - (result) => { - expect(result.stylelint.disabledRanges).toEqual( - { - all: [], - 'block-no-empty': [ - { - start: 3, - end: 3, - strictStart: true, - strictEnd: true, - }, - ], - blergh: [ - { - start: 3, - end: 3, - strictStart: true, - strictEnd: true, - }, - ], - }, - 'disabling multiple specific rules', - ); + blergh: [ + { + start: 3, + end: 3, + strictStart: true, + strictEnd: true, + }, + ], + }); }, ); }); @@ -251,9 +245,25 @@ it('disable single line one rule and re-enable all', () => { it('disable next line all rules', () => { return testDisableRanges('/* stylelint-disable-next-line */\na {} ').then((result) => { - expect(result.stylelint.disabledRanges).toEqual( - { - all: [ + expectDisableRanges(result, { + all: [ + { + start: 2, + end: 2, + strictStart: true, + strictEnd: true, + }, + ], + }); + }); +}); + +it('disable next line one rule', () => { + return testDisableRanges('/* stylelint-disable-next-line block-no-empty */\na {}').then( + (result) => { + expectDisableRanges(result, { + all: [], + 'block-no-empty': [ { start: 2, end: 2, @@ -261,29 +271,7 @@ it('disable next line all rules', () => { strictEnd: true, }, ], - }, - 'disabling all rules', - ); - }); -}); - -it('disable next line one rule', () => { - return testDisableRanges('/* stylelint-disable-next-line block-no-empty */\na {}').then( - (result) => { - expect(result.stylelint.disabledRanges).toEqual( - { - all: [], - 'block-no-empty': [ - { - start: 2, - end: 2, - strictStart: true, - strictEnd: true, - }, - ], - }, - 'disabling a single rule', - ); + }); }, ); }); @@ -296,28 +284,25 @@ it('disable next line multiple rules', () => { /* stylelint-disable-next-line block-no-empty, blergh */ a {}`, (result) => { - expect(result.stylelint.disabledRanges).toEqual( - { - all: [], - 'block-no-empty': [ - { - start: 5, - end: 5, - strictStart: true, - strictEnd: true, - }, - ], - blergh: [ - { - start: 5, - end: 5, - strictStart: true, - strictEnd: true, - }, - ], - }, - 'disabling multiple specific rules', - ); + expectDisableRanges(result, { + all: [], + 'block-no-empty': [ + { + start: 5, + end: 5, + strictStart: true, + strictEnd: true, + }, + ], + blergh: [ + { + start: 5, + end: 5, + strictStart: true, + strictEnd: true, + }, + ], + }); }, ); }); @@ -331,7 +316,7 @@ it('SCSS // line-disabling comment', () => { .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -354,7 +339,7 @@ it('Less // line-disabling comment', () => { .use(assignDisabledRanges) .process(lessSource, { syntax: less, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -375,7 +360,7 @@ it('nested ranges all rule-specific', () => { /* stylelint-enable bar */ /* stylelint-enable foo, hop */ /* stylelint-enable baz */`).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], foo: [ { @@ -418,7 +403,7 @@ it('nested ranges all for all rules', () => { /* stylelint-enable bar */ /* stylelint-disable bar */ /* stylelint-enable */`).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [ { start: 1, @@ -449,7 +434,7 @@ it('nested ranges disable rules enable all', () => { return testDisableRanges(`/* stylelint-disable foo */ /* stylelint-disable bar, baz */ /* stylelint-enable */`).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], foo: [ { @@ -484,7 +469,7 @@ it('nested ranges mix disabling enabling all rules and specific rules', () => { /* stylelint-enable foo */ /* stylelint-enable */ /* stylelint-disable bar */`).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [ { start: 1, @@ -525,7 +510,7 @@ it('nested ranges another mix', () => { /* stylelint-enable foo */ /* stylelint-disable foo */ /* stylelint-enable */`).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [ { start: 1, @@ -534,6 +519,14 @@ it('nested ranges another mix', () => { strictEnd: true, }, ], + bar: [ + { + start: 1, + end: 2, + strictStart: false, + strictEnd: true, + }, + ], foo: [ { start: 1, @@ -548,14 +541,6 @@ it('nested ranges another mix', () => { strictEnd: false, }, ], - bar: [ - { - start: 1, - end: 2, - strictStart: false, - strictEnd: true, - }, - ], }); }); }); @@ -648,7 +633,7 @@ it('enable rule without disabling rule', () => { it('disable (with description) without re-enabling', () => { return testDisableRanges('/* stylelint-disable -- Description */\na {}').then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [ { start: 1, @@ -666,7 +651,7 @@ it('disable and re-enable (with descriptions)', () => { b {} /* stylelint-enable -- Description */ .foo {}`).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [ { start: 2, @@ -683,7 +668,7 @@ it('disable and re-enable (with descriptions)', () => { it('disable rule (with description) without re-enabling', () => { return testDisableRanges('/* stylelint-disable foo-bar -- Description */\na {}').then( (result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'foo-bar': [ { @@ -703,7 +688,7 @@ it('disable rules (with description) with newline in rule list', () => { return testDisableRanges( '/* stylelint-disable foo-bar, hoo-hah,\n\tslime -- Description */\n' + 'b {}\n', ).then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'foo-bar': [ { @@ -739,7 +724,7 @@ it('SCSS // line-disabling comment (with description)', () => { .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -766,7 +751,7 @@ it('SCSS // disable next-line comment (with multi-line description)', () => { .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -793,7 +778,7 @@ it('SCSS // disable comment (with // comment after blank line)', () => { .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -816,7 +801,7 @@ it('SCSS // disable comment (with // comment immediately after)', () => { .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -840,7 +825,7 @@ it('SCSS /* disable comment (with // comment after blank line)', () => { .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -863,7 +848,7 @@ it('SCSS // disable comment (with // comment immediately before)', () => { .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -886,7 +871,7 @@ it('SCSS two adjacent // disable comments', () => { .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -918,7 +903,7 @@ it('SCSS two adjacent // disable comments with multi-line descriptions', () => { .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -950,7 +935,7 @@ it('SCSS two // disable comments with an unrelated comment between them', () => .use(assignDisabledRanges) .process(scssSource, { syntax: scss, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -977,7 +962,7 @@ it('Less // line-disabling comment (with description)', () => { .use(assignDisabledRanges) .process(lessSource, { syntax: less, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -1004,7 +989,7 @@ it('Less // disable next-line comment (with multi-line description)', () => { .use(assignDisabledRanges) .process(lessSource, { syntax: less, from: undefined }) .then((result) => { - expect(result.stylelint.disabledRanges).toEqual({ + expectDisableRanges(result, { all: [], 'declaration-no-important': [ { @@ -1019,6 +1004,29 @@ it('Less // disable next-line comment (with multi-line description)', () => { }); }); +function expectDisableRanges(result, expected) { + const actual = result.stylelint.disabledRanges; + + expect(Object.keys(actual)).toEqual(Object.keys(expected)); + + for (const [name, expectedRanges] of Object.entries(expected)) { + const actualRanges = actual[name]; + + expect(actualRanges).toHaveLength(expectedRanges.length); + + for (let i = 0; i < expectedRanges.length; i++) { + expectDisableRange(actualRanges[i], expectedRanges[i]); + } + } +} + +function expectDisableRange(actual, expected) { + const actualMutable = _.cloneDeep(actual); + + delete actualMutable.comment; + expect(actualMutable).toEqual(expected); +} + function testDisableRanges(source, cb) { return postcss().use(assignDisabledRanges).process(source, { from: undefined }).then(cb); } diff --git a/lib/__tests__/invalidScopeDisables.test.js b/lib/__tests__/invalidScopeDisables.test.js index f3a06bc03a..ffd888b73b 100644 --- a/lib/__tests__/invalidScopeDisables.test.js +++ b/lib/__tests__/invalidScopeDisables.test.js @@ -1,6 +1,5 @@ 'use strict'; -const invalidScopeDisables = require('../invalidScopeDisables'); const path = require('path'); const replaceBackslashes = require('../testUtils/replaceBackslashes'); const standalone = require('../standalone'); @@ -10,10 +9,6 @@ function fixture(name) { return replaceBackslashes(path.join(__dirname, './fixtures/disableOptions', name)); } -function source(name) { - return path.join(__dirname, './fixtures/disableOptions', name); -} - it('invalidScopeDisables simple case', () => { const config = { rules: { @@ -34,14 +29,27 @@ it('invalidScopeDisables simple case', () => { return standalone({ config, code: css, + reportInvalidScopeDisables: true, }).then((linted) => { - const report = invalidScopeDisables(linted.results, config); + const results = linted.results; - expect(report).toHaveLength(1); - expect(report[0].ranges).toHaveLength(2); - expect(report[0].ranges).toEqual([ - { end: 3, start: 1, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, - { end: 5, start: 5, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, + expect(results).toHaveLength(1); + + expect(invalidScopeDisables(results[0].warnings)).toEqual([ + { + line: 1, + column: 1, + rule: '--report-invalid-scope-disables', + text: 'Rule "block-no-empty" isn\'t enabled', + severity: 'error', + }, + { + line: 5, + column: 8, + rule: '--report-invalid-scope-disables', + text: 'Rule "block-no-empty" isn\'t enabled', + severity: 'error', + }, ]); }); }); @@ -61,17 +69,31 @@ it('invalidScopeDisables complex case', () => { // ignore files contain `CssSyntaxError` fixture('disabled-ranges-3.css'), ], + reportInvalidScopeDisables: true, }).then((linted) => { - expect(invalidScopeDisables(linted.results, config)).toEqual([ + const results = linted.results; + + expect(results).toHaveLength(3); + + expect(invalidScopeDisables(results[0].warnings)).toEqual([ { - source: source('disabled-ranges-1.css'), - ranges: [{ start: 1, end: 3, rule: 'color-named', unusedRule: 'color-named' }], + line: 1, + column: 1, + rule: '--report-invalid-scope-disables', + text: 'Rule "color-named" isn\'t enabled', + severity: 'error', }, + ]); + expect(invalidScopeDisables(results[1].warnings)).toEqual([ { - source: source('disabled-ranges-2.css'), - ranges: [{ start: 5, end: 5, rule: 'color-named', unusedRule: 'color-named' }], + line: 5, + column: 6, + rule: '--report-invalid-scope-disables', + text: 'Rule "color-named" isn\'t enabled', + severity: 'error', }, ]); + expect(invalidScopeDisables(results[2].warnings)).toHaveLength(0); }); }); @@ -87,11 +109,19 @@ it('invalidScopeDisables ignored case', () => { files: [fixture('disabled-ranges-1.css'), fixture('ignored-file.css')], ignoreDisables: true, ignorePath: fixture('.stylelintignore'), + reportInvalidScopeDisables: true, }).then((linted) => { - expect(invalidScopeDisables(linted.results, config)).toEqual([ + const results = linted.results; + + expect(results).toHaveLength(1); + + expect(invalidScopeDisables(results[0].warnings)).toEqual([ { - source: source('disabled-ranges-1.css'), - ranges: [{ start: 5, end: 7, rule: 'block-no-empty', unusedRule: 'block-no-empty' }], + line: 5, + column: 1, + rule: '--report-invalid-scope-disables', + text: 'Rule "block-no-empty" isn\'t enabled', + severity: 'error', }, ]); }); @@ -104,8 +134,12 @@ it('invalidScopeDisables without config', () => { }, code: 'a {}', ignoreDisables: true, + reportInvalidScopeDisables: true, }).then((linted) => { - expect(invalidScopeDisables(linted.results)).toEqual([]); + const results = linted.results; + + expect(results).toHaveLength(1); + expect(invalidScopeDisables(results[0].warnings)).toHaveLength(0); }); }); @@ -114,14 +148,22 @@ it('invalidScopeDisables for config file', () => { files: [fixture('file-config/disabled-ranges-1.css')], reportInvalidScopeDisables: true, }).then((linted) => { - expect(linted.invalidScopeDisables).toHaveLength(1); - expect(linted.invalidScopeDisables[0].ranges).toEqual([ + const results = linted.results; + + expect(results).toHaveLength(1); + + expect(invalidScopeDisables(results[0].warnings)).toEqual([ { - end: undefined, - start: 4, - rule: 'foo', - unusedRule: 'foo', + line: 4, + column: 1, + rule: '--report-invalid-scope-disables', + text: 'Rule "foo" isn\'t enabled', + severity: 'error', }, ]); }); }); + +function invalidScopeDisables(warnings) { + return warnings.filter((warning) => warning.rule === '--report-invalid-scope-disables'); +} diff --git a/lib/__tests__/needlessDisables.test.js b/lib/__tests__/needlessDisables.test.js index 2a0b7380e4..dc222bb624 100644 --- a/lib/__tests__/needlessDisables.test.js +++ b/lib/__tests__/needlessDisables.test.js @@ -5,10 +5,6 @@ const replaceBackslashes = require('../testUtils/replaceBackslashes'); const standalone = require('../standalone'); const stripIndent = require('common-tags').stripIndent; -function source(name) { - return path.join(__dirname, './fixtures/disableOptions', name); -} - function fixture(name) { return replaceBackslashes(path.join(__dirname, './fixtures/disableOptions', name)); } @@ -38,12 +34,58 @@ it('needlessDisables simple case', () => { code: css, reportNeedlessDisables: true, }).then((linted) => { - const report = linted.needlessDisables; + const results = linted.results; + + expect(results).toHaveLength(1); + const warnings = results[0].warnings; - expect(report).toHaveLength(1); - expect(report[0].ranges).toEqual([ - { start: 7, end: 9, rule: 'all', unusedRule: 'all' }, - { start: 11, end: 11, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, + expect(warnings).toEqual([ + { + line: 7, + column: 1, + text: 'Needless disable for "all"', + rule: '--report-needless-disables', + severity: 'error', + }, + { + line: 11, + column: 22, + text: 'Needless disable for "block-no-empty"', + rule: '--report-needless-disables', + severity: 'error', + }, + ]); + }); +}); + +it('needlessDisables with multiple rules', () => { + const config = { + rules: { 'block-no-empty': true, 'color-named': true }, + }; + + const css = stripIndent` + /* stylelint-disable-next-line block-no-empty, color-named */ + a {} + `; + + return standalone({ + config, + code: css, + reportNeedlessDisables: true, + }).then((linted) => { + const results = linted.results; + + expect(results).toHaveLength(1); + const warnings = results[0].warnings; + + expect(warnings).toEqual([ + { + line: 1, + column: 1, + text: 'Needless disable for "color-named"', + rule: '--report-needless-disables', + severity: 'error', + }, ]); }); }); @@ -66,24 +108,51 @@ it('needlessDisables complex case', () => { ], reportNeedlessDisables: true, }).then((linted) => { - expect(linted.needlessDisables).toEqual([ + const results = linted.results; + + expect(results).toHaveLength(3); + expect(needlessDisables(results[0].warnings)).toEqual([ + { + line: 1, + column: 1, + text: 'Needless disable for "color-named"', + rule: '--report-needless-disables', + severity: 'error', + }, + { + line: 5, + column: 1, + text: 'Needless disable for "block-no-empty"', + rule: '--report-needless-disables', + severity: 'error', + }, + ]); + + expect(needlessDisables(results[1].warnings)).toEqual([ { - source: source('disabled-ranges-1.css'), - ranges: [ - { start: 1, end: 3, rule: 'color-named', unusedRule: 'color-named' }, - { start: 5, end: 7, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, - { start: 10, end: 10, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, - ], + line: 6, + column: 19, + text: 'Needless disable for "block-no-empty"', + rule: '--report-needless-disables', + severity: 'error', }, { - source: source('disabled-ranges-2.css'), - ranges: [ - { start: 5, end: 5, rule: 'color-named', unusedRule: 'color-named' }, - { start: 6, end: 6, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, - { start: 8, end: 10, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, - ], + line: 8, + column: 1, + text: 'Needless disable for "block-no-empty"', + rule: '--report-needless-disables', + severity: 'error', + }, + { + line: 5, + column: 6, + text: 'Needless disable for "color-named"', + rule: '--report-needless-disables', + severity: 'error', }, ]); + + expect(needlessDisables(results[2].warnings)).toHaveLength(0); }); }); @@ -100,15 +169,37 @@ it('needlessDisables ignored case', () => { reportNeedlessDisables: true, ignorePath: fixture('.stylelintignore'), }).then((linted) => { - expect(linted.needlessDisables).toEqual([ + const results = linted.results; + + expect(results).toHaveLength(1); + const warnings = results[0].warnings; + + expect(needlessDisables(warnings)).toEqual([ { - source: source('disabled-ranges-1.css'), - ranges: [ - { start: 1, end: 3, rule: 'color-named', unusedRule: 'color-named' }, - { start: 5, end: 7, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, - { start: 10, end: 10, rule: 'all', unusedRule: 'all' }, - ], + line: 10, + column: 19, + text: 'Needless disable for "all"', + rule: '--report-needless-disables', + severity: 'error', + }, + { + line: 1, + column: 1, + text: 'Needless disable for "color-named"', + rule: '--report-needless-disables', + severity: 'error', + }, + { + line: 5, + column: 1, + text: 'Needless disable for "block-no-empty"', + rule: '--report-needless-disables', + severity: 'error', }, ]); }); }); + +function needlessDisables(warnings) { + return warnings.filter((warning) => warning.rule === '--report-needless-disables'); +} diff --git a/lib/__tests__/reportDisables.test.js b/lib/__tests__/reportDisables.test.js index c04d529c19..af682574c6 100644 --- a/lib/__tests__/reportDisables.test.js +++ b/lib/__tests__/reportDisables.test.js @@ -19,17 +19,27 @@ describe('reportDisables', () => { `; return standalone({ config, code: css }).then((linted) => { - const report = linted.reportedDisables; - - expect(report).toHaveLength(1); - expect(report[0].ranges).toEqual([ - { start: 1, end: 3, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, - { start: 5, end: 5, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, + const results = linted.results; + + expect(results).toHaveLength(1); + const warnings = results[0].warnings; + + expect(warnings).toEqual([ + { + line: 1, + column: 1, + text: 'Rule "block-no-empty" may not be disabled', + rule: 'reportDisables', + severity: 'error', + }, + { + line: 5, + column: 8, + text: 'Rule "block-no-empty" may not be disabled', + rule: 'reportDisables', + severity: 'error', + }, ]); - - // Although these disables are reported as issues, they're still in effect - // so the underlying lint issues are not reported. - expect(linted.results[0].warnings).toHaveLength(0); }); }); @@ -52,15 +62,27 @@ describe('reportDisables', () => { code: css, ignoreDisables: true, }).then((linted) => { - const report = linted.reportedDisables; - - expect(report).toHaveLength(1); - expect(report[0].ranges).toEqual([ - { start: 1, end: 3, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, - { start: 5, end: 5, rule: 'block-no-empty', unusedRule: 'block-no-empty' }, + const results = linted.results; + + expect(results).toHaveLength(1); + const warnings = results[0].warnings; + + expect(warnings.filter((warning) => warning.rule === 'reportDisables')).toEqual([ + { + line: 1, + column: 1, + text: 'Rule "block-no-empty" may not be disabled', + rule: 'reportDisables', + severity: 'error', + }, + { + line: 5, + column: 8, + text: 'Rule "block-no-empty" may not be disabled', + rule: 'reportDisables', + severity: 'error', + }, ]); - - expect(linted.results[0].warnings).toHaveLength(2); }); }); @@ -79,9 +101,10 @@ describe('reportDisables', () => { `; return standalone({ config, code: css }).then((linted) => { - const report = linted.reportedDisables; + const results = linted.results; - expect(report).toHaveLength(0); + expect(results).toHaveLength(1); + expect(results[0].warnings).toHaveLength(0); }); }); @@ -96,10 +119,10 @@ describe('reportDisables', () => { `; return standalone({ config, code: css }).then((linted) => { - const report = linted.reportedDisables; + const results = linted.results; - expect(report).toHaveLength(1); - expect(report[0].ranges).toHaveLength(0); + expect(results).toHaveLength(1); + expect(results[0].warnings).toHaveLength(0); }); }); }); diff --git a/lib/__tests__/standalone-formatter.test.js b/lib/__tests__/standalone-formatter.test.js index 31cf06f66e..19ab9dfef2 100644 --- a/lib/__tests__/standalone-formatter.test.js +++ b/lib/__tests__/standalone-formatter.test.js @@ -50,53 +50,3 @@ it('standalone with invalid formatter option', () => { ); }); }); - -it('standalone formatter receives {needlessDisables} as second argument', () => { - const formatter = jest.fn((results, { needlessDisables }) => { - return JSON.stringify({ results, needlessDisables }, null, 2); - }); - - return standalone({ - code: ` - /* stylelint-disable yo */ - a {} - `, - config: configBlockNoEmpty, - reportNeedlessDisables: true, - formatter, - }).then((linted) => { - const { output, results, needlessDisables } = linted; - - expect(needlessDisables).not.toBeUndefined(); - expect(needlessDisables).toHaveLength(1); - - expect(typeof output).toBe('string'); - expect(formatter).toHaveBeenCalledTimes(1); - expect(output).toBe(JSON.stringify({ results, needlessDisables }, null, 2)); - }); -}); - -it('standalone formatter receives {invalidScopeDisables} as second argument', () => { - const formatter = jest.fn((results, { invalidScopeDisables }) => { - return JSON.stringify({ results, invalidScopeDisables }, null, 2); - }); - - return standalone({ - code: ` - /* stylelint-disable indentation */ - a { color: red; } - `, - config: configBlockNoEmpty, - reportInvalidScopeDisables: true, - formatter, - }).then((linted) => { - const { output, results, invalidScopeDisables } = linted; - - expect(invalidScopeDisables).not.toBeUndefined(); - expect(invalidScopeDisables).toHaveLength(1); - - expect(typeof output).toBe('string'); - expect(formatter).toHaveBeenCalledTimes(1); - expect(output).toBe(JSON.stringify({ results, invalidScopeDisables }, null, 2)); - }); -}); diff --git a/lib/__tests__/standalone-invalidScopeDisables.test.js b/lib/__tests__/standalone-invalidScopeDisables.test.js deleted file mode 100644 index 220baff965..0000000000 --- a/lib/__tests__/standalone-invalidScopeDisables.test.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -const path = require('path'); -const replaceBackslashes = require('../testUtils/replaceBackslashes'); -const standalone = require('../standalone'); - -const fixturesPath = replaceBackslashes(path.join(__dirname, 'fixtures')); -const config = { - quiet: true, - rules: { - 'block-no-empty': true, - }, -}; - -it('standalone with input css and `reportInvalidScopeDisables`', () => { - return standalone({ - code: '/* stylelint-disable color-named */\na {}', - config, - reportInvalidScopeDisables: true, - }).then((linted) => { - const invalidScopeDisables = linted.invalidScopeDisables; - - expect(typeof invalidScopeDisables).toBe('object'); - expect(invalidScopeDisables).toHaveLength(1); - expect(invalidScopeDisables[0].ranges).toHaveLength(1); - expect(invalidScopeDisables[0].ranges[0]).toEqual({ - start: 1, - rule: 'color-named', - unusedRule: 'color-named', - }); - }); -}); - -it('standalone with input file(s) and `reportInvalidScopeDisables`', () => { - return standalone({ - files: replaceBackslashes(path.join(fixturesPath, 'empty-block-with-disables.css')), - config, - reportInvalidScopeDisables: true, - }).then((linted) => { - const invalidScopeDisables = linted.invalidScopeDisables; - - expect(typeof invalidScopeDisables).toBe('object'); - expect(invalidScopeDisables).toHaveLength(1); - expect(invalidScopeDisables[0].source).toBe( - path.join(fixturesPath, 'empty-block-with-disables.css'), - ); - expect(invalidScopeDisables[0].ranges[0]).toEqual({ - start: 1, - rule: 'color-named', - unusedRule: 'color-named', - }); - }); -}); diff --git a/lib/__tests__/standalone-needlessDisables.test.js b/lib/__tests__/standalone-needlessDisables.test.js deleted file mode 100644 index b3559e463a..0000000000 --- a/lib/__tests__/standalone-needlessDisables.test.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict'; - -const path = require('path'); -const replaceBackslashes = require('../testUtils/replaceBackslashes'); -const standalone = require('../standalone'); - -const fixturesPath = replaceBackslashes(path.join(__dirname, 'fixtures')); - -it('standalone with input css and `reportNeedlessDisables`', () => { - const config = { - quiet: true, - rules: { - 'block-no-empty': true, - 'color-named': 'never', - }, - }; - - return standalone({ - code: '/* stylelint-disable color-named */\na {}', - config, - reportNeedlessDisables: true, - }).then((linted) => { - const needlessDisables = linted.needlessDisables; - - expect(typeof needlessDisables).toBe('object'); - expect(needlessDisables).toHaveLength(1); - expect(needlessDisables[0].ranges).toHaveLength(1); - expect(needlessDisables[0].ranges[0]).toEqual({ - start: 1, - rule: 'color-named', - unusedRule: 'color-named', - }); - - expect(linted.results).toHaveLength(1); - const warnings = linted.results[0].warnings; - - expect(typeof warnings).toBe('object'); - expect(warnings).toHaveLength(1); - expect(warnings[0]).toEqual({ - line: 2, - column: 3, - rule: 'block-no-empty', - severity: 'error', - text: 'Unexpected empty block (block-no-empty)', - }); - }); -}); - -it('standalone with `reportNeedlessDisables` and correctly `stylelint-disable`', () => { - const config = { - quiet: true, - rules: { - 'color-named': 'never', - }, - }; - - return standalone({ - code: '/* stylelint-disable color-named */\na { color: black; }', - config, - reportNeedlessDisables: true, - }).then((linted) => { - const needlessDisables = linted.needlessDisables; - - expect(typeof needlessDisables).toBe('object'); - expect(needlessDisables).toHaveLength(1); - expect(needlessDisables[0].ranges).toHaveLength(0); - - expect(linted.results).toHaveLength(1); - const warnings = linted.results[0].warnings; - - expect(typeof warnings).toBe('object'); - expect(warnings).toHaveLength(0); - }); -}); - -it('standalone with `reportNeedlessDisables` and `ignoreDisables`', () => { - const config = { - quiet: true, - rules: { - 'color-named': 'never', - }, - }; - - return standalone({ - code: '/* stylelint-disable color-named */\na { color: black; }', - config, - reportNeedlessDisables: true, - ignoreDisables: true, - }).then((linted) => { - const needlessDisables = linted.needlessDisables; - - expect(typeof needlessDisables).toBe('object'); - expect(needlessDisables).toHaveLength(1); - expect(needlessDisables[0].ranges).toHaveLength(0); - - expect(linted.results).toHaveLength(1); - const warnings = linted.results[0].warnings; - - expect(typeof warnings).toBe('object'); - expect(warnings).toHaveLength(1); - expect(warnings[0]).toEqual({ - line: 2, - column: 12, - rule: 'color-named', - severity: 'error', - text: 'Unexpected named color "black" (color-named)', - }); - }); -}); - -it('standalone with input file(s) and `reportNeedlessDisables`', () => { - const config = { - quiet: true, - rules: { - 'block-no-empty': true, - 'color-named': 'never', - }, - }; - - return standalone({ - files: replaceBackslashes(path.join(fixturesPath, 'empty-block-with-disables.css')), - config, - reportNeedlessDisables: true, - }).then((linted) => { - const needlessDisables = linted.needlessDisables; - - expect(typeof needlessDisables).toBe('object'); - expect(needlessDisables).toHaveLength(1); - expect(needlessDisables[0].source).toBe( - path.join(fixturesPath, 'empty-block-with-disables.css'), - ); - expect(needlessDisables[0].ranges[0]).toEqual({ - start: 1, - rule: 'color-named', - unusedRule: 'color-named', - }); - }); -}); diff --git a/lib/assignDisabledRanges.js b/lib/assignDisabledRanges.js index 0ba45742b1..5e2f23ef79 100644 --- a/lib/assignDisabledRanges.js +++ b/lib/assignDisabledRanges.js @@ -16,6 +16,7 @@ const ALL_RULES = 'all'; /** @typedef {import('stylelint').DisabledRange} DisabledRange */ /** + * @param {PostcssComment} comment * @param {number} start * @param {boolean} strictStart * @param {string|undefined} description @@ -23,8 +24,9 @@ const ALL_RULES = 'all'; * @param {boolean} [strictEnd] * @returns {DisabledRange} */ -function createDisableRange(start, strictStart, description, end, strictEnd) { +function createDisableRange(comment, start, strictStart, description, end, strictEnd) { return { + comment, start, end: end || undefined, strictStart, @@ -142,7 +144,7 @@ module.exports = function (root, result) { const description = getDescription(comment.text); getCommandRules(disableLineCommand, comment.text).forEach((ruleName) => { - disableLine(line, ruleName, comment, description); + disableLine(comment, line, ruleName, description); }); } } @@ -156,18 +158,18 @@ module.exports = function (root, result) { const description = getDescription(comment.text); getCommandRules(disableNextLineCommand, comment.text).forEach((ruleName) => { - disableLine(line + 1, ruleName, comment, description); + disableLine(comment, line + 1, ruleName, description); }); } } /** + * @param {PostcssComment} comment * @param {number} line * @param {string} ruleName - * @param {PostcssComment} comment * @param {string|undefined} description */ - function disableLine(line, ruleName, comment, description) { + function disableLine(comment, line, ruleName, description) { if (ruleIsDisabled(ALL_RULES)) { throw comment.error('All rules have already been disabled', { plugin: 'stylelint', @@ -180,7 +182,7 @@ module.exports = function (root, result) { const strict = disabledRuleName === ALL_RULES; - startDisabledRange(line, disabledRuleName, strict, description); + startDisabledRange(comment, line, disabledRuleName, strict, description); endDisabledRange(line, disabledRuleName, strict); }); } else { @@ -190,7 +192,7 @@ module.exports = function (root, result) { }); } - startDisabledRange(line, ruleName, true, description); + startDisabledRange(comment, line, ruleName, true, description); endDisabledRange(line, ruleName, true); } } @@ -220,10 +222,10 @@ module.exports = function (root, result) { if (isAllRules) { Object.keys(disabledRanges).forEach((ruleName) => { - startDisabledRange(line, ruleName, ruleName === ALL_RULES, description); + startDisabledRange(comment, line, ruleName, ruleName === ALL_RULES, description); }); } else { - startDisabledRange(line, ruleToDisable, true, description); + startDisabledRange(comment, line, ruleToDisable, true, description); } } }); @@ -264,7 +266,7 @@ module.exports = function (root, result) { // Get a starting point from the where all rules were disabled if (!disabledRanges[ruleToEnable]) { disabledRanges[ruleToEnable] = disabledRanges.all.map(({ start, end, description }) => - createDisableRange(start, false, description, end, false), + createDisableRange(comment, start, false, description, end, false), ); } else { const range = _.last(disabledRanges[ALL_RULES]); @@ -348,13 +350,14 @@ module.exports = function (root, result) { } /** + * @param {PostcssComment} comment * @param {number} line * @param {string} ruleName * @param {boolean} strict * @param {string|undefined} description */ - function startDisabledRange(line, ruleName, strict, description) { - const rangeObj = createDisableRange(line, strict, description); + function startDisabledRange(comment, line, ruleName, strict, description) { + const rangeObj = createDisableRange(comment, line, strict, description); ensureRuleRanges(ruleName); disabledRanges[ruleName].push(rangeObj); @@ -382,8 +385,8 @@ module.exports = function (root, result) { */ function ensureRuleRanges(ruleName) { if (!disabledRanges[ruleName]) { - disabledRanges[ruleName] = disabledRanges.all.map(({ start, end, description }) => - createDisableRange(start, false, description, end, false), + disabledRanges[ruleName] = disabledRanges.all.map(({ comment, start, end, description }) => + createDisableRange(comment, start, false, description, end, false), ); } } diff --git a/lib/descriptionlessDisables.js b/lib/descriptionlessDisables.js index 6bfb634cce..545722d7b1 100644 --- a/lib/descriptionlessDisables.js +++ b/lib/descriptionlessDisables.js @@ -1,17 +1,14 @@ 'use strict'; +/** @typedef {import('postcss/lib/comment')} PostcssComment */ /** @typedef {import('stylelint').RangeType} RangeType */ /** @typedef {import('stylelint').DisableReportRange} DisableReportRange */ /** @typedef {import('stylelint').StylelintDisableOptionsReport} StylelintDisableOptionsReport */ /** * @param {import('stylelint').StylelintResult[]} results - * @returns {StylelintDisableOptionsReport} */ module.exports = function (results) { - /** @type {StylelintDisableOptionsReport} */ - const report = []; - results.forEach((result) => { // File with `CssSyntaxError` have not `_postcssResult` if (!result._postcssResult) { @@ -20,33 +17,29 @@ module.exports = function (results) { const rangeData = result._postcssResult.stylelint.disabledRanges; - /** @type {import('stylelint').StylelintDisableReportEntry} */ - const entry = { source: result.source, ranges: [] }; + /** @type {Set} */ + const alreadyReported = new Set(); Object.keys(rangeData).forEach((rule) => { rangeData[rule].forEach((range) => { if (range.description) return; - // Avoid duplicates from stylelint-disable comments with multiple rules. - const alreadyReported = entry.ranges.find((existing) => { - return existing.start === range.start && existing.end === range.end; - }); + if (alreadyReported.has(range.comment)) return; + + alreadyReported.add(range.comment); - if (alreadyReported) return; + // If the comment doesn't have a location, we can't report a useful error. + // In practice we expect all comments to have locations, though. + if (!range.comment.source || !range.comment.source.start) return; - entry.ranges.push({ - rule, - start: range.start, - end: range.end, - unusedRule: rule, + result.warnings.push({ + text: `Disable for "${rule}" is missing a description`, + rule: '--report-descriptionless-disables', + line: range.comment.source.start.line, + column: range.comment.source.start.column, + severity: 'error', }); }); }); - - if (entry.ranges.length > 0) { - report.push(entry); - } }); - - return report; }; diff --git a/lib/invalidScopeDisables.js b/lib/invalidScopeDisables.js index 1249284cb0..401e2fd42f 100644 --- a/lib/invalidScopeDisables.js +++ b/lib/invalidScopeDisables.js @@ -1,16 +1,11 @@ 'use strict'; /** @typedef {import('stylelint').RangeType} RangeType */ -/** @typedef {import('stylelint').StylelintDisableOptionsReport} StylelintDisableOptionsReport */ /** * @param {import('stylelint').StylelintResult[]} results - * @returns {StylelintDisableOptionsReport} */ module.exports = function (results) { - /** @type {StylelintDisableOptionsReport} */ - const report = []; - results.forEach((result) => { // File with `CssSyntaxError` have not `_postcssResult` if (!result._postcssResult) { @@ -28,8 +23,6 @@ module.exports = function (results) { usedRules.add('all'); - /** @type {import('stylelint').StylelintDisableReportEntry} */ - const sourceReport = { source: result.source, ranges: [] }; const rangeData = result._postcssResult.stylelint.disabledRanges; const disabledRules = Object.keys(rangeData); @@ -43,19 +36,18 @@ module.exports = function (results) { return; } - sourceReport.ranges.push({ - rule, - start: range.start, - end: range.end, - unusedRule: rule, + // If the comment doesn't have a location, we can't report a useful error. + // In practice we expect all comments to have locations, though. + if (!range.comment.source || !range.comment.source.start) return; + + result.warnings.push({ + text: `Rule "${rule}" isn't enabled`, + rule: '--report-invalid-scope-disables', + line: range.comment.source.start.line, + column: range.comment.source.start.column, + severity: 'error', }); }); }); - - if (sourceReport.ranges.length > 0) { - report.push(sourceReport); - } }); - - return report; }; diff --git a/lib/needlessDisables.js b/lib/needlessDisables.js index 70eae0f92a..62c7815d15 100644 --- a/lib/needlessDisables.js +++ b/lib/needlessDisables.js @@ -1,29 +1,24 @@ 'use strict'; const _ = require('lodash'); +const putIfAbsent = require('./utils/putIfAbsent'); +/** @typedef {import('postcss/lib/comment')} PostcssComment */ +/** @typedef {import('stylelint').DisabledRange} DisabledRange */ /** @typedef {import('stylelint').RangeType} RangeType */ /** @typedef {import('stylelint').DisableReportRange} DisableReportRange */ -/** @typedef {import('stylelint').StylelintDisableOptionsReport} StylelintDisableOptionsReport */ /** * @param {import('stylelint').StylelintResult[]} results - * @returns {StylelintDisableOptionsReport} */ module.exports = function (results) { - /** @type {StylelintDisableOptionsReport} */ - const report = []; - results.forEach((result) => { // File with `CssSyntaxError` have not `_postcssResult` if (!result._postcssResult) { return; } - /** @type {{ranges: DisableReportRange[], source: string}} */ - const unused = { source: result.source || '', ranges: [] }; - - /** @type {{[ruleName: string]: Array}} */ + /** @type {{[ruleName: string]: Array}} */ const rangeData = _.cloneDeep(result._postcssResult.stylelint.disabledRanges); if (!rangeData) { @@ -32,64 +27,68 @@ module.exports = function (results) { const disabledWarnings = result._postcssResult.stylelint.disabledWarnings || []; - disabledWarnings.forEach((warning) => { - const rule = warning.rule; + // A map from `stylelint-disable` comments to the set of rules that + // are usefully disabled by each comment. We track this + // comment-by-comment rather than range-by-range because ranges that + // disable *all* rules are duplicated for each rule they apply to in + // practice. + /** @type {Map>}} */ + const usefulDisables = new Map(); + for (const warning of disabledWarnings) { + const rule = warning.rule; const ruleRanges = rangeData[rule]; if (ruleRanges) { - // Back to front so we get the *last* range that applies to the warning - for (const range of ruleRanges.reverse()) { + for (const range of ruleRanges) { if (isWarningInRange(warning, range)) { - range.used = true; - - return; + putIfAbsent(usefulDisables, range.comment, () => new Set()).add(rule); } } } - for (const range of rangeData.all.reverse()) { + for (const range of rangeData.all) { if (isWarningInRange(warning, range)) { - range.used = true; - - return; + putIfAbsent(usefulDisables, range.comment, () => new Set()).add(rule); } } - }); + } - Object.keys(rangeData).forEach((rule) => { - rangeData[rule].forEach((range) => { - // Is an equivalent range already marked as unused? - const alreadyMarkedUnused = unused.ranges.find((unusedRange) => { - return unusedRange.start === range.start && unusedRange.end === range.end; - }); + const rangeEntries = Object.entries(rangeData); - // If this range is unused and no equivalent is marked, - // mark this range as unused - if (!range.used && !alreadyMarkedUnused) { - unused.ranges.push({ - rule, - start: range.start, - end: range.end, - unusedRule: rule, - }); - } + // Get rid of the duplicated ranges for each `all` rule. We only care + // if the entire `all` rule is useful as a whole or not. + for (const range of rangeData.all) { + for (const [rule, ranges] of rangeEntries) { + if (rule === 'all') continue; - // If this range is used but an equivalent has been marked as unused, - // remove that equivalent. This can happen because of the duplication - // of ranges in rule-specific range sets and the "all" range set - if (range.used && alreadyMarkedUnused) { - _.remove(unused.ranges, alreadyMarkedUnused); - } - }); - }); - - unused.ranges = _.sortBy(unused.ranges, ['start', 'end']); + _.remove(ranges, (otherRange) => range.comment === otherRange.comment); + } + } - report.push(unused); + for (const [rule, ranges] of rangeEntries) { + for (const range of ranges) { + const useful = usefulDisables.get(range.comment) || new Set(); + + // Only emit a warning if this range's comment isn't useful for this rule. + // For the special rule "all", only emit a warning if it's not useful for + // *any* // rules, becuase it covers all of them. + if (rule === 'all' ? useful.size !== 0 : useful.has(rule)) continue; + + // If the comment doesn't have a location, we can't report a useful error. + // In practice we expect all comments to have locations, though. + if (!range.comment.source || !range.comment.source.start) continue; + + result.warnings.push({ + text: `Needless disable for "${rule}"`, + rule: '--report-needless-disables', + line: range.comment.source.start.line, + column: range.comment.source.start.column, + severity: 'error', + }); + } + } }); - - return report; }; /** diff --git a/lib/prepareReturnValue.js b/lib/prepareReturnValue.js index 9319433cb2..a533f5dd7f 100644 --- a/lib/prepareReturnValue.js +++ b/lib/prepareReturnValue.js @@ -25,6 +25,14 @@ function prepareReturnValue(stylelintResults, options, formatter) { maxWarnings, } = options; + reportDisables(stylelintResults); + + if (reportNeedlessDisables) needlessDisables(stylelintResults); + + if (reportInvalidScopeDisables) invalidScopeDisables(stylelintResults); + + if (reportDescriptionlessDisables) descriptionlessDisables(stylelintResults); + const errored = stylelintResults.some( (result) => result.errored || result.parseErrors.length > 0, ); @@ -34,21 +42,9 @@ function prepareReturnValue(stylelintResults, options, formatter) { errored, results: [], output: '', - reportedDisables: reportDisables(stylelintResults), + reportedDisables: [], }; - if (reportNeedlessDisables) { - returnValue.needlessDisables = needlessDisables(stylelintResults); - } - - if (reportInvalidScopeDisables) { - returnValue.invalidScopeDisables = invalidScopeDisables(stylelintResults); - } - - if (reportDescriptionlessDisables) { - returnValue.descriptionlessDisables = descriptionlessDisables(stylelintResults); - } - if (maxWarnings !== undefined) { const foundWarnings = stylelintResults.reduce((count, file) => { return count + file.warnings.length; diff --git a/lib/reportDisables.js b/lib/reportDisables.js index a528fe7640..36ac5a109a 100644 --- a/lib/reportDisables.js +++ b/lib/reportDisables.js @@ -4,28 +4,20 @@ const _ = require('lodash'); /** @typedef {import('stylelint').RangeType} RangeType */ /** @typedef {import('stylelint').DisableReportRange} DisabledRange */ -/** @typedef {import('stylelint').StylelintDisableOptionsReport} StylelintDisableOptionsReport */ /** * Returns a report describing which `results` (if any) contain disabled ranges * for rules that disallow disables via `reportDisables: true`. * * @param {import('stylelint').StylelintResult[]} results - * @returns {StylelintDisableOptionsReport} */ module.exports = function (results) { - /** @type {StylelintDisableOptionsReport} */ - const report = []; - results.forEach((result) => { // File with `CssSyntaxError` don't have `_postcssResult`s. if (!result._postcssResult) { return; } - /** @type {{ranges: DisabledRange[], source: string}} */ - const reported = { source: result.source || '', ranges: [] }; - /** @type {{[ruleName: string]: Array}} */ const rangeData = result._postcssResult.stylelint.disabledRanges; @@ -43,21 +35,20 @@ module.exports = function (results) { rangeData[rule].forEach((range) => { if (!reportDisablesForRule(_.get(config, ['rules', rule], []))) return; - reported.ranges.push({ - rule, - start: range.start, - end: range.end, - unusedRule: rule, + // If the comment doesn't have a location, we can't report a useful error. + // In practice we expect all comments to have locations, though. + if (!range.comment.source || !range.comment.source.start) return; + + result.warnings.push({ + text: `Rule "${rule}" may not be disabled`, + rule: 'reportDisables', + line: range.comment.source.start.line, + column: range.comment.source.start.column, + severity: 'error', }); }); }); - - reported.ranges = _.sortBy(reported.ranges, ['start', 'end']); - - report.push(reported); }); - - return report; }; /** diff --git a/lib/utils/putIfAbsent.js b/lib/utils/putIfAbsent.js new file mode 100644 index 0000000000..aeb9eed5fd --- /dev/null +++ b/lib/utils/putIfAbsent.js @@ -0,0 +1,22 @@ +'use strict'; + +/** + * If `map` already has the given `key`, returns its value. Otherwise, calls + * `callback`, adds the result to `map` at `key`, and then returns it. + * + * @template K + * @template V + * @param {Map} map + * @param {K} key + * @param {() => V} callback + * @returns {V} + */ +module.exports = function (map, key, callback) { + if (map.has(key)) return /** @type {V} */ (map.get(key)); + + const value = callback(); + + map.set(key, value); + + return value; +}; diff --git a/scripts/visual.css b/scripts/visual.css index d8e28debf6..3564d9623d 100644 --- a/scripts/visual.css +++ b/scripts/visual.css @@ -1,3 +1,4 @@ +/* stylelint-disable foo */ .baz { color: #4f; } diff --git a/types/stylelint/index.d.ts b/types/stylelint/index.d.ts index 800abaa67e..e24e2f65f1 100644 --- a/types/stylelint/index.d.ts +++ b/types/stylelint/index.d.ts @@ -1,5 +1,5 @@ declare module 'stylelint' { - import { Result, ResultMessage, Root, Syntax, WarningOptions, Warning } from 'postcss'; + import { Comment, Result, ResultMessage, Root, Syntax, WarningOptions, Warning } from 'postcss'; export type StylelintConfigExtends = string | Array; export type StylelintConfigPlugins = string | Array; @@ -31,6 +31,7 @@ declare module 'stylelint' { export type CosmiconfigResult = { config: StylelintConfig; filepath: string }; export type DisabledRange = { + comment: Comment; start: number; strictStart: boolean; end?: number; From 8cbbaef4032bc07ba93c332ebac57880f719a6f9 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Fri, 16 Oct 2020 04:56:36 +0900 Subject: [PATCH 31/46] Enable ESLint `no-shadow` and add disable comments (#4986) * Enable ESLint `no-shadow` and add disable comments This change takes the following steps: 1. Add `no-shadow: error` to our ESLint configuration in `package.json`. 2. Add disable and TODO comments via [`suppress-eslint-errors`](https://github.com/Faithlife/suppress-eslint-errors). ```console $ npx suppress-eslint-errors lib/**/*.js --message="TODO: Issue #4985" ``` * Bump eslint-config-stylelint from 12.1.0 to 13.0.0 https://github.com/stylelint/eslint-config-stylelint/releases/tag/13.0.0 --- lib/assignDisabledRanges.js | 2 + lib/cli.js | 8 +++ lib/formatters/stringFormatter.js | 2 + lib/rules/comment-whitespace-inside/index.js | 4 ++ .../declaration-bang-space-after/index.js | 4 ++ .../declaration-bang-space-before/index.js | 4 ++ .../index.js | 2 + .../index.js | 2 + lib/rules/indentation/index.js | 2 + lib/rules/length-zero-no-unit/index.js | 2 + lib/rules/linebreaks/index.js | 8 +++ lib/rules/max-empty-lines/index.js | 4 ++ lib/rules/max-line-length/index.js | 4 ++ lib/rules/max-nesting-depth/index.js | 2 + lib/rules/no-descending-specificity/index.js | 4 ++ lib/rules/no-duplicate-selectors/index.js | 4 ++ lib/rules/no-eol-whitespace/index.js | 6 +++ .../no-invalid-double-slash-comments/index.js | 2 + lib/rules/rule-empty-line-before/index.js | 4 ++ .../index.js | 2 + .../index.js | 2 + .../index.js | 2 + .../index.js | 2 + .../index.js | 2 + .../index.js | 2 + lib/rules/selector-attribute-quotes/index.js | 2 + lib/rules/selector-class-pattern/index.js | 6 +++ .../selector-combinator-allowed-list/index.js | 2 + .../selector-combinator-blacklist/index.js | 2 + .../index.js | 2 + .../selector-combinator-whitelist/index.js | 2 + .../index.js | 2 + lib/rules/selector-id-pattern/index.js | 2 + .../index.js | 2 + lib/rules/selector-max-attribute/index.js | 2 + lib/rules/selector-max-class/index.js | 2 + lib/rules/selector-max-combinators/index.js | 2 + .../selector-max-compound-selectors/index.js | 6 +++ lib/rules/selector-max-empty-lines/index.js | 2 + lib/rules/selector-max-id/index.js | 4 ++ lib/rules/selector-max-pseudo-class/index.js | 2 + lib/rules/selector-max-specificity/index.js | 8 +++ lib/rules/selector-max-type/index.js | 2 + lib/rules/selector-max-universal/index.js | 2 + lib/rules/selector-nested-pattern/index.js | 2 + .../selector-no-qualifying-type/index.js | 2 + lib/rules/selector-no-vendor-prefix/index.js | 2 + .../index.js | 2 + .../selector-pseudo-class-blacklist/index.js | 2 + lib/rules/selector-pseudo-class-case/index.js | 2 + .../index.js | 2 + .../selector-pseudo-class-no-unknown/index.js | 2 + .../index.js | 2 + .../selector-pseudo-class-whitelist/index.js | 2 + .../index.js | 2 + .../index.js | 2 + .../selector-pseudo-element-case/index.js | 2 + .../index.js | 2 + .../index.js | 2 + .../index.js | 2 + .../index.js | 2 + lib/rules/selector-type-case/index.js | 2 + lib/rules/selector-type-no-unknown/index.js | 2 + .../index.js | 2 + lib/rules/string-no-newline/index.js | 2 + lib/rules/string-quotes/index.js | 2 + lib/rules/unit-case/index.js | 2 + lib/rules/unit-no-unknown/index.js | 4 ++ .../__tests__/declarationValueIndex.test.js | 2 + .../__tests__/isSharedLineComment.test.js | 2 + .../isStandardSyntaxCombinator.test.js | 2 + lib/utils/validateObjectWithArrayProps.js | 2 + package-lock.json | 52 +++++++++---------- package.json | 2 +- 74 files changed, 221 insertions(+), 27 deletions(-) diff --git a/lib/assignDisabledRanges.js b/lib/assignDisabledRanges.js index 5e2f23ef79..71f81af761 100644 --- a/lib/assignDisabledRanges.js +++ b/lib/assignDisabledRanges.js @@ -107,6 +107,8 @@ module.exports = function (root, result) { } inlineEnd = current; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const next = current.next(); if (!next || next.type !== 'comment') break; diff --git a/lib/cli.js b/lib/cli.js index 80189a7759..dc87a9f53e 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -505,6 +505,8 @@ module.exports = (argv) => { if (report) reports.push(report); if (reportNeedlessDisables) { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const report = disableOptionsReportStringFormatter( linted.needlessDisables || [], 'needless disable', @@ -516,6 +518,8 @@ module.exports = (argv) => { } if (reportInvalidScopeDisables) { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const report = disableOptionsReportStringFormatter( linted.invalidScopeDisables || [], 'disable with invalid scope', @@ -527,6 +531,8 @@ module.exports = (argv) => { } if (reportDescriptionlessDisables) { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const report = disableOptionsReportStringFormatter( linted.descriptionlessDisables || [], 'descriptionless disable', @@ -538,6 +544,8 @@ module.exports = (argv) => { } if (reports.length > 0) { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow reports.forEach((report) => process.stdout.write(report)); process.exitCode = EXIT_CODE_ERROR; } diff --git a/lib/formatters/stringFormatter.js b/lib/formatters/stringFormatter.js index 5896827be8..0ae0cdbd48 100644 --- a/lib/formatters/stringFormatter.js +++ b/lib/formatters/stringFormatter.js @@ -195,6 +195,8 @@ module.exports = function (results) { output += deprecationsFormatter(results); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow output = results.reduce((output, result) => { // Treat parseErrors as warnings if (result.parseErrors) { diff --git a/lib/rules/comment-whitespace-inside/index.js b/lib/rules/comment-whitespace-inside/index.js index 0ab89fede8..059540ed67 100755 --- a/lib/rules/comment-whitespace-inside/index.js +++ b/lib/rules/comment-whitespace-inside/index.js @@ -65,6 +65,8 @@ function rule(expectation, options, context) { complain(messages.expectedClosing, comment.toString().length - closer.length - 1); } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function addWhitespaceBefore(comment) { if (comment.text.startsWith('*')) { comment.text = comment.text.replace(/^(\*+)/, `$1 `); @@ -73,6 +75,8 @@ function rule(expectation, options, context) { } } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function addWhitespaceAfter(comment) { if (_.last(comment.text) === '*') { comment.text = comment.text.replace(/(\*+)$/, ` $1`); diff --git a/lib/rules/declaration-bang-space-after/index.js b/lib/rules/declaration-bang-space-after/index.js index 78d5075ab2..0b64cd4b91 100644 --- a/lib/rules/declaration-bang-space-after/index.js +++ b/lib/rules/declaration-bang-space-after/index.js @@ -42,6 +42,8 @@ function rule(expectation, options, context) { if (bangIndex < value.length) { target = value; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow setFixed = (value) => { if (decl.raws.value) { decl.raws.value.raw = value; @@ -52,6 +54,8 @@ function rule(expectation, options, context) { } else if (decl.important) { target = decl.raws.important || ' !important'; bangIndex -= value.length; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow setFixed = (value) => { decl.raws.important = value; }; diff --git a/lib/rules/declaration-bang-space-before/index.js b/lib/rules/declaration-bang-space-before/index.js index 40122e39f3..dc981427ca 100644 --- a/lib/rules/declaration-bang-space-before/index.js +++ b/lib/rules/declaration-bang-space-before/index.js @@ -42,6 +42,8 @@ function rule(expectation, options, context) { if (bangIndex < value.length) { target = value; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow setFixed = (value) => { if (decl.raws.value) { decl.raws.value.raw = value; @@ -52,6 +54,8 @@ function rule(expectation, options, context) { } else if (decl.important) { target = decl.raws.important || ' !important'; bangIndex -= value.length; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow setFixed = (value) => { decl.raws.important = value; }; diff --git a/lib/rules/declaration-block-no-redundant-longhand-properties/index.js b/lib/rules/declaration-block-no-redundant-longhand-properties/index.js index 2e2f5ad818..cd23887bc2 100644 --- a/lib/rules/declaration-block-no-redundant-longhand-properties/index.js +++ b/lib/rules/declaration-block-no-redundant-longhand-properties/index.js @@ -36,6 +36,8 @@ function rule(actual, options) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const longhandProperties = _.transform(shorthandData, (result, values, key) => { if (optionsMatches(options, 'ignoreShorthands', key)) { return; diff --git a/lib/rules/declaration-block-single-line-max-declarations/index.js b/lib/rules/declaration-block-single-line-max-declarations/index.js index 7cf6f8ffaa..2d542e60bf 100644 --- a/lib/rules/declaration-block-single-line-max-declarations/index.js +++ b/lib/rules/declaration-block-single-line-max-declarations/index.js @@ -27,6 +27,8 @@ function rule(quantity) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isSingleLineString(blockString(rule))) { return; diff --git a/lib/rules/indentation/index.js b/lib/rules/indentation/index.js index cab219334c..041637b2b8 100644 --- a/lib/rules/indentation/index.js +++ b/lib/rules/indentation/index.js @@ -186,6 +186,8 @@ function rule(space, options = {}, context) { checkMultilineBit(declString, valueLevel, decl); } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function checkSelector(rule, ruleLevel) { const selector = rule.selector; diff --git a/lib/rules/length-zero-no-unit/index.js b/lib/rules/length-zero-no-unit/index.js index 6145771b27..99b78b5c6f 100644 --- a/lib/rules/length-zero-no-unit/index.js +++ b/lib/rules/length-zero-no-unit/index.js @@ -56,6 +56,8 @@ function rule(actual, secondary, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const stringValue = valueParser.stringify(node); const ignoreFlag = isMathFunction(node); diff --git a/lib/rules/linebreaks/index.js b/lib/rules/linebreaks/index.js index 8e3bca461d..241eff77d0 100644 --- a/lib/rules/linebreaks/index.js +++ b/lib/rules/linebreaks/index.js @@ -58,6 +58,8 @@ function rule(actual, secondary, context) { } } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function hasError(dataToCheck, shouldHaveCR) { const hasNewlineToVerify = /[\r\n]/.test(dataToCheck); const hasCR = hasNewlineToVerify ? /\r/.test(dataToCheck) : false; @@ -65,8 +67,12 @@ function rule(actual, secondary, context) { return hasNewlineToVerify && hasCR !== shouldHaveCR; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function fixData(data, shouldHaveCR) { if (data) { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow let result = data.replace(/\r/g, ''); if (shouldHaveCR) { @@ -91,6 +97,8 @@ function rule(actual, secondary, context) { }); } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function reportNewlineError(shouldHaveCR, lineNum, colNum, actual, result) { const reportNode = createReportNode(lineNum, colNum); diff --git a/lib/rules/max-empty-lines/index.js b/lib/rules/max-empty-lines/index.js index 4f7985db1d..85386641a0 100644 --- a/lib/rules/max-empty-lines/index.js +++ b/lib/rules/max-empty-lines/index.js @@ -151,6 +151,8 @@ function rule(max, options, context) { } } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function replaceEmptyLines(max, str, isSpecialCase = false) { const repeatTimes = isSpecialCase ? max : max + 1; @@ -161,6 +163,8 @@ function rule(max, options, context) { const emptyLFLines = '\n'.repeat(repeatTimes); const emptyCRLFLines = '\r\n'.repeat(repeatTimes); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow let result; if (/(\r\n)+/g.test(str)) { diff --git a/lib/rules/max-line-length/index.js b/lib/rules/max-line-length/index.js index 9740903e1a..65342c6ecb 100644 --- a/lib/rules/max-line-length/index.js +++ b/lib/rules/max-line-length/index.js @@ -72,6 +72,8 @@ function rule(maxLength, options, context) { checkNewline(rootString, match, root), ); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function complain(index, root) { report({ index, @@ -101,6 +103,8 @@ function rule(maxLength, options, context) { return excluded; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function checkNewline(rootString, match, root) { let nextNewlineIndex = rootString.indexOf('\n', match.endIndex); diff --git a/lib/rules/max-nesting-depth/index.js b/lib/rules/max-nesting-depth/index.js index c8f63a0bcf..9dc969a7c4 100644 --- a/lib/rules/max-nesting-depth/index.js +++ b/lib/rules/max-nesting-depth/index.js @@ -87,6 +87,8 @@ function rule(max, options) { const normalized = parser().processSync(selector, { lossless: false }); const selectors = normalized.split(','); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow return selectors.every((selector) => selector.startsWith('&:') && selector[2] !== ':'); } diff --git a/lib/rules/no-descending-specificity/index.js b/lib/rules/no-descending-specificity/index.js index 7357ef8d86..28089ea6c0 100644 --- a/lib/rules/no-descending-specificity/index.js +++ b/lib/rules/no-descending-specificity/index.js @@ -46,6 +46,8 @@ function rule(on, options) { const selectorContextLookup = nodeContextLookup(); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { // Ignore custom property set `--foo: {};` if (isCustomPropertySet(rule)) { @@ -88,6 +90,8 @@ function rule(on, options) { }); }); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function checkSelector(selectorNode, rule, sourceIndex, comparisonContext) { const selector = selectorNode.toString(); const referenceSelectorNode = lastCompoundSelectorWithoutPseudoClasses(selectorNode); diff --git a/lib/rules/no-duplicate-selectors/index.js b/lib/rules/no-duplicate-selectors/index.js index 02e8d4e566..0611e90f9c 100644 --- a/lib/rules/no-duplicate-selectors/index.js +++ b/lib/rules/no-duplicate-selectors/index.js @@ -47,12 +47,16 @@ function rule(actual, options) { // from other rules that share the same parent and the same source. const selectorContextLookup = nodeContextLookup(); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (isKeyframeRule(rule)) { return; } const contextSelectorSet = selectorContextLookup.getContext(rule, findAtRuleContext(rule)); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const resolvedSelectors = rule.selectors.reduce((result, selector) => { return _.union(result, resolvedNestedSelector(selector, rule)); }, []); diff --git a/lib/rules/no-eol-whitespace/index.js b/lib/rules/no-eol-whitespace/index.js index d797fc40d1..054004f9c7 100644 --- a/lib/rules/no-eol-whitespace/index.js +++ b/lib/rules/no-eol-whitespace/index.js @@ -117,6 +117,8 @@ function rule(on, options, context) { comments: 'check', }, (match) => { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const errorIndex = findErrorStartIndex(match.startIndex, string, { ignoreEmptyLines, isRootFirst, @@ -129,6 +131,8 @@ function rule(on, options, context) { ); } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function fix(root) { let isRootFirst = true; @@ -227,6 +231,8 @@ function rule(on, options, context) { } } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function fixText(value, fix, isRootFirst) { if (!value) { return; diff --git a/lib/rules/no-invalid-double-slash-comments/index.js b/lib/rules/no-invalid-double-slash-comments/index.js index 4720b8142d..3661a391bb 100644 --- a/lib/rules/no-invalid-double-slash-comments/index.js +++ b/lib/rules/no-invalid-double-slash-comments/index.js @@ -30,6 +30,8 @@ function rule(actual) { }); } }); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { rule.selectors.forEach((selector) => { if (selector.startsWith('//')) { diff --git a/lib/rules/rule-empty-line-before/index.js b/lib/rules/rule-empty-line-before/index.js index a4ffe755a3..ded0db72d3 100644 --- a/lib/rules/rule-empty-line-before/index.js +++ b/lib/rules/rule-empty-line-before/index.js @@ -52,6 +52,8 @@ function rule(expectation, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; @@ -134,6 +136,8 @@ function rule(expectation, options, context) { }; } +// TODO: Issue #4985 +// eslint-disable-next-line no-shadow function isAfterRule(rule) { const prevNode = getPreviousNonSharedLineCommentNode(rule); diff --git a/lib/rules/selector-attribute-brackets-space-inside/index.js b/lib/rules/selector-attribute-brackets-space-inside/index.js index 884e0a2f0d..168ff5f3ec 100644 --- a/lib/rules/selector-attribute-brackets-space-inside/index.js +++ b/lib/rules/selector-attribute-brackets-space-inside/index.js @@ -30,6 +30,8 @@ function rule(expectation, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-attribute-operator-allowed-list/index.js b/lib/rules/selector-attribute-operator-allowed-list/index.js index ae31e7ec8d..46e7427495 100644 --- a/lib/rules/selector-attribute-operator-allowed-list/index.js +++ b/lib/rules/selector-attribute-operator-allowed-list/index.js @@ -28,6 +28,8 @@ function rule(listInput) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-attribute-operator-blacklist/index.js b/lib/rules/selector-attribute-operator-blacklist/index.js index da21a5206a..82fb25db7c 100644 --- a/lib/rules/selector-attribute-operator-blacklist/index.js +++ b/lib/rules/selector-attribute-operator-blacklist/index.js @@ -36,6 +36,8 @@ function rule(listInput) { }, ); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-attribute-operator-disallowed-list/index.js b/lib/rules/selector-attribute-operator-disallowed-list/index.js index a48ae4a28d..2569897bcd 100644 --- a/lib/rules/selector-attribute-operator-disallowed-list/index.js +++ b/lib/rules/selector-attribute-operator-disallowed-list/index.js @@ -28,6 +28,8 @@ function rule(listInput) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-attribute-operator-space-after/index.js b/lib/rules/selector-attribute-operator-space-after/index.js index c63e385050..162e93a691 100644 --- a/lib/rules/selector-attribute-operator-space-after/index.js +++ b/lib/rules/selector-attribute-operator-space-after/index.js @@ -39,6 +39,8 @@ function rule(expectation, options, context) { const rawOperator = _.get(attributeNode, 'raws.operator'); if (rawOperator) { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const operatorAfter = rawOperator.slice(attributeNode.operator.length); return { diff --git a/lib/rules/selector-attribute-operator-whitelist/index.js b/lib/rules/selector-attribute-operator-whitelist/index.js index 528303672f..052cd5cf9f 100644 --- a/lib/rules/selector-attribute-operator-whitelist/index.js +++ b/lib/rules/selector-attribute-operator-whitelist/index.js @@ -36,6 +36,8 @@ function rule(listInput) { }, ); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-attribute-quotes/index.js b/lib/rules/selector-attribute-quotes/index.js index 25b6c1119a..ff66b314cb 100644 --- a/lib/rules/selector-attribute-quotes/index.js +++ b/lib/rules/selector-attribute-quotes/index.js @@ -26,6 +26,8 @@ function rule(expectation) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-class-pattern/index.js b/lib/rules/selector-class-pattern/index.js index 150106b24d..0745e9eade 100644 --- a/lib/rules/selector-class-pattern/index.js +++ b/lib/rules/selector-class-pattern/index.js @@ -44,6 +44,8 @@ function rule(pattern, options) { const shouldResolveNestedSelectors = _.get(options, 'resolveNestedSelectors'); const normalizedPattern = _.isString(pattern) ? new RegExp(pattern) : pattern; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { const selector = rule.selector; const selectors = rule.selectors; @@ -58,6 +60,8 @@ function rule(pattern, options) { // Only bother resolving selectors that have an interpolating & if (shouldResolveNestedSelectors && hasInterpolatingAmpersand(selector)) { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow resolveNestedSelector(selector, rule).forEach((selector) => { if (!isStandardSyntaxSelector(selector)) { return; @@ -70,6 +74,8 @@ function rule(pattern, options) { } }); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function checkSelector(fullSelector, rule) { fullSelector.walkClasses((classNode) => { const value = classNode.value; diff --git a/lib/rules/selector-combinator-allowed-list/index.js b/lib/rules/selector-combinator-allowed-list/index.js index 3b7f6b75a1..b26c67171b 100644 --- a/lib/rules/selector-combinator-allowed-list/index.js +++ b/lib/rules/selector-combinator-allowed-list/index.js @@ -27,6 +27,8 @@ function rule(list) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-combinator-blacklist/index.js b/lib/rules/selector-combinator-blacklist/index.js index 99116483ef..d55740c6b3 100644 --- a/lib/rules/selector-combinator-blacklist/index.js +++ b/lib/rules/selector-combinator-blacklist/index.js @@ -35,6 +35,8 @@ function rule(list) { }, ); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-combinator-disallowed-list/index.js b/lib/rules/selector-combinator-disallowed-list/index.js index c06631c3dc..0b38f47641 100644 --- a/lib/rules/selector-combinator-disallowed-list/index.js +++ b/lib/rules/selector-combinator-disallowed-list/index.js @@ -27,6 +27,8 @@ function rule(list) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-combinator-whitelist/index.js b/lib/rules/selector-combinator-whitelist/index.js index 427334ac24..ca10eff01e 100644 --- a/lib/rules/selector-combinator-whitelist/index.js +++ b/lib/rules/selector-combinator-whitelist/index.js @@ -35,6 +35,8 @@ function rule(list) { }, ); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-descendant-combinator-no-non-space/index.js b/lib/rules/selector-descendant-combinator-no-non-space/index.js index 6835a1b4e9..78394fa0c8 100644 --- a/lib/rules/selector-descendant-combinator-no-non-space/index.js +++ b/lib/rules/selector-descendant-combinator-no-non-space/index.js @@ -24,6 +24,8 @@ function rule(expectation, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-id-pattern/index.js b/lib/rules/selector-id-pattern/index.js index a79bf99756..b65276692c 100644 --- a/lib/rules/selector-id-pattern/index.js +++ b/lib/rules/selector-id-pattern/index.js @@ -29,6 +29,8 @@ function rule(pattern) { const normalizedPattern = _.isString(pattern) ? new RegExp(pattern) : pattern; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-list-comma-newline-after/index.js b/lib/rules/selector-list-comma-newline-after/index.js index 57defb08f5..022f1fcfba 100644 --- a/lib/rules/selector-list-comma-newline-after/index.js +++ b/lib/rules/selector-list-comma-newline-after/index.js @@ -30,6 +30,8 @@ function rule(expectation, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-max-attribute/index.js b/lib/rules/selector-max-attribute/index.js index f0a4f9c3c6..c6fa88ca62 100644 --- a/lib/rules/selector-max-attribute/index.js +++ b/lib/rules/selector-max-attribute/index.js @@ -29,6 +29,8 @@ function rule(max, options) { { actual: max, possible: [ + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function (max) { return typeof max === 'number' && max >= 0; }, diff --git a/lib/rules/selector-max-class/index.js b/lib/rules/selector-max-class/index.js index 8e08e1a4ed..ad1facac4e 100644 --- a/lib/rules/selector-max-class/index.js +++ b/lib/rules/selector-max-class/index.js @@ -22,6 +22,8 @@ function rule(max) { const validOptions = validateOptions(result, ruleName, { actual: max, possible: [ + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function (max) { return typeof max === 'number' && max >= 0; }, diff --git a/lib/rules/selector-max-combinators/index.js b/lib/rules/selector-max-combinators/index.js index bbb056d395..071fc44355 100644 --- a/lib/rules/selector-max-combinators/index.js +++ b/lib/rules/selector-max-combinators/index.js @@ -23,6 +23,8 @@ function rule(max) { const validOptions = validateOptions(result, ruleName, { actual: max, possible: [ + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function (max) { return typeof max === 'number' && max >= 0; }, diff --git a/lib/rules/selector-max-compound-selectors/index.js b/lib/rules/selector-max-compound-selectors/index.js index 92ed6145ec..0a59bf328c 100644 --- a/lib/rules/selector-max-compound-selectors/index.js +++ b/lib/rules/selector-max-compound-selectors/index.js @@ -24,6 +24,8 @@ function rule(max) { const validOptions = validateOptions(result, ruleName, { actual: max, possible: [ + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function (max) { return typeof max === 'number' && max > 0; }, @@ -35,6 +37,8 @@ function rule(max) { } // Finds actual selectors in selectorNode object and checks them + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function checkSelector(selectorNode, rule) { let compoundCount = 1; @@ -61,6 +65,8 @@ function rule(max) { } } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-max-empty-lines/index.js b/lib/rules/selector-max-empty-lines/index.js index 57b9c0fe39..27bb2a389a 100644 --- a/lib/rules/selector-max-empty-lines/index.js +++ b/lib/rules/selector-max-empty-lines/index.js @@ -31,6 +31,8 @@ function rule(max, options, context) { const allowedLFNewLinesString = context.fix ? '\n'.repeat(maxAdjacentNewlines) : ''; const allowedCRLFNewLinesString = context.fix ? '\r\n'.repeat(maxAdjacentNewlines) : ''; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { const selector = rule.raws.selector ? rule.raws.selector.raw : rule.selector; diff --git a/lib/rules/selector-max-id/index.js b/lib/rules/selector-max-id/index.js index 91555fe03d..c38fae5507 100644 --- a/lib/rules/selector-max-id/index.js +++ b/lib/rules/selector-max-id/index.js @@ -27,6 +27,8 @@ function rule(max, options) { { actual: max, possible: [ + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function (max) { return typeof max === 'number' && max >= 0; }, @@ -70,6 +72,8 @@ function rule(max, options) { } } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function isIgnoredContextFunctionalPseudoClass(node, options) { return ( node.type === 'pseudo' && diff --git a/lib/rules/selector-max-pseudo-class/index.js b/lib/rules/selector-max-pseudo-class/index.js index fc8d581a98..d129232c50 100644 --- a/lib/rules/selector-max-pseudo-class/index.js +++ b/lib/rules/selector-max-pseudo-class/index.js @@ -23,6 +23,8 @@ function rule(max) { const validOptions = validateOptions(result, ruleName, { actual: max, possible: [ + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function (max) { return typeof max === 'number' && max >= 0; }, diff --git a/lib/rules/selector-max-specificity/index.js b/lib/rules/selector-max-specificity/index.js index d4268523d3..1fad08bbd4 100755 --- a/lib/rules/selector-max-specificity/index.js +++ b/lib/rules/selector-max-specificity/index.js @@ -17,6 +17,8 @@ const validateOptions = require('../../utils/validateOptions'); const ruleName = 'selector-max-specificity'; const messages = ruleMessages(ruleName, { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow expected: (selector, specificity) => `Expected "${selector}" to have a specificity no more than "${specificity}"`, }); @@ -45,6 +47,8 @@ function rule(max, options) { { actual: max, possible: [ + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function (max) { // Check that the max specificity is in the form "a,b,c" return /^\d+,\d+,\d+$/.test(max); @@ -75,6 +79,8 @@ function rule(max, options) { // Calculate the the specificity of the most specific direct child const maxChildSpecificity = (node) => + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow node.reduce((max, child) => { const childSpecificity = nodeSpecificity(child); // eslint-disable-line no-use-before-define @@ -140,6 +146,8 @@ function rule(max, options) { const maxSpecificityArray = `0,${max}`.split(',').map(parseFloat); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-max-type/index.js b/lib/rules/selector-max-type/index.js index 0b4502c660..5a1a77037b 100644 --- a/lib/rules/selector-max-type/index.js +++ b/lib/rules/selector-max-type/index.js @@ -32,6 +32,8 @@ function rule(max, options) { ruleName, { actual: max, + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow possible(max) { return typeof max === 'number' && max >= 0; }, diff --git a/lib/rules/selector-max-universal/index.js b/lib/rules/selector-max-universal/index.js index d6b9219bec..5bac09ce7a 100644 --- a/lib/rules/selector-max-universal/index.js +++ b/lib/rules/selector-max-universal/index.js @@ -24,6 +24,8 @@ function rule(max) { const validOptions = validateOptions(result, ruleName, { actual: max, possible: [ + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function (max) { return typeof max === 'number' && max >= 0; }, diff --git a/lib/rules/selector-nested-pattern/index.js b/lib/rules/selector-nested-pattern/index.js index 816499e769..d0b42de2af 100644 --- a/lib/rules/selector-nested-pattern/index.js +++ b/lib/rules/selector-nested-pattern/index.js @@ -27,6 +27,8 @@ function rule(pattern) { const normalizedPattern = _.isString(pattern) ? new RegExp(pattern) : pattern; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (rule.parent.type !== 'rule') { return; diff --git a/lib/rules/selector-no-qualifying-type/index.js b/lib/rules/selector-no-qualifying-type/index.js index 75ee36e564..429755bec0 100644 --- a/lib/rules/selector-no-qualifying-type/index.js +++ b/lib/rules/selector-no-qualifying-type/index.js @@ -65,6 +65,8 @@ function rule(enabled, options) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-no-vendor-prefix/index.js b/lib/rules/selector-no-vendor-prefix/index.js index 9f768f586e..6f44df3960 100644 --- a/lib/rules/selector-no-vendor-prefix/index.js +++ b/lib/rules/selector-no-vendor-prefix/index.js @@ -36,6 +36,8 @@ function rule(actual, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-class-allowed-list/index.js b/lib/rules/selector-pseudo-class-allowed-list/index.js index a1dc06ac98..9810604fa8 100644 --- a/lib/rules/selector-pseudo-class-allowed-list/index.js +++ b/lib/rules/selector-pseudo-class-allowed-list/index.js @@ -28,6 +28,8 @@ function rule(list) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-class-blacklist/index.js b/lib/rules/selector-pseudo-class-blacklist/index.js index 991c913383..693b57f621 100644 --- a/lib/rules/selector-pseudo-class-blacklist/index.js +++ b/lib/rules/selector-pseudo-class-blacklist/index.js @@ -36,6 +36,8 @@ function rule(list) { }, ); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-class-case/index.js b/lib/rules/selector-pseudo-class-case/index.js index 42b4443685..132031ed89 100644 --- a/lib/rules/selector-pseudo-class-case/index.js +++ b/lib/rules/selector-pseudo-class-case/index.js @@ -27,6 +27,8 @@ function rule(expectation, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-class-disallowed-list/index.js b/lib/rules/selector-pseudo-class-disallowed-list/index.js index 3bf8ebe198..a12e472be9 100644 --- a/lib/rules/selector-pseudo-class-disallowed-list/index.js +++ b/lib/rules/selector-pseudo-class-disallowed-list/index.js @@ -28,6 +28,8 @@ function rule(list) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-class-no-unknown/index.js b/lib/rules/selector-pseudo-class-no-unknown/index.js index 6278988f5e..bb59f52480 100644 --- a/lib/rules/selector-pseudo-class-no-unknown/index.js +++ b/lib/rules/selector-pseudo-class-no-unknown/index.js @@ -41,6 +41,8 @@ function rule(actual, options) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function check(selector, result, node) { parseSelector(selector, result, node, (selectorTree) => { selectorTree.walkPseudos((pseudoNode) => { diff --git a/lib/rules/selector-pseudo-class-parentheses-space-inside/index.js b/lib/rules/selector-pseudo-class-parentheses-space-inside/index.js index 70cf7645fd..cc43a55ec6 100644 --- a/lib/rules/selector-pseudo-class-parentheses-space-inside/index.js +++ b/lib/rules/selector-pseudo-class-parentheses-space-inside/index.js @@ -28,6 +28,8 @@ function rule(expectation, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-class-whitelist/index.js b/lib/rules/selector-pseudo-class-whitelist/index.js index 0c8a82d937..37fd432ec7 100644 --- a/lib/rules/selector-pseudo-class-whitelist/index.js +++ b/lib/rules/selector-pseudo-class-whitelist/index.js @@ -36,6 +36,8 @@ function rule(list) { }, ); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-element-allowed-list/index.js b/lib/rules/selector-pseudo-element-allowed-list/index.js index 8663aff392..5dc0b17ca3 100644 --- a/lib/rules/selector-pseudo-element-allowed-list/index.js +++ b/lib/rules/selector-pseudo-element-allowed-list/index.js @@ -28,6 +28,8 @@ function rule(list) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-element-blacklist/index.js b/lib/rules/selector-pseudo-element-blacklist/index.js index 4ae53a1d85..2839755ba7 100644 --- a/lib/rules/selector-pseudo-element-blacklist/index.js +++ b/lib/rules/selector-pseudo-element-blacklist/index.js @@ -36,6 +36,8 @@ function rule(list) { }, ); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-element-case/index.js b/lib/rules/selector-pseudo-element-case/index.js index bb242bcc6a..26682ff091 100644 --- a/lib/rules/selector-pseudo-element-case/index.js +++ b/lib/rules/selector-pseudo-element-case/index.js @@ -27,6 +27,8 @@ function rule(expectation, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-element-colon-notation/index.js b/lib/rules/selector-pseudo-element-colon-notation/index.js index 1ab178bef2..6b0043a922 100644 --- a/lib/rules/selector-pseudo-element-colon-notation/index.js +++ b/lib/rules/selector-pseudo-element-colon-notation/index.js @@ -26,6 +26,8 @@ function rule(expectation, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-element-disallowed-list/index.js b/lib/rules/selector-pseudo-element-disallowed-list/index.js index a0349904c4..578733d184 100644 --- a/lib/rules/selector-pseudo-element-disallowed-list/index.js +++ b/lib/rules/selector-pseudo-element-disallowed-list/index.js @@ -28,6 +28,8 @@ function rule(list) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-element-no-unknown/index.js b/lib/rules/selector-pseudo-element-no-unknown/index.js index 970b60c720..055e72af54 100644 --- a/lib/rules/selector-pseudo-element-no-unknown/index.js +++ b/lib/rules/selector-pseudo-element-no-unknown/index.js @@ -38,6 +38,8 @@ function rule(actual, options) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-pseudo-element-whitelist/index.js b/lib/rules/selector-pseudo-element-whitelist/index.js index cd6a8d7c89..428a7a3c7f 100644 --- a/lib/rules/selector-pseudo-element-whitelist/index.js +++ b/lib/rules/selector-pseudo-element-whitelist/index.js @@ -36,6 +36,8 @@ function rule(list) { }, ); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/selector-type-case/index.js b/lib/rules/selector-type-case/index.js index de27df6308..8c371a6c80 100644 --- a/lib/rules/selector-type-case/index.js +++ b/lib/rules/selector-type-case/index.js @@ -40,6 +40,8 @@ function rule(expectation, options, context) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { let hasComments = _.get(rule, 'raws.selector.raw'); const selector = hasComments ? hasComments : rule.selector; diff --git a/lib/rules/selector-type-no-unknown/index.js b/lib/rules/selector-type-no-unknown/index.js index e65bea6c06..e2cf813da6 100644 --- a/lib/rules/selector-type-no-unknown/index.js +++ b/lib/rules/selector-type-no-unknown/index.js @@ -44,6 +44,8 @@ function rule(actual, options) { return; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow root.walkRules((rule) => { const selector = rule.selector; const selectors = rule.selectors; diff --git a/lib/rules/shorthand-property-no-redundant-values/index.js b/lib/rules/shorthand-property-no-redundant-values/index.js index a4fe764c7d..5550d192fb 100644 --- a/lib/rules/shorthand-property-no-redundant-values/index.js +++ b/lib/rules/shorthand-property-no-redundant-values/index.js @@ -111,6 +111,8 @@ function rule(actual, secondary, context) { } const shortestForm = canCondense(...valuesToShorthand); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const shortestFormString = shortestForm.filter((value) => value).join(' '); const valuesFormString = valuesToShorthand.join(' '); diff --git a/lib/rules/string-no-newline/index.js b/lib/rules/string-no-newline/index.js index 357e8d7396..328d086087 100644 --- a/lib/rules/string-no-newline/index.js +++ b/lib/rules/string-no-newline/index.js @@ -40,6 +40,8 @@ function rule(actual) { } }); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function checkRule(rule) { // Get out quickly if there are no new line if (!reNewLine.test(rule.selector)) { diff --git a/lib/rules/string-quotes/index.js b/lib/rules/string-quotes/index.js index eb5793b527..076a5b8450 100644 --- a/lib/rules/string-quotes/index.js +++ b/lib/rules/string-quotes/index.js @@ -62,6 +62,8 @@ function rule(expectation, secondary, context) { } }); + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow function checkRule(rule) { if (!isStandardSyntaxRule(rule)) { return; diff --git a/lib/rules/unit-case/index.js b/lib/rules/unit-case/index.js index 81df6675b4..6f97f3df8c 100644 --- a/lib/rules/unit-case/index.js +++ b/lib/rules/unit-case/index.js @@ -54,6 +54,8 @@ function rule(expectation, options, context) { const parsedValue = valueParser(value).walk((valueNode) => { // Ignore wrong units within `url` function let needFix = false; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow const value = valueNode.value; if (valueNode.type === 'function' && value.toLowerCase() === 'url') { diff --git a/lib/rules/unit-no-unknown/index.js b/lib/rules/unit-no-unknown/index.js index 090a6dce3e..9375db59d1 100644 --- a/lib/rules/unit-no-unknown/index.js +++ b/lib/rules/unit-no-unknown/index.js @@ -65,6 +65,8 @@ function rule(actual, options) { } if (isMap(valueNode)) { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow valueNode.nodes.forEach((node, index) => { if (!(index % mapPropertyNameIndexOffset)) { ignoredMapProperties.push(node.sourceIndex); @@ -121,6 +123,8 @@ function rule(actual, options) { if (/^(?:-webkit-)?image-set[\s(]/i.test(value)) { const imageSet = parsedValue.nodes.find( + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow (node) => vendor.unprefixed(node.value) === 'image-set', ); const imageSetValueLastIndex = _.last(imageSet.nodes).sourceIndex; diff --git a/lib/utils/__tests__/declarationValueIndex.test.js b/lib/utils/__tests__/declarationValueIndex.test.js index b6b0ed4dd8..464e9d3a82 100644 --- a/lib/utils/__tests__/declarationValueIndex.test.js +++ b/lib/utils/__tests__/declarationValueIndex.test.js @@ -28,6 +28,8 @@ describe('declarationValueIndex', () => { function decl(css) { const list = []; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow postcss.parse(css).walkDecls((decl) => list.push(decl)); return list[0]; diff --git a/lib/utils/__tests__/isSharedLineComment.test.js b/lib/utils/__tests__/isSharedLineComment.test.js index ee08824c00..f0dffd4dc5 100644 --- a/lib/utils/__tests__/isSharedLineComment.test.js +++ b/lib/utils/__tests__/isSharedLineComment.test.js @@ -193,6 +193,8 @@ describe('isSharedLineComment', () => { function comment(css) { const comments = []; + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow postcss.parse(css).walkComments((comment) => comments.push(comment)); return comments[0]; diff --git a/lib/utils/__tests__/isStandardSyntaxCombinator.test.js b/lib/utils/__tests__/isStandardSyntaxCombinator.test.js index 3636a6ef01..4ade6bbc65 100644 --- a/lib/utils/__tests__/isStandardSyntaxCombinator.test.js +++ b/lib/utils/__tests__/isStandardSyntaxCombinator.test.js @@ -57,6 +57,8 @@ function combinator(css) { postcss.parse(css).walkRules((rule) => { selectorParser((selectorAST) => { + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow selectorAST.walkCombinators((combinator) => list.push(combinator)); }).processSync(rule.selector); }); diff --git a/lib/utils/validateObjectWithArrayProps.js b/lib/utils/validateObjectWithArrayProps.js index 067f2dc79f..7eee556098 100644 --- a/lib/utils/validateObjectWithArrayProps.js +++ b/lib/utils/validateObjectWithArrayProps.js @@ -24,6 +24,8 @@ module.exports = (validator) => (value) => { return false; } + // TODO: Issue #4985 + // eslint-disable-next-line no-shadow return Object.values(value).every((value) => { if (!Array.isArray(value)) { return false; diff --git a/package-lock.json b/package-lock.json index 62f0188753..f4ceee5aba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1028,43 +1028,43 @@ "dev": true }, "@typescript-eslint/experimental-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.4.0.tgz", - "integrity": "sha512-01+OtK/oWeSJTjQcyzDztfLF1YjvKpLFo+JZmurK/qjSRcyObpIecJ4rckDoRCSh5Etw+jKfdSzVEHevh9gJ1w==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.4.1.tgz", + "integrity": "sha512-Nt4EVlb1mqExW9cWhpV6pd1a3DkUbX9DeyYsdoeziKOpIJ04S2KMVDO+SEidsXRH/XHDpbzXykKcMTLdTXH6cQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.4.0", - "@typescript-eslint/types": "4.4.0", - "@typescript-eslint/typescript-estree": "4.4.0", + "@typescript-eslint/scope-manager": "4.4.1", + "@typescript-eslint/types": "4.4.1", + "@typescript-eslint/typescript-estree": "4.4.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/scope-manager": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.4.0.tgz", - "integrity": "sha512-r2FIeeU1lmW4K3CxgOAt8djI5c6Q/5ULAgdVo9AF3hPMpu0B14WznBAtxrmB/qFVbVIB6fSx2a+EVXuhSVMEyA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.4.1.tgz", + "integrity": "sha512-2oD/ZqD4Gj41UdFeWZxegH3cVEEH/Z6Bhr/XvwTtGv66737XkR4C9IqEkebCuqArqBJQSj4AgNHHiN1okzD/wQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.4.0", - "@typescript-eslint/visitor-keys": "4.4.0" + "@typescript-eslint/types": "4.4.1", + "@typescript-eslint/visitor-keys": "4.4.1" } }, "@typescript-eslint/types": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.4.0.tgz", - "integrity": "sha512-nU0VUpzanFw3jjX+50OTQy6MehVvf8pkqFcURPAE06xFNFenMj1GPEI6IESvp7UOHAnq+n/brMirZdR+7rCrlA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.4.1.tgz", + "integrity": "sha512-KNDfH2bCyax5db+KKIZT4rfA8rEk5N0EJ8P0T5AJjo5xrV26UAzaiqoJCxeaibqc0c/IvZxp7v2g3difn2Pn3w==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.4.0.tgz", - "integrity": "sha512-Fh85feshKXwki4nZ1uhCJHmqKJqCMba+8ZicQIhNi5d5jSQFteWiGeF96DTjO8br7fn+prTP+t3Cz/a/3yOKqw==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.4.1.tgz", + "integrity": "sha512-wP/V7ScKzgSdtcY1a0pZYBoCxrCstLrgRQ2O9MmCUZDtmgxCO/TCqOTGRVwpP4/2hVfqMz/Vw1ZYrG8cVxvN3g==", "dev": true, "requires": { - "@typescript-eslint/types": "4.4.0", - "@typescript-eslint/visitor-keys": "4.4.0", + "@typescript-eslint/types": "4.4.1", + "@typescript-eslint/visitor-keys": "4.4.1", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -1082,12 +1082,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.4.0.tgz", - "integrity": "sha512-oBWeroUZCVsHLiWRdcTXJB7s1nB3taFY8WGvS23tiAlT6jXVvsdAV4rs581bgdEjOhn43q6ro7NkOiLKu6kFqA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.4.1.tgz", + "integrity": "sha512-H2JMWhLaJNeaylSnMSQFEhT/S/FsJbebQALmoJxMPMxLtlVAMy2uJP/Z543n9IizhjRayLSqoInehCeNW9rWcw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.4.0", + "@typescript-eslint/types": "4.4.1", "eslint-visitor-keys": "^2.0.0" } }, @@ -2821,9 +2821,9 @@ } }, "eslint-config-stylelint": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/eslint-config-stylelint/-/eslint-config-stylelint-12.1.0.tgz", - "integrity": "sha512-DDqptL24madtUumh/LPTDugdQXM2dkcL98Bzec5mv9htYdHzIoAbtsO4u9eziGsuw0kv6BvDs+qDLoCugYNUWQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-stylelint/-/eslint-config-stylelint-13.0.0.tgz", + "integrity": "sha512-EaaG/evY1UcoyB8nCp/Jz0EdNamOXPYbXDNwxyD7rNkVOCgBGRZgd0Dj8oYUMQCbLh8B749oI7pwgeGcdRSipw==", "dev": true, "requires": { "eslint-config-prettier": "^6.10.1", diff --git a/package.json b/package.json index 967aa17543..b15d2b7a88 100644 --- a/package.json +++ b/package.json @@ -181,7 +181,7 @@ "common-tags": "^1.8.0", "del": "^6.0.0", "eslint": "^7.11.0", - "eslint-config-stylelint": "^12.1.0", + "eslint-config-stylelint": "^13.0.0", "got": "^11.7.0", "husky": "^4.3.0", "jest": "^26.5.3", From 1ba8d6a8d5106c03f4ef074a15b47b9b96bee89d Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Thu, 15 Oct 2020 22:01:07 +0200 Subject: [PATCH 32/46] Show the pattern in "*-pattern" rule messages (#4975) --- .../custom-media-pattern/__tests__/index.js | 16 +-- lib/rules/custom-media-pattern/index.js | 4 +- .../__tests__/index.js | 14 +- lib/rules/custom-property-pattern/index.js | 4 +- .../keyframes-name-pattern/__tests__/index.js | 10 +- lib/rules/keyframes-name-pattern/index.js | 5 +- .../selector-class-pattern/__tests__/index.js | 126 ++++++++++-------- lib/rules/selector-class-pattern/index.js | 6 +- .../selector-id-pattern/__tests__/index.js | 49 ++++--- lib/rules/selector-id-pattern/index.js | 6 +- .../__tests__/index.js | 65 ++++++--- lib/rules/selector-nested-pattern/index.js | 5 +- 12 files changed, 185 insertions(+), 125 deletions(-) diff --git a/lib/rules/custom-media-pattern/__tests__/index.js b/lib/rules/custom-media-pattern/__tests__/index.js index 1c05705af3..92ba6904ad 100644 --- a/lib/rules/custom-media-pattern/__tests__/index.js +++ b/lib/rules/custom-media-pattern/__tests__/index.js @@ -27,25 +27,25 @@ testRule({ reject: [ { code: '@custom-media --foa-bar (min-width: 0);', - message: messages.expected, + message: messages.expected(/foo-.+/), line: 1, column: 15, }, { code: '@cUsToM-mEdIa --foa-bar (min-width: 0);', - message: messages.expected, + message: messages.expected(/foo-.+/), line: 1, column: 15, }, { code: '@CUSTOM-MEDIA --foa-bar (min-width: 0);', - message: messages.expected, + message: messages.expected(/foo-.+/), line: 1, column: 15, }, { code: '@custom-media --foa (min-width: 0);', - message: messages.expected, + message: messages.expected(/foo-.+/), line: 1, column: 15, }, @@ -71,13 +71,13 @@ testRule({ reject: [ { code: '@custom-media --foa-bar (min-width: 0);', - message: messages.expected, + message: messages.expected('foo-.+'), line: 1, column: 15, }, { code: '@custom-media --foa (min-width: 0);', - message: messages.expected, + message: messages.expected('foo-.+'), line: 1, column: 15, }, @@ -100,13 +100,13 @@ testRule({ reject: [ { code: '@custom-media --ape-ageLess', - message: messages.expected, + message: messages.expected(/^[A-Z][a-z]+-[a-z][a-zA-Z]+$/), line: 1, column: 15, }, { code: '@custom-media --Ape-AgeLess', - message: messages.expected, + message: messages.expected(/^[A-Z][a-z]+-[a-z][a-zA-Z]+$/), line: 1, column: 15, }, diff --git a/lib/rules/custom-media-pattern/index.js b/lib/rules/custom-media-pattern/index.js index c5d028b916..b57bb5458e 100644 --- a/lib/rules/custom-media-pattern/index.js +++ b/lib/rules/custom-media-pattern/index.js @@ -11,7 +11,7 @@ const validateOptions = require('../../utils/validateOptions'); const ruleName = 'custom-media-pattern'; const messages = ruleMessages(ruleName, { - expected: 'Expected custom media query name to match specified pattern', + expected: (pattern) => `Expected custom media query name to match pattern "${pattern}"`, }); function rule(pattern) { @@ -39,7 +39,7 @@ function rule(pattern) { } report({ - message: messages.expected, + message: messages.expected(pattern), node: atRule, index: atRuleParamIndex(atRule), result, diff --git a/lib/rules/custom-property-pattern/__tests__/index.js b/lib/rules/custom-property-pattern/__tests__/index.js index 00f887036e..7dd52973ac 100644 --- a/lib/rules/custom-property-pattern/__tests__/index.js +++ b/lib/rules/custom-property-pattern/__tests__/index.js @@ -18,11 +18,11 @@ testRule({ reject: [ { code: ':root { --boo-bar: 0; }', - message: messages.expected, + message: messages.expected(/foo-.+/), }, { code: ':root { --foo-: 0; }', - message: messages.expected, + message: messages.expected(/foo-.+/), }, ], }); @@ -43,11 +43,11 @@ testRule({ reject: [ { code: ':root { --boo-bar: 0; }', - message: messages.expected, + message: messages.expected('foo-.+'), }, { code: ':root { --foo-: 0; }', - message: messages.expected, + message: messages.expected('foo-.+'), }, ], }); @@ -68,15 +68,15 @@ testRule({ reject: [ { code: ':root { --boo-Foo-bar: 0; }', - message: messages.expected, + message: messages.expected(/^[A-Z][a-z]+-[a-z][a-zA-Z]+$/), }, { code: ':root { --foo-bar: 0; }', - message: messages.expected, + message: messages.expected(/^[A-Z][a-z]+-[a-z][a-zA-Z]+$/), }, { code: ':root { --Foo-Bar: 0; }', - message: messages.expected, + message: messages.expected(/^[A-Z][a-z]+-[a-z][a-zA-Z]+$/), }, ], }); diff --git a/lib/rules/custom-property-pattern/index.js b/lib/rules/custom-property-pattern/index.js index 76d9eb0496..57ccb3417a 100644 --- a/lib/rules/custom-property-pattern/index.js +++ b/lib/rules/custom-property-pattern/index.js @@ -11,7 +11,7 @@ const validateOptions = require('../../utils/validateOptions'); const ruleName = 'custom-property-pattern'; const messages = ruleMessages(ruleName, { - expected: 'Expected custom property name to match specified pattern', + expected: (pattern) => `Expected custom property name to match pattern "${pattern}"`, }); function rule(pattern) { @@ -39,7 +39,7 @@ function rule(pattern) { } report({ - message: messages.expected, + message: messages.expected(pattern), node: decl, result, ruleName, diff --git a/lib/rules/keyframes-name-pattern/__tests__/index.js b/lib/rules/keyframes-name-pattern/__tests__/index.js index 583c4e79cd..772fb47426 100644 --- a/lib/rules/keyframes-name-pattern/__tests__/index.js +++ b/lib/rules/keyframes-name-pattern/__tests__/index.js @@ -28,26 +28,26 @@ testRule({ reject: [ { code: '@keyframes foo {}', - message: messages.expected('foo'), + message: messages.expected('foo', 'foo-.+'), line: 1, column: 12, }, { code: '@keyframes bar {}', - message: messages.expected('bar'), + message: messages.expected('bar', 'foo-.+'), line: 1, column: 12, }, { code: '@keyframes FOO-bar {}', - message: messages.expected('FOO-bar'), + message: messages.expected('FOO-bar', 'foo-.+'), line: 1, column: 12, }, { code: '@-webkit-keyframes bar {}', description: 'Webkit prefix', - message: messages.expected('bar'), + message: messages.expected('bar', 'foo-.+'), line: 1, column: 20, }, @@ -69,7 +69,7 @@ testRule({ { code: '@keyframes foo-baz {}', description: 'Accepts pattern in RegExp notation', - message: messages.expected('foo-baz'), + message: messages.expected('foo-baz', /^foo-bar$/), line: 1, column: 12, }, diff --git a/lib/rules/keyframes-name-pattern/index.js b/lib/rules/keyframes-name-pattern/index.js index 0017c5bed7..3fbe55225e 100644 --- a/lib/rules/keyframes-name-pattern/index.js +++ b/lib/rules/keyframes-name-pattern/index.js @@ -11,7 +11,8 @@ const validateOptions = require('../../utils/validateOptions'); const ruleName = 'keyframes-name-pattern'; const messages = ruleMessages(ruleName, { - expected: (keyframeName) => `Expected keyframe name "${keyframeName}" to match specified pattern`, + expected: (keyframeName, pattern) => + `Expected keyframe name "${keyframeName}" to match pattern "${pattern}"`, }); function rule(pattern) { @@ -36,7 +37,7 @@ function rule(pattern) { report({ index: atRuleParamIndex(keyframesNode), - message: messages.expected(value), + message: messages.expected(value, pattern), node: keyframesNode, ruleName, result, diff --git a/lib/rules/selector-class-pattern/__tests__/index.js b/lib/rules/selector-class-pattern/__tests__/index.js index a8b5e9700a..d2b7743170 100644 --- a/lib/rules/selector-class-pattern/__tests__/index.js +++ b/lib/rules/selector-class-pattern/__tests__/index.js @@ -1,10 +1,8 @@ 'use strict'; -const mergeTestDescriptions = require('../../../testUtils/mergeTestDescriptions'); - const { messages, ruleName } = require('..'); -const basicAZTests = { +const basicAZTestsAccept = { accept: [ { code: 'a {}', @@ -45,22 +43,51 @@ const basicAZTests = { message: 'Keyframes with decimal percentages', }, ], +}; + +testRule({ + ruleName, + config: [/^[A-Z]+$/], + + ...basicAZTestsAccept, reject: [ { code: 'a .foo {}', - message: messages.expected('foo'), + message: messages.expected('foo', /^[A-Z]+$/), line: 1, column: 3, }, { code: '.ABABA > .bar {}', - message: messages.expected('bar'), + message: messages.expected('bar', /^[A-Z]+$/), line: 1, column: 10, }, ], -}; +}); + +testRule({ + ruleName, + config: ['^[A-Z]+$'], + + ...basicAZTestsAccept, + + reject: [ + { + code: 'a .foo {}', + message: messages.expected('foo', '^[A-Z]+$'), + line: 1, + column: 3, + }, + { + code: '.ABABA > .bar {}', + message: messages.expected('bar', '^[A-Z]+$'), + line: 1, + column: 10, + }, + ], +}); const nestedAZTestsDefault = { accept: [ @@ -73,7 +100,19 @@ const nestedAZTestsDefault = { ], }; -const nestedAZTests = { +testRule({ + ruleName, + config: [/^[A-Z]+$/], + ...nestedAZTestsDefault, +}); + +testRule({ + ruleName, + config: ['^[A-Z]+$'], + ...nestedAZTestsDefault, +}); + +const nestedAZTestsAccept = { accept: [ { code: '.AB { }', @@ -91,58 +130,39 @@ const nestedAZTests = { code: '.A, .B { &C {} &D, &E {} }', }, ], +}; + +testRule({ + ruleName, + config: [/^[A-Z]+$/, { resolveNestedSelectors: true }], + + ...nestedAZTestsAccept, reject: [ { code: '.A { &__B { }}', - message: messages.expected('A__B'), + message: messages.expected('A__B', /^[A-Z]+$/), line: 1, column: 6, }, ], -}; +}); -testRule( - mergeTestDescriptions(basicAZTests, { - ruleName, - config: [/^[A-Z]+$/], - }), -); - -testRule( - mergeTestDescriptions(basicAZTests, { - ruleName, - config: ['^[A-Z]+$'], - }), -); - -testRule( - mergeTestDescriptions(nestedAZTestsDefault, { - ruleName, - config: [/^[A-Z]+$/], - }), -); - -testRule( - mergeTestDescriptions(nestedAZTestsDefault, { - ruleName, - config: ['^[A-Z]+$'], - }), -); - -testRule( - mergeTestDescriptions(nestedAZTests, { - ruleName, - config: [/^[A-Z]+$/, { resolveNestedSelectors: true }], - }), -); - -testRule( - mergeTestDescriptions(nestedAZTests, { - ruleName, - config: ['^[A-Z]+$', { resolveNestedSelectors: true }], - }), -); +testRule({ + ruleName, + config: ['^[A-Z]+$', { resolveNestedSelectors: true }], + + ...nestedAZTestsAccept, + + reject: [ + { + code: '.A { &__B { }}', + message: messages.expected('A__B', '^[A-Z]+$'), + line: 1, + column: 6, + }, + ], +}); testRule({ ruleName, @@ -151,15 +171,15 @@ testRule({ reject: [ { code: '.A { .B {} }', - message: messages.expected('A'), + message: messages.expected('A', /^B+$/), }, { code: '.A { & .B {} }', - message: messages.expected('A'), + message: messages.expected('A', /^B+$/), }, { code: '.A { &>.B {} }', - message: messages.expected('A'), + message: messages.expected('A', /^B+$/), }, ], }); diff --git a/lib/rules/selector-class-pattern/index.js b/lib/rules/selector-class-pattern/index.js index 0745e9eade..1731ad3cd3 100644 --- a/lib/rules/selector-class-pattern/index.js +++ b/lib/rules/selector-class-pattern/index.js @@ -15,8 +15,8 @@ const validateOptions = require('../../utils/validateOptions'); const ruleName = 'selector-class-pattern'; const messages = ruleMessages(ruleName, { - expected: (selectorValue) => - `Expected class selector ".${selectorValue}" to match specified pattern`, + expected: (selectorValue, pattern) => + `Expected class selector ".${selectorValue}" to match pattern "${pattern}"`, }); function rule(pattern, options) { @@ -88,7 +88,7 @@ function rule(pattern, options) { report({ result, ruleName, - message: messages.expected(value), + message: messages.expected(value, pattern), node: rule, index: sourceIndex, }); diff --git a/lib/rules/selector-id-pattern/__tests__/index.js b/lib/rules/selector-id-pattern/__tests__/index.js index 9b51713389..c265d37b6c 100644 --- a/lib/rules/selector-id-pattern/__tests__/index.js +++ b/lib/rules/selector-id-pattern/__tests__/index.js @@ -1,7 +1,5 @@ 'use strict'; -const mergeTestDescriptions = require('../../../testUtils/mergeTestDescriptions'); - const { messages, ruleName } = require('..'); const basicAZTests = { @@ -41,36 +39,51 @@ const basicAZTests = { description: 'custom property set in selector', }, ], +}; + +testRule({ + ruleName, + config: [/^[A-Z]+$/], + + ...basicAZTests, reject: [ { code: 'a #foo {}', - message: messages.expected('foo'), + message: messages.expected('foo', /^[A-Z]+$/), line: 1, column: 3, }, { code: '#ABABA > #bar {}', - message: messages.expected('bar'), + message: messages.expected('bar', /^[A-Z]+$/), line: 1, column: 10, }, ], -}; +}); + +testRule({ + ruleName, + config: ['^[A-Z]+$'], -testRule( - mergeTestDescriptions(basicAZTests, { - ruleName, - config: [/^[A-Z]+$/], - }), -); + ...basicAZTests, -testRule( - mergeTestDescriptions(basicAZTests, { - ruleName, - config: ['^[A-Z]+$'], - }), -); + reject: [ + { + code: 'a #foo {}', + message: messages.expected('foo', '^[A-Z]+$'), + line: 1, + column: 3, + }, + { + code: '#ABABA > #bar {}', + message: messages.expected('bar', '^[A-Z]+$'), + line: 1, + column: 10, + }, + ], +}); testRule({ ruleName, @@ -98,7 +111,7 @@ testRule({ reject: [ { code: 'a { #bar {} }', - message: messages.expected('bar'), + message: messages.expected('bar', /^[A-Z]+$/), line: 1, column: 5, }, diff --git a/lib/rules/selector-id-pattern/index.js b/lib/rules/selector-id-pattern/index.js index b65276692c..659386e012 100644 --- a/lib/rules/selector-id-pattern/index.js +++ b/lib/rules/selector-id-pattern/index.js @@ -12,8 +12,8 @@ const validateOptions = require('../../utils/validateOptions'); const ruleName = 'selector-id-pattern'; const messages = ruleMessages(ruleName, { - expected: (selectorValue) => - `Expected ID selector "#${selectorValue}" to match specified pattern`, + expected: (selectorValue, pattern) => + `Expected ID selector "#${selectorValue}" to match pattern "${pattern}"`, }); function rule(pattern) { @@ -54,7 +54,7 @@ function rule(pattern) { report({ result, ruleName, - message: messages.expected(value), + message: messages.expected(value, pattern), node: rule, index: sourceIndex, }); diff --git a/lib/rules/selector-nested-pattern/__tests__/index.js b/lib/rules/selector-nested-pattern/__tests__/index.js index bd463cee4c..e05a21dff5 100644 --- a/lib/rules/selector-nested-pattern/__tests__/index.js +++ b/lib/rules/selector-nested-pattern/__tests__/index.js @@ -1,6 +1,5 @@ 'use strict'; -const mergeTestDescriptions = require('../../../testUtils/mergeTestDescriptions'); const stripIndent = require('common-tags').stripIndent; const { messages, ruleName } = require('..'); @@ -38,11 +37,18 @@ const basicAZTests = { description: 'custom property set in selector', }, ], +}; + +testRule({ + ruleName, + config: [/^[A-Z]+$/], + + ...basicAZTests, reject: [ { code: 'a { b {} }', - message: messages.expected('b'), + message: messages.expected('b', /^[A-Z]+$/), line: 1, column: 5, }, @@ -53,32 +59,51 @@ const basicAZTests = { span {} } }`, - message: messages.expected('span'), + message: messages.expected('span', /^[A-Z]+$/), line: 3, column: 5, }, { code: '@media print { a { b {} } }', - message: messages.expected('b'), + message: messages.expected('b', /^[A-Z]+$/), line: 1, column: 20, }, ], -}; +}); -testRule( - mergeTestDescriptions(basicAZTests, { - ruleName, - config: [/^[A-Z]+$/], - }), -); +testRule({ + ruleName, + config: ['^[A-Z]+$'], + + ...basicAZTests, -testRule( - mergeTestDescriptions(basicAZTests, { - ruleName, - config: ['^[A-Z]+$'], - }), -); + reject: [ + { + code: 'a { b {} }', + message: messages.expected('b', '^[A-Z]+$'), + line: 1, + column: 5, + }, + { + code: stripIndent` + a { + DIV { + span {} + } + }`, + message: messages.expected('span', '^[A-Z]+$'), + line: 3, + column: 5, + }, + { + code: '@media print { a { b {} } }', + message: messages.expected('b', '^[A-Z]+$'), + line: 1, + column: 20, + }, + ], +}); testRule({ ruleName, @@ -99,19 +124,19 @@ testRule({ reject: [ { code: '.foo { .bar {} }', - message: messages.expected('.bar'), + message: messages.expected('.bar', '^&:(?:hover|focus)$'), line: 1, column: 8, }, { code: '.foo { .bar:hover {} }', - message: messages.expected('.bar:hover'), + message: messages.expected('.bar:hover', '^&:(?:hover|focus)$'), line: 1, column: 8, }, { code: '.foo { &:hover, &focus {} }', - message: messages.expected('&:hover, &focus'), + message: messages.expected('&:hover, &focus', '^&:(?:hover|focus)$'), line: 1, column: 8, }, diff --git a/lib/rules/selector-nested-pattern/index.js b/lib/rules/selector-nested-pattern/index.js index d0b42de2af..11e0a8e4a3 100644 --- a/lib/rules/selector-nested-pattern/index.js +++ b/lib/rules/selector-nested-pattern/index.js @@ -11,7 +11,8 @@ const validateOptions = require('../../utils/validateOptions'); const ruleName = 'selector-nested-pattern'; const messages = ruleMessages(ruleName, { - expected: (selector) => `Expected nested selector "${selector}" to match specified pattern`, + expected: (selector, pattern) => + `Expected nested selector "${selector}" to match pattern "${pattern}"`, }); function rule(pattern) { @@ -47,7 +48,7 @@ function rule(pattern) { report({ result, ruleName, - message: messages.expected(selector), + message: messages.expected(selector, pattern), node: rule, }); }); From b0a0ee4bf291cda49f700c1d415a1afb3df7dd16 Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Thu, 15 Oct 2020 22:14:07 +0200 Subject: [PATCH 33/46] Update CHANGELOG.md --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0234ea34d2..7f9125797f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,9 @@ All notable changes to this project are documented in this file. ## Head -- Added: disable comments that are reported as errors for various reasons are now reported as standard lint errors rather than a separate class of errors that must be handled specially. -- Deprecated: `StylelintStandaloneReturnValue.reportedDisables`, `.descriptionlessDisables`, `.needlessDisables`, and `.invalidScopeDisables`. `.reportedDisables` will always be empty and the other properties will always be undefined, since these errors now show up in `.results` instead. +- Added: disable comments that are reported as errors for various reasons are now reported as standard lint errors rather than a separate class of errors that must be handled specially ([#4973](https://github.com/stylelint/stylelint/pull/4973)). +- Added: configured pattern in `*-pattern` rules violation message ([#4975](https://github.com/stylelint/stylelint/pull/4975)). +- Deprecated: `StylelintStandaloneReturnValue.reportedDisables`, `.descriptionlessDisables`, `.needlessDisables`, and `.invalidScopeDisables`. `.reportedDisables` will always be empty and the other properties will always be undefined, since these errors now show up in `.results` instead ([#4973](https://github.com/stylelint/stylelint/pull/4973)). ## 13.7.2 From cba295e09156a74bcd3b6b6f6ef394a7870a73c8 Mon Sep 17 00:00:00 2001 From: Omri Lavi Date: Thu, 15 Oct 2020 23:20:50 +0300 Subject: [PATCH 34/46] Add "comment-pattern" rule (#4962) * added implementation + tests * Added/updated readme * applied prettier * PR fixes (supporting string as option + tests, formatting, improved readme) * specifying the original pattern in the error message + fixing tests * Update lib/rules/comment-pattern/index.js Co-authored-by: Richard Hallows * removed irrelevant testRule * Update lib/rules/comment-pattern/README.md Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> * removed redundant tests which are covered in basic checks Co-authored-by: Richard Hallows Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> --- docs/user-guide/rules/list.md | 1 + lib/rules/comment-pattern/README.md | 38 +++++++++ lib/rules/comment-pattern/__tests__/index.js | 90 ++++++++++++++++++++ lib/rules/comment-pattern/index.js | 48 +++++++++++ lib/rules/index.js | 1 + 5 files changed, 178 insertions(+) create mode 100644 lib/rules/comment-pattern/README.md create mode 100644 lib/rules/comment-pattern/__tests__/index.js create mode 100644 lib/rules/comment-pattern/index.js diff --git a/docs/user-guide/rules/list.md b/docs/user-guide/rules/list.md index 06b93637b8..fb3b6f7d1a 100644 --- a/docs/user-guide/rules/list.md +++ b/docs/user-guide/rules/list.md @@ -228,6 +228,7 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### Comment +- [`comment-pattern`](../../../lib/rules/comment-pattern/README.md): Specify a pattern for comments. - [`comment-word-blacklist`](../../../lib/rules/comment-word-blacklist/README.md): Specify a list of disallowed words within comments. **(deprecated)** - [`comment-word-disallowed-list`](../../../lib/rules/comment-word-disallowed-list/README.md): Specify a list of disallowed words within comments. diff --git a/lib/rules/comment-pattern/README.md b/lib/rules/comment-pattern/README.md new file mode 100644 index 0000000000..b0a276e225 --- /dev/null +++ b/lib/rules/comment-pattern/README.md @@ -0,0 +1,38 @@ +# comment-pattern + +Specify a pattern for comments. + + +```css +/* comment */ +/** ↑ + * The pattern of this */ +``` + +## Options + +`regex|string` + +A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly. + +Given the string: + +``` +"foo .+" +``` + +The following patterns are considered violations: + + +```css +/*not starting with foo*/ +a { color: red; } +``` + +The following patterns are _not_ considered violations: + + +```css +/*foo at the beginning*/ +a { color: red; } +``` diff --git a/lib/rules/comment-pattern/__tests__/index.js b/lib/rules/comment-pattern/__tests__/index.js new file mode 100644 index 0000000000..c3ff4fcd43 --- /dev/null +++ b/lib/rules/comment-pattern/__tests__/index.js @@ -0,0 +1,90 @@ +'use strict'; + +const { messages, ruleName } = require('..'); + +testRule({ + ruleName, + config: [/foo-.+/], + + accept: [ + { + code: '/* foo-valid yay */', + }, + { + code: `/* foo-- + multi-line + \n + \r + \r\n + \n\r + \t + */`, + }, + ], + + reject: [ + { + code: '/* not foo- */', + message: messages.expected(/foo-.+/), + }, + { + code: '/**/', + message: messages.expected(/foo-.+/), + }, + ], +}); + +testRule({ + ruleName, + config: ['foo-.+'], + + accept: [ + { + code: '/* foo-valid yay */', + }, + { + code: `/* foo-- + multi-line + \n + \r + \r\n + \n\r + \t + */`, + }, + ], + + reject: [ + { + code: '/* not foo- */', + message: messages.expected('foo-.+'), + }, + { + code: '/**/', + message: messages.expected('foo-.+'), + }, + ], +}); + +testRule({ + ruleName, + config: [/foo-.+/], + syntax: 'scss', + + accept: [ + { + code: 'a {} // foo-ok', + }, + { + code: '// foo-ok', + }, + ], + + reject: [ + { + code: 'a {} // not-foo', + description: 'checks inline scss comments', + message: messages.expected(/foo-.+/), + }, + ], +}); diff --git a/lib/rules/comment-pattern/index.js b/lib/rules/comment-pattern/index.js new file mode 100644 index 0000000000..c78aa4aa45 --- /dev/null +++ b/lib/rules/comment-pattern/index.js @@ -0,0 +1,48 @@ +// @ts-nocheck + +'use strict'; + +const _ = require('lodash'); +const report = require('../../utils/report'); +const ruleMessages = require('../../utils/ruleMessages'); +const validateOptions = require('../../utils/validateOptions'); + +const ruleName = 'comment-pattern'; + +const messages = ruleMessages(ruleName, { + expected: (pattern) => `Expected comment to match pattern "${pattern}"`, +}); + +function rule(pattern) { + return (root, result) => { + const validOptions = validateOptions(result, ruleName, { + actual: pattern, + possible: [_.isRegExp, _.isString], + }); + + if (!validOptions) { + return; + } + + const normalizedPattern = _.isString(pattern) ? new RegExp(pattern) : pattern; + + root.walkComments((comment) => { + const text = comment.text; + + if (normalizedPattern.test(text)) { + return; + } + + report({ + message: messages.expected(pattern), + node: comment, + result, + ruleName, + }); + }); + }; +} + +rule.ruleName = ruleName; +rule.messages = messages; +module.exports = rule; diff --git a/lib/rules/index.js b/lib/rules/index.js index a2ee0d5260..8d51bfd21c 100644 --- a/lib/rules/index.js +++ b/lib/rules/index.js @@ -61,6 +61,7 @@ const rules = { 'color-no-invalid-hex': importLazy(() => require('./color-no-invalid-hex'))(), 'comment-empty-line-before': importLazy(() => require('./comment-empty-line-before'))(), 'comment-no-empty': importLazy(() => require('./comment-no-empty'))(), + 'comment-pattern': importLazy(() => require('./comment-pattern'))(), 'comment-whitespace-inside': importLazy(() => require('./comment-whitespace-inside'))(), 'comment-word-blacklist': importLazy(() => require('./comment-word-blacklist'))(), 'comment-word-disallowed-list': importLazy(() => require('./comment-word-disallowed-list'))(), From 17d740d566916c6af9494e2afa8e1a1549aee2bb Mon Sep 17 00:00:00 2001 From: Aleks Hudochenkov Date: Thu, 15 Oct 2020 22:30:34 +0200 Subject: [PATCH 35/46] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f9125797f..d496c5643f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project are documented in this file. - Added: disable comments that are reported as errors for various reasons are now reported as standard lint errors rather than a separate class of errors that must be handled specially ([#4973](https://github.com/stylelint/stylelint/pull/4973)). - Added: configured pattern in `*-pattern` rules violation message ([#4975](https://github.com/stylelint/stylelint/pull/4975)). +- Added: `comment-pattern` rule ([#4962](https://github.com/stylelint/stylelint/pull/4962)). - Deprecated: `StylelintStandaloneReturnValue.reportedDisables`, `.descriptionlessDisables`, `.needlessDisables`, and `.invalidScopeDisables`. `.reportedDisables` will always be empty and the other properties will always be undefined, since these errors now show up in `.results` instead ([#4973](https://github.com/stylelint/stylelint/pull/4973)). ## 13.7.2 From fd6e13ba491f7b876b174025ce908b17ee64a66c Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Fri, 16 Oct 2020 09:07:38 +0900 Subject: [PATCH 36/46] Fix `isStandardSyntaxDeclaration.test.js` that use callbacks (#4972) --- .../isStandardSyntaxDeclaration.test.js | 194 ++++++------------ 1 file changed, 66 insertions(+), 128 deletions(-) diff --git a/lib/utils/__tests__/isStandardSyntaxDeclaration.test.js b/lib/utils/__tests__/isStandardSyntaxDeclaration.test.js index c0a3fc5978..bfc969d712 100644 --- a/lib/utils/__tests__/isStandardSyntaxDeclaration.test.js +++ b/lib/utils/__tests__/isStandardSyntaxDeclaration.test.js @@ -1,241 +1,179 @@ 'use strict'; const isStandardSyntaxDeclaration = require('../isStandardSyntaxDeclaration'); -const less = require('postcss-less'); const postcss = require('postcss'); -const sass = require('postcss-sass'); -const scss = require('postcss-scss'); +const postcssLess = require('postcss-less'); +const postcssSass = require('postcss-sass'); +const postcssScss = require('postcss-scss'); describe('isStandardSyntaxDeclaration', () => { it('standard prop and value', () => { - decls('a { a: b }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(decl('a { a: b }'))).toBe(true); }); it('standard prop and scss var', () => { - decls('a { a: $b }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(decl('a { a: $b }'))).toBe(true); }); it('custom-property', () => { - decls('a { --custom-property: x }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(decl('a { --custom-property: x }'))).toBe(true); }); it('standard prop and calc value', () => { - decls('a { a : calc(b + c) }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(decl('a { a : calc(b + c) }'))).toBe(true); }); it('does not break @selector', () => { - decls('@page { size: A4 }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(decl('@page { size: A4 }'))).toBe(true); }); - it('custom property set in SASS paser', () => { - sassDecls('a\n\t--custom-property-set:\n\t\tcolor: blue', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + it('custom property set in SASS parser', () => { + expect( + isStandardSyntaxDeclaration(sassDecl('a\n\t--custom-property-set:\n\t\tcolor: blue')), + ).toBe(true); }); - it('custom property set in SCSS paser', () => { - scssDecls('a { --custom-property-set: { color: blue; } }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + it('custom property set in SCSS parser', () => { + expect( + isStandardSyntaxDeclaration(scssDecl('a { --custom-property-set: { color: blue; } }')), + ).toBe(true); }); - it('custom property set in LESS paser', () => { - lessDecls('a { --custom-property-set: { color: blue; } }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + it('custom property set in LESS parser', () => { + expect( + isStandardSyntaxDeclaration(lessDecl('a { --custom-property-set: { color: blue; } }')), + ).toBe(true); }); it('property with sass variable interpolation (only)', () => { - sassDecls('a\n\t#{$var}: 10px', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('a\n\t#{$var}: 10px'))).toBe(true); }); it('property with scss variable interpolation (only)', () => { - scssDecls('a { #{$var}: 10px; }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('a { #{$var}: 10px; }'))).toBe(true); }); it('property with sass variable interpolation (end)', () => { - sassDecls('a\n\tprop#{$var}: 10px', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('a\n\tprop#{$var}: 10px'))).toBe(true); }); it('property with scss variable interpolation (end)', () => { - scssDecls('a { prop#{$var}: 10px; }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('a { prop#{$var}: 10px; }'))).toBe(true); }); it('property with sass variable interpolation (middle)', () => { - sassDecls('a\n\tprop#{$var}erty: 10px', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('a\n\tprop#{$var}erty: 10px'))).toBe(true); }); it('property with scss variable interpolation (middle)', () => { - scssDecls('a { prop#{$var}erty: 10px; }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('a { prop#{$var}erty: 10px; }'))).toBe(true); }); it('property with less variable interpolation (only)', () => { - lessDecls('a { @{var}: 10px; }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(lessDecl('a { @{var}: 10px; }'))).toBe(true); }); it('property with less variable interpolation (end)', () => { - lessDecls('a { prop@{var}: 10px; }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(lessDecl('a { prop@{var}: 10px; }'))).toBe(true); }); it('property with less variable interpolation (middle)', () => { - lessDecls('a { prop@{var}erty: 10px; }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeTruthy(); - }); + expect(isStandardSyntaxDeclaration(lessDecl('a { prop@{var}erty: 10px; }'))).toBe(true); }); it('sass var', () => { - sassDecls('$var: b', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('$var: b'))).toBe(false); }); it('scss var', () => { - scssDecls('$var: b', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('$var: b'))).toBe(false); }); it('scss var within namespace', () => { - scssDecls('namespace.$var: b', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('namespace.$var: b'))).toBe(false); }); it('nested scss var within namespace', () => { - scssDecls('a { namespace.$var: b }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('a { namespace.$var: b }'))).toBe(false); }); it('sass list', () => { - sassDecls('$list: (key: value, key2: value2)', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('$list: (key: value, key2: value2)'))).toBe(false); }); it('scss list', () => { - scssDecls('$list: (key: value, key2: value2)', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('$list: (key: value, key2: value2)'))).toBe(false); }); it('sass map', () => { - sassDecls('$map: (value, value2)', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('$map: (value, value2)'))).toBe(false); }); it('scss map', () => { - scssDecls('$map: (value, value2)', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('$map: (value, value2)'))).toBe(false); }); it('nested sass var', () => { - sassDecls('a\n\t$var: b', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('a\n\t$var: b'))).toBe(false); }); it('nested scss var', () => { - scssDecls('a { $var: b }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('a { $var: b }'))).toBe(false); }); it('nested sass list', () => { - sassDecls('a\n\t$list: (key: value, key2: value2)', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('a\n\t$list: (key: value, key2: value2)'))).toBe( + false, + ); }); it('nested scss list', () => { - scssDecls('a { $list: (key: value, key2: value2) }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('a { $list: (key: value, key2: value2) }'))).toBe( + false, + ); }); it('sass nested property', () => { - sassDecls('a\n\tborder:\n\t\tstyle: solid\n\t\tcolor: red', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('a\n\tborder:\n\t\tstyle: solid'))).toBe(false); }); it('scss nested property', () => { - scssDecls('a { border: { style: solid; color: red; } }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('a { border: { style: solid; } }'))).toBe(false); }); it('nested sass map', () => { - sassDecls('a\n\t$map: (value, value2)', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(sassDecl('a\n\t$map: (value, value2)'))).toBe(false); }); it('nested scss map', () => { - scssDecls('a { $map: (value, value2) }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); - }); - - it('less var', () => { - lessDecls('@var: b', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); - }); - - it('nested less var', () => { - lessDecls('a { @var: b }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(scssDecl('a { $map: (value, value2) }'))).toBe(false); }); it('less &:extend', () => { - lessDecls('a { &:extend(b) }', (decl) => { - expect(isStandardSyntaxDeclaration(decl)).toBeFalsy(); - }); + expect(isStandardSyntaxDeclaration(lessDecl('a { &:extend(b) }'))).toBe(false); }); }); -function decls(css, cb) { - postcss.parse(css).walkDecls(cb); +function decl(css, parser = postcss) { + const list = []; + + parser.parse(css).walkDecls((d) => list.push(d)); + + if (list.length === 1) { + return list[0]; + } + + throw new Error(`Expected length 1, but ${list.length}`); } -function sassDecls(css, cb) { - sass.parse(css).walkDecls(cb); +function sassDecl(css) { + return decl(css, postcssSass); } -function scssDecls(css, cb) { - scss.parse(css).walkDecls(cb); +function scssDecl(css) { + return decl(css, postcssScss); } -function lessDecls(css, cb) { - less.parse(css).walkDecls(cb); +function lessDecl(css) { + return decl(css, postcssLess); } From 6ad94ac7253a01c31b69c1a183eeb9d4daa5f104 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Fri, 16 Oct 2020 21:21:18 +0900 Subject: [PATCH 37/46] Refactor formatter tests (#4988) * Refactor formatter tests I think that using `stripIndent()` or adding extra indent for the expected output of the formatters leads to inaccuracy and poor readability. So, this change removes needless indent from the expected output in `lib/formatters/__tests__/*.test.js`. * Use `.trimStart()` for readability --- .../__tests__/compactFormatter.test.js | 15 +- ...isableOptionsReportStringFormatter.test.js | 18 ++- .../__tests__/stringFormatter.test.js | 46 +++--- .../__tests__/unixFormatter.test.js | 30 ++-- .../__tests__/verboseFormatter.test.js | 136 +++++++++--------- 5 files changed, 126 insertions(+), 119 deletions(-) diff --git a/lib/formatters/__tests__/compactFormatter.test.js b/lib/formatters/__tests__/compactFormatter.test.js index e99cc9d80b..e8bb1521b8 100644 --- a/lib/formatters/__tests__/compactFormatter.test.js +++ b/lib/formatters/__tests__/compactFormatter.test.js @@ -2,7 +2,6 @@ const compactFormatter = require('../compactFormatter'); const prepareFormatterOutput = require('./prepareFormatterOutput'); -const stripIndent = require('common-tags').stripIndent; describe('compactFormatter', () => { let actualTTY; @@ -55,9 +54,7 @@ describe('compactFormatter', () => { const output = prepareFormatterOutput(results, compactFormatter); - expect(output).toBe(stripIndent` - path/to/file.css: line 1, col 1, error - Unexpected foo - `); + expect(output).toBe('path/to/file.css: line 1, col 1, error - Unexpected foo'); }); it('outputs warnings without stdout `TTY`', () => { @@ -83,9 +80,7 @@ describe('compactFormatter', () => { const output = prepareFormatterOutput(results, compactFormatter); - expect(output).toBe(stripIndent` - path/to/file.css: line 1, col 1, error - Unexpected foo - `); + expect(output).toBe('path/to/file.css: line 1, col 1, error - Unexpected foo'); }); it('output warnings with more than 80 characters and `process.stdout.columns` equal 90 characters', () => { @@ -114,9 +109,9 @@ describe('compactFormatter', () => { const output = prepareFormatterOutput(results, compactFormatter); - expect(output).toBe(stripIndent` - path/to/file.css: line 1, col 1, error - Unexpected very very very very very very very very very very very very very long foo - `); + expect(output).toBe( + 'path/to/file.css: line 1, col 1, error - Unexpected very very very very very very very very very very very very very long foo', + ); }); it('handles ignored file', () => { diff --git a/lib/formatters/__tests__/disableOptionsReportStringFormatter.test.js b/lib/formatters/__tests__/disableOptionsReportStringFormatter.test.js index 28f336e465..a55249e46c 100644 --- a/lib/formatters/__tests__/disableOptionsReportStringFormatter.test.js +++ b/lib/formatters/__tests__/disableOptionsReportStringFormatter.test.js @@ -2,7 +2,6 @@ const disableOptionsReportStringFormatterTest = require('../disableOptionsReportStringFormatter'); const stripAnsi = require('strip-ansi'); -const stripIndent = require('common-tags').stripIndent; describe('disableOptionsReportStringFormatter', () => { it('formatter stringified', () => { @@ -32,16 +31,15 @@ describe('disableOptionsReportStringFormatter', () => { ), ); - let expected = stripIndent` - foo - wrong disable: baz, start line: 1, end line: 3 - wrong disable: all, start line: 7 + const expected = ` +foo +wrong disable: baz, start line: 1, end line: 3 +wrong disable: all, start line: 7 - bar - wrong disable: all, start line: 19, end line: 33 - wrong disable: baz, start line: 99, end line: 102`; - - expected = `\n${expected}\n`; +bar +wrong disable: all, start line: 19, end line: 33 +wrong disable: baz, start line: 99, end line: 102 +`; expect(actual).toBe(expected); }); diff --git a/lib/formatters/__tests__/stringFormatter.test.js b/lib/formatters/__tests__/stringFormatter.test.js index dc28fa89f0..393b43ea19 100644 --- a/lib/formatters/__tests__/stringFormatter.test.js +++ b/lib/formatters/__tests__/stringFormatter.test.js @@ -2,7 +2,6 @@ const prepareFormatterOutput = require('./prepareFormatterOutput'); const stringFormatter = require('../stringFormatter'); -const stripIndent = require('common-tags').stripIndent; describe('stringFormatter', () => { let actualTTY; @@ -55,10 +54,11 @@ describe('stringFormatter', () => { const output = prepareFormatterOutput(results, stringFormatter); - expect(output).toBe(stripIndent` - path/to/file.css - 1:1 × Unexpected foo bar - `); + expect(output).toBe( + ` +path/to/file.css + 1:1 × Unexpected foo bar`.trimStart(), + ); }); it('outputs warnings without stdout `TTY`', () => { @@ -84,9 +84,11 @@ describe('stringFormatter', () => { const output = prepareFormatterOutput(results, stringFormatter); - expect(output).toBe(stripIndent` - path/to/file.css - 1:1 × Unexpected foo bar`); + expect(output).toBe( + ` +path/to/file.css + 1:1 × Unexpected foo bar`.trimStart(), + ); }); it('output warnings with more than 80 characters and `process.stdout.columns` equal 90 characters', () => { @@ -115,11 +117,12 @@ describe('stringFormatter', () => { const output = prepareFormatterOutput(results, stringFormatter); - expect(output).toBe(stripIndent` - path/to/file.css - 1:1 × Unexpected very very very very very very very bar-very-very-very-very-very-long - very very very very very very long foo - `); + expect(output).toBe( + ` +path/to/file.css + 1:1 × Unexpected very very very very very very very bar-very-very-very-very-very-long + very very very very very very long foo`.trimStart(), + ); }); it('condenses deprecations and invalid option warnings', () => { @@ -160,11 +163,12 @@ describe('stringFormatter', () => { const output = prepareFormatterOutput(results, stringFormatter); - expect(output).toBe(stripIndent` - Invalid Option: Unexpected option for baz + expect(output).toBe( + ` +Invalid Option: Unexpected option for baz - Deprecation Warning: Deprecated foo See: bar - `); +Deprecation Warning: Deprecated foo See: bar`.trimStart(), + ); }); it('handles ignored file', () => { @@ -204,8 +208,10 @@ describe('stringFormatter', () => { const output = prepareFormatterOutput(results, stringFormatter); - expect(output).toBe(stripIndent` - path/to/file.css - 1:1 × bar`); + expect(output).toBe( + ` +path/to/file.css + 1:1 × bar`.trimStart(), + ); }); }); diff --git a/lib/formatters/__tests__/unixFormatter.test.js b/lib/formatters/__tests__/unixFormatter.test.js index b07156a1e7..92e0ae3a1f 100644 --- a/lib/formatters/__tests__/unixFormatter.test.js +++ b/lib/formatters/__tests__/unixFormatter.test.js @@ -1,7 +1,6 @@ 'use strict'; const prepareFormatterOutput = require('./prepareFormatterOutput'); -const stripIndent = require('common-tags').stripIndent; const unixFormatter = require('../unixFormatter'); describe('unixFormatter', () => { @@ -62,12 +61,13 @@ describe('unixFormatter', () => { const output = prepareFormatterOutput(results, unixFormatter); - expect(output).toBe(stripIndent` - path/to/file.css:1:1: Unexpected foo [error] - path/to/file.css:10:1: Unexpected foo 2 [error] + expect(output).toBe( + ` +path/to/file.css:1:1: Unexpected foo [error] +path/to/file.css:10:1: Unexpected foo 2 [error] - 2 problems - `); +2 problems`.trimStart(), + ); }); it('outputs warnings without stdout `TTY`', () => { @@ -93,11 +93,12 @@ describe('unixFormatter', () => { const output = prepareFormatterOutput(results, unixFormatter); - expect(output).toBe(stripIndent` - path/to/file.css:1:1: Unexpected foo [error] + expect(output).toBe( + ` +path/to/file.css:1:1: Unexpected foo [error] - 1 problem - `); +1 problem`.trimStart(), + ); }); it('output warnings with more than 80 characters and `process.stdout.columns` equal 90 characters', () => { @@ -126,11 +127,12 @@ describe('unixFormatter', () => { const output = prepareFormatterOutput(results, unixFormatter); - expect(output).toBe(stripIndent` - path/to/file.css:1:1: Unexpected very very very very very very very very very very very very very long foo [error] + expect(output).toBe( + ` +path/to/file.css:1:1: Unexpected very very very very very very very very very very very very very long foo [error] - 1 problem - `); +1 problem`.trimStart(), + ); }); it('handles ignored file', () => { diff --git a/lib/formatters/__tests__/verboseFormatter.test.js b/lib/formatters/__tests__/verboseFormatter.test.js index 6a98b8c4b8..4d021cd032 100644 --- a/lib/formatters/__tests__/verboseFormatter.test.js +++ b/lib/formatters/__tests__/verboseFormatter.test.js @@ -1,7 +1,6 @@ 'use strict'; const prepareFormatterOutput = require('./prepareFormatterOutput'); -const stripIndent = require('common-tags').stripIndent; const verboseFormatter = require('../verboseFormatter'); describe('verboseFormatter', () => { @@ -18,12 +17,13 @@ describe('verboseFormatter', () => { const output = prepareFormatterOutput(results, verboseFormatter); - expect(output).toBe(stripIndent` - 1 source checked - path/to/file.css + expect(output).toBe( + ` +1 source checked + path/to/file.css - 0 problems found - `); +0 problems found`.trimStart(), + ); }); it("outputs one warnings (of severity 'error')", () => { @@ -47,17 +47,18 @@ describe('verboseFormatter', () => { const output = prepareFormatterOutput(results, verboseFormatter); - expect(output).toBe(stripIndent` - path/to/file.css - 1:2 × Unexpected foo bar + expect(output).toBe( + ` +path/to/file.css + 1:2 × Unexpected foo bar - 1 source checked - path/to/file.css +1 source checked + path/to/file.css - 1 problem found - severity level "error": 1 - bar: 1 - `); +1 problem found + severity level "error": 1 + bar: 1`.trimStart(), + ); }); it('outputs 0 stdout column', () => { @@ -85,17 +86,18 @@ describe('verboseFormatter', () => { const output = prepareFormatterOutput(results, verboseFormatter); - expect(output).toBe(stripIndent` - path/to/file.css - 1:2 × Unexpected foo bar + expect(output).toBe( + ` +path/to/file.css + 1:2 × Unexpected foo bar - 1 source checked - path/to/file.css +1 source checked + path/to/file.css - 1 problem found - severity level "error": 1 - bar: 1 - `); +1 problem found + severity level "error": 1 + bar: 1`.trimStart(), + ); process.stdout.columns = stdoutColumn; }); @@ -125,17 +127,18 @@ describe('verboseFormatter', () => { const output = prepareFormatterOutput(results, verboseFormatter); - expect(output).toBe(stripIndent` - path/to/file.css - 1:2 × Unexpected foo bar + expect(output).toBe( + ` +path/to/file.css + 1:2 × Unexpected foo bar - 1 source checked - path/to/file.css +1 source checked + path/to/file.css - 1 problem found - severity level "error": 1 - bar: 1 - `); +1 problem found + severity level "error": 1 + bar: 1`.trimStart(), + ); process.stdout.columns = stdoutColumn; }); @@ -183,24 +186,25 @@ describe('verboseFormatter', () => { const output = prepareFormatterOutput(results, verboseFormatter); - expect(output).toBe(stripIndent` - path/to/file.css - 1:2 × Unexpected foo bar - 2:3 × Unexpected foo bar - - file2.css - 3:1 ‼ Expected cat baz - - 2 sources checked - path/to/file.css - file2.css - - 3 problems found - severity level "error": 2 - bar: 2 - severity level "warning": 1 - baz: 1 - `); + expect(output).toBe( + ` +path/to/file.css + 1:2 × Unexpected foo bar + 2:3 × Unexpected foo bar + +file2.css + 3:1 ‼ Expected cat baz + +2 sources checked + path/to/file.css + file2.css + +3 problems found + severity level "error": 2 + bar: 2 + severity level "warning": 1 + baz: 1`.trimStart(), + ); }); it('outputs lineless syntax error', () => { @@ -222,17 +226,18 @@ describe('verboseFormatter', () => { const output = prepareFormatterOutput(results, verboseFormatter); - expect(output).toBe(stripIndent` - path/to/file.css - × Unexpected foo SyntaxError + expect(output).toBe( + ` +path/to/file.css + × Unexpected foo SyntaxError - 1 source checked - path/to/file.css +1 source checked + path/to/file.css - 1 problem found - severity level "error": 1 - SyntaxError: 1 - `); +1 problem found + severity level "error": 1 + SyntaxError: 1`.trimStart(), + ); }); it('outputs one ignored file', () => { @@ -248,11 +253,12 @@ describe('verboseFormatter', () => { const output = prepareFormatterOutput(results, verboseFormatter); - expect(output).toBe(stripIndent` - 0 of 1 source checked - file.css (ignored) + expect(output).toBe( + ` +0 of 1 source checked + file.css (ignored) - 0 problems found - `); +0 problems found`.trimStart(), + ); }); }); From 7a88e51cebc597baa8d3cd346ffc1691c8131b3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Oct 2020 13:40:39 +0000 Subject: [PATCH 38/46] Bump jest from 26.5.3 to 26.6.1 (#5008) Bumps [jest](https://github.com/facebook/jest) from 26.5.3 to 26.6.1. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/compare/v26.5.3...v26.6.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 1740 ++++++++++++++++++++++++++++++++++++++++++--- package.json | 2 +- 2 files changed, 1641 insertions(+), 101 deletions(-) diff --git a/package-lock.json b/package-lock.json index f4ceee5aba..b92e4a6b2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -403,34 +403,34 @@ } }, "@jest/core": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.5.3.tgz", - "integrity": "sha512-CiU0UKFF1V7KzYTVEtFbFmGLdb2g4aTtY0WlyUfLgj/RtoTnJFhh50xKKr7OYkdmBUlGFSa2mD1TU3UZ6OLd4g==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.1.tgz", + "integrity": "sha512-p4F0pgK3rKnoS9olXXXOkbus1Bsu6fd8pcvLMPsUy4CVXZ8WSeiwQ1lK5hwkCIqJ+amZOYPd778sbPha/S8Srw==", "dev": true, "requires": { - "@jest/console": "^26.5.2", - "@jest/reporters": "^26.5.3", - "@jest/test-result": "^26.5.2", - "@jest/transform": "^26.5.2", - "@jest/types": "^26.5.2", + "@jest/console": "^26.6.1", + "@jest/reporters": "^26.6.1", + "@jest/test-result": "^26.6.1", + "@jest/transform": "^26.6.1", + "@jest/types": "^26.6.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.5.2", - "jest-config": "^26.5.3", - "jest-haste-map": "^26.5.2", - "jest-message-util": "^26.5.2", + "jest-changed-files": "^26.6.1", + "jest-config": "^26.6.1", + "jest-haste-map": "^26.6.1", + "jest-message-util": "^26.6.1", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.5.2", - "jest-resolve-dependencies": "^26.5.3", - "jest-runner": "^26.5.3", - "jest-runtime": "^26.5.3", - "jest-snapshot": "^26.5.3", - "jest-util": "^26.5.2", - "jest-validate": "^26.5.3", - "jest-watcher": "^26.5.2", + "jest-resolve": "^26.6.1", + "jest-resolve-dependencies": "^26.6.1", + "jest-runner": "^26.6.1", + "jest-runtime": "^26.6.1", + "jest-snapshot": "^26.6.1", + "jest-util": "^26.6.1", + "jest-validate": "^26.6.1", + "jest-watcher": "^26.6.1", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "rimraf": "^3.0.0", @@ -438,6 +438,551 @@ "strip-ansi": "^6.0.0" }, "dependencies": { + "@jest/console": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.1.tgz", + "integrity": "sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.1", + "jest-util": "^26.6.1", + "slash": "^3.0.0" + } + }, + "@jest/environment": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.1.tgz", + "integrity": "sha512-GNvHwkOFJtNgSwdzH9flUPzF9AYAZhUg124CBoQcwcZCM9s5TLz8Y3fMtiaWt4ffbigoetjGk5PU2Dd8nLrSEw==", + "dev": true, + "requires": { + "@jest/fake-timers": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "jest-mock": "^26.6.1" + } + }, + "@jest/fake-timers": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.1.tgz", + "integrity": "sha512-T/SkMLgOquenw/nIisBRD6XAYpFir0kNuclYLkse5BpzeDUukyBr+K31xgAo9M0hgjU9ORlekAYPSzc0DKfmKg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@sinonjs/fake-timers": "^6.0.1", + "@types/node": "*", + "jest-message-util": "^26.6.1", + "jest-mock": "^26.6.1", + "jest-util": "^26.6.1" + } + }, + "@jest/globals": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.1.tgz", + "integrity": "sha512-acxXsSguuLV/CeMYmBseefw6apO7NuXqpE+v5r3yD9ye2PY7h1nS20vY7Obk2w6S7eJO4OIAJeDnoGcLC/McEQ==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.1", + "@jest/types": "^26.6.1", + "expect": "^26.6.1" + } + }, + "@jest/test-result": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.1.tgz", + "integrity": "sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.1.tgz", + "integrity": "sha512-0csqA/XApZiNeTIPYh6koIDCACSoR6hi29T61tKJMtCZdEC+tF3PoNt7MS0oK/zKC6daBgCbqXxia5ztr/NyCQ==", + "dev": true, + "requires": { + "@jest/test-result": "^26.6.1", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.1", + "jest-runner": "^26.6.1", + "jest-runtime": "^26.6.1" + } + }, + "@jest/transform": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.1.tgz", + "integrity": "sha512-oNFAqVtqRxZRx6vXL3I4bPKUK0BIlEeaalkwxyQGGI8oXDQBtYQBpiMe5F7qPs4QdvvFYB42gPGIMMcxXaBBxQ==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^26.6.1", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.1", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.6.1", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + } + }, + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "babel-jest": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.1.tgz", + "integrity": "sha512-duMWEOKrSBYRVTTNpL2SipNIWnZOjP77auOBMPQ3zXAdnDbyZQWU8r/RxNWpUf9N6cgPFecQYelYLytTVXVDtA==", + "dev": true, + "requires": { + "@jest/transform": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^26.5.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + } + }, + "camelcase": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.1.0.tgz", + "integrity": "sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ==", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "expect": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.1.tgz", + "integrity": "sha512-BRfxIBHagghMmr1D2MRY0Qv5d3Nc8HCqgbDwNXw/9izmM5eBb42a2YjLKSbsqle76ozGkAEPELQX4IdNHAKRNA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "ansi-styles": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-regex-util": "^26.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-config": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.1.tgz", + "integrity": "sha512-mtJzIynIwW1d1nMlKCNCQiSgWaqFn8cH/fOSNY97xG7Y9tBCZbCSuW2GTX0RPmceSJGO7l27JgwC18LEg0Vg+g==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^26.6.1", + "@jest/types": "^26.6.1", + "babel-jest": "^26.6.1", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.4", + "jest-environment-jsdom": "^26.6.1", + "jest-environment-node": "^26.6.1", + "jest-get-type": "^26.3.0", + "jest-jasmine2": "^26.6.1", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.1", + "jest-util": "^26.6.1", + "jest-validate": "^26.6.1", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.1" + } + }, + "jest-diff": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.1.tgz", + "integrity": "sha512-BBNy/zin2m4kG5In126O8chOBxLLS/XMTuuM2+YhgyHk87ewPzKTuTJcqj3lOWOi03NNgrl+DkMeV/exdvG9gg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^26.5.0", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.1" + } + }, + "jest-each": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.1.tgz", + "integrity": "sha512-gSn8eB3buchuq45SU7pLB7qmCGax1ZSxfaWuEFblCyNMtyokYaKFh9dRhYPujK6xYL57dLIPhLKatjmB5XWzGA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-util": "^26.6.1", + "pretty-format": "^26.6.1" + } + }, + "jest-environment-jsdom": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.1.tgz", + "integrity": "sha512-A17RiXuHYNVlkM+3QNcQ6n5EZyAc6eld8ra9TW26luounGWpku4tj03uqRgHJCI1d4uHr5rJiuCH5JFRtdmrcA==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.1", + "@jest/fake-timers": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "jest-mock": "^26.6.1", + "jest-util": "^26.6.1", + "jsdom": "^16.4.0" + } + }, + "jest-environment-node": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.1.tgz", + "integrity": "sha512-YffaCp6h0j1kbcf1NVZ7umC6CPgD67YS+G1BeornfuSkx5s3xdhuwG0DCxSiHPXyT81FfJzA1L7nXvhq50OWIg==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.1", + "@jest/fake-timers": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "jest-mock": "^26.6.1", + "jest-util": "^26.6.1" + } + }, + "jest-haste-map": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.1.tgz", + "integrity": "sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.5.0", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" + } + }, + "jest-jasmine2": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.1.tgz", + "integrity": "sha512-2uYdT32o/ZzSxYAPduAgokO8OlAL1YdG/9oxcEY138EDNpIK5XRRJDaGzTZdIBWSxk0aR8XxN44FvfXtHB+Fiw==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^26.6.1", + "@jest/source-map": "^26.5.0", + "@jest/test-result": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^26.6.1", + "is-generator-fn": "^2.0.0", + "jest-each": "^26.6.1", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-runtime": "^26.6.1", + "jest-snapshot": "^26.6.1", + "jest-util": "^26.6.1", + "pretty-format": "^26.6.1", + "throat": "^5.0.0" + } + }, + "jest-leak-detector": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.1.tgz", + "integrity": "sha512-j9ZOtJSJKlHjrs4aIxWjiQUjyrffPdiAQn2Iw0916w7qZE5Lk0T2KhIH6E9vfhzP6sw0Q0jtnLLb4vQ71o1HlA==", + "dev": true, + "requires": { + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.1" + } + }, + "jest-matcher-utils": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.1.tgz", + "integrity": "sha512-9iu3zrsYlUnl8pByhREF9rr5eYoiEb1F7ymNKg6lJr/0qD37LWS5FSW/JcoDl8UdMX2+zAzabDs7sTO+QFKjCg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^26.6.1", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.1" + } + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-mock": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.1.tgz", + "integrity": "sha512-my0lPTBu1awY8iVG62sB2sx9qf8zxNDVX+5aFgoB8Vbqjb6LqIOsfyFA8P1z6H2IsqMbvOX9oCJnK67Y3yUIMA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*" + } + }, + "jest-resolve": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.1.tgz", + "integrity": "sha512-hiHfQH6rrcpAmw9xCQ0vD66SDuU+7ZulOuKwc4jpbmFFsz0bQG/Ib92K+9/489u5rVw0btr/ZhiHqBpmkbCvuQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.1", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" + } + }, + "jest-runner": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.1.tgz", + "integrity": "sha512-DmpNGdgsbl5s0FGkmsInmqnmqCtliCSnjWA2TFAJS1m1mL5atwfPsf+uoZ8uYQ2X0uDj4NM+nPcDnUpbNTRMBA==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/environment": "^26.6.1", + "@jest/test-result": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.7.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.1", + "jest-docblock": "^26.0.0", + "jest-haste-map": "^26.6.1", + "jest-leak-detector": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-resolve": "^26.6.1", + "jest-runtime": "^26.6.1", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", + "source-map-support": "^0.5.6", + "throat": "^5.0.0" + } + }, + "jest-runtime": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.1.tgz", + "integrity": "sha512-7uOCNeezXDWgjEyzYbRN2ViY7xNZzusNVGAMmU0UHRUNXuY4j4GBHKGMqPo/cBPZA9bSYp+lwK2DRRBU5Dv6YQ==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/environment": "^26.6.1", + "@jest/fake-timers": "^26.6.1", + "@jest/globals": "^26.6.1", + "@jest/source-map": "^26.5.0", + "@jest/test-result": "^26.6.1", + "@jest/transform": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^0.4.2", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.1", + "jest-haste-map": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-mock": "^26.6.1", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.1", + "jest-snapshot": "^26.6.1", + "jest-util": "^26.6.1", + "jest-validate": "^26.6.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^15.4.1" + } + }, + "jest-snapshot": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.1.tgz", + "integrity": "sha512-JA7bZp7HRTIJYAi85pJ/OZ2eur2dqmwIToA5/6d7Mn90isGEfeF9FvuhDLLEczgKP1ihreBzrJ6Vr7zteP5JNA==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.0.0", + "chalk": "^4.0.0", + "expect": "^26.6.1", + "graceful-fs": "^4.2.4", + "jest-diff": "^26.6.1", + "jest-get-type": "^26.3.0", + "jest-haste-map": "^26.6.1", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-resolve": "^26.6.1", + "natural-compare": "^1.4.0", + "pretty-format": "^26.6.1", + "semver": "^7.3.2" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + }, + "jest-validate": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.1.tgz", + "integrity": "sha512-BEFpGbylKocnNPZULcnk+TGaz1oFZQH/wcaXlaXABbu0zBwkOGczuWgdLucUouuQqn7VadHZZeTvo8VSFDLMOA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "camelcase": "^6.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "leven": "^3.1.0", + "pretty-format": "^26.6.1" + } + }, + "jest-watcher": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.1.tgz", + "integrity": "sha512-0LBIPPncNi9CaLKK15bnxyd2E8OMl4kJg0PTiNOI+MXztXw1zVdtX/x9Pr6pXaQYps+eS/ts43O4+HByZ7yJSw==", + "dev": true, + "requires": { + "@jest/test-result": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^26.6.1", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz", + "integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "pretty-format": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.1.tgz", + "integrity": "sha512-MeqqsP5PYcRBbGMvwzsyBdmAJ4EFX7pWFyl7x4+dMVg5pE0ZDdBIvEH2ergvIO+Gvwv1wh64YuOY9y5LuyY/GA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + } + }, + "react-is": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", + "dev": true + }, + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "dev": true, + "requires": { + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" + } + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -446,6 +991,27 @@ "requires": { "glob": "^7.1.3" } + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -487,16 +1053,16 @@ } }, "@jest/reporters": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.5.3.tgz", - "integrity": "sha512-X+vR0CpfMQzYcYmMFKNY9n4jklcb14Kffffp7+H/MqitWnb0440bW2L76NGWKAa+bnXhNoZr+lCVtdtPmfJVOQ==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.1.tgz", + "integrity": "sha512-J6OlXVFY3q1SXWJhjme5i7qT/BAZSikdOK2t8Ht5OS32BDo6KfG5CzIzzIFnAVd82/WWbc9Hb7SJ/jwSvVH9YA==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.5.2", - "@jest/test-result": "^26.5.2", - "@jest/transform": "^26.5.2", - "@jest/types": "^26.5.2", + "@jest/console": "^26.6.1", + "@jest/test-result": "^26.6.1", + "@jest/transform": "^26.6.1", + "@jest/types": "^26.6.1", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", @@ -507,10 +1073,10 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.5.2", - "jest-resolve": "^26.5.2", - "jest-util": "^26.5.2", - "jest-worker": "^26.5.0", + "jest-haste-map": "^26.6.1", + "jest-resolve": "^26.6.1", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", "node-notifier": "^8.0.0", "slash": "^3.0.0", "source-map": "^0.6.0", @@ -519,11 +1085,177 @@ "v8-to-istanbul": "^6.0.1" }, "dependencies": { + "@jest/console": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.1.tgz", + "integrity": "sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.1", + "jest-util": "^26.6.1", + "slash": "^3.0.0" + } + }, + "@jest/test-result": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.1.tgz", + "integrity": "sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/transform": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.1.tgz", + "integrity": "sha512-oNFAqVtqRxZRx6vXL3I4bPKUK0BIlEeaalkwxyQGGI8oXDQBtYQBpiMe5F7qPs4QdvvFYB42gPGIMMcxXaBBxQ==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^26.6.1", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.1", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.6.1", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + } + }, + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-haste-map": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.1.tgz", + "integrity": "sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.5.0", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" + } + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-resolve": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.1.tgz", + "integrity": "sha512-hiHfQH6rrcpAmw9xCQ0vD66SDuU+7ZulOuKwc4jpbmFFsz0bQG/Ib92K+9/489u5rVw0btr/ZhiHqBpmkbCvuQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.1", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + }, + "jest-worker": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz", + "integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "dev": true, + "requires": { + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -1838,6 +2570,12 @@ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, + "cjs-module-lexer": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.4.3.tgz", + "integrity": "sha512-5RLK0Qfs0PNDpEyBXIr3bIT1Muw3ojSlvpw6dAmkUcO0+uTrsBn7GuEIgx40u+OzbCBLDta7nvmud85P4EmTsQ==", + "dev": true + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -4210,6 +4948,15 @@ "ci-info": "^2.0.0" } }, + "is-core-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.0.0.tgz", + "integrity": "sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -4559,91 +5306,655 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.1.tgz", + "integrity": "sha512-f+ahfqw3Ffy+9vA7sWFGpTmhtKEMsNAZiWBVXDkrpIO73zIz22iimjirnV78kh/eWlylmvLh/0WxHN6fZraZdA==", + "dev": true, + "requires": { + "@jest/core": "^26.6.1", + "import-local": "^3.0.2", + "jest-cli": "^26.6.1" + }, + "dependencies": { + "@jest/console": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.1.tgz", + "integrity": "sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.1", + "jest-util": "^26.6.1", + "slash": "^3.0.0" + } + }, + "@jest/environment": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.1.tgz", + "integrity": "sha512-GNvHwkOFJtNgSwdzH9flUPzF9AYAZhUg124CBoQcwcZCM9s5TLz8Y3fMtiaWt4ffbigoetjGk5PU2Dd8nLrSEw==", + "dev": true, + "requires": { + "@jest/fake-timers": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "jest-mock": "^26.6.1" + } + }, + "@jest/fake-timers": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.1.tgz", + "integrity": "sha512-T/SkMLgOquenw/nIisBRD6XAYpFir0kNuclYLkse5BpzeDUukyBr+K31xgAo9M0hgjU9ORlekAYPSzc0DKfmKg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@sinonjs/fake-timers": "^6.0.1", + "@types/node": "*", + "jest-message-util": "^26.6.1", + "jest-mock": "^26.6.1", + "jest-util": "^26.6.1" + } + }, + "@jest/globals": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.1.tgz", + "integrity": "sha512-acxXsSguuLV/CeMYmBseefw6apO7NuXqpE+v5r3yD9ye2PY7h1nS20vY7Obk2w6S7eJO4OIAJeDnoGcLC/McEQ==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.1", + "@jest/types": "^26.6.1", + "expect": "^26.6.1" + } + }, + "@jest/test-result": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.1.tgz", + "integrity": "sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.1.tgz", + "integrity": "sha512-0csqA/XApZiNeTIPYh6koIDCACSoR6hi29T61tKJMtCZdEC+tF3PoNt7MS0oK/zKC6daBgCbqXxia5ztr/NyCQ==", + "dev": true, + "requires": { + "@jest/test-result": "^26.6.1", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.1", + "jest-runner": "^26.6.1", + "jest-runtime": "^26.6.1" + } + }, + "@jest/transform": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.1.tgz", + "integrity": "sha512-oNFAqVtqRxZRx6vXL3I4bPKUK0BIlEeaalkwxyQGGI8oXDQBtYQBpiMe5F7qPs4QdvvFYB42gPGIMMcxXaBBxQ==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^26.6.1", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.1", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.6.1", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + } + }, + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "babel-jest": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.1.tgz", + "integrity": "sha512-duMWEOKrSBYRVTTNpL2SipNIWnZOjP77auOBMPQ3zXAdnDbyZQWU8r/RxNWpUf9N6cgPFecQYelYLytTVXVDtA==", + "dev": true, + "requires": { + "@jest/transform": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^26.5.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + } + }, + "camelcase": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.1.0.tgz", + "integrity": "sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ==", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "expect": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.1.tgz", + "integrity": "sha512-BRfxIBHagghMmr1D2MRY0Qv5d3Nc8HCqgbDwNXw/9izmM5eBb42a2YjLKSbsqle76ozGkAEPELQX4IdNHAKRNA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "ansi-styles": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-regex-util": "^26.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-cli": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.1.tgz", + "integrity": "sha512-aPLoEjlwFrCWhiPpW5NUxQA1X1kWsAnQcQ0SO/fHsCvczL3W75iVAcH9kP6NN+BNqZcHNEvkhxT5cDmBfEAh+w==", + "dev": true, + "requires": { + "@jest/core": "^26.6.1", + "@jest/test-result": "^26.6.1", + "@jest/types": "^26.6.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "import-local": "^3.0.2", + "is-ci": "^2.0.0", + "jest-config": "^26.6.1", + "jest-util": "^26.6.1", + "jest-validate": "^26.6.1", + "prompts": "^2.0.1", + "yargs": "^15.4.1" + } + }, + "jest-config": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.1.tgz", + "integrity": "sha512-mtJzIynIwW1d1nMlKCNCQiSgWaqFn8cH/fOSNY97xG7Y9tBCZbCSuW2GTX0RPmceSJGO7l27JgwC18LEg0Vg+g==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^26.6.1", + "@jest/types": "^26.6.1", + "babel-jest": "^26.6.1", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.4", + "jest-environment-jsdom": "^26.6.1", + "jest-environment-node": "^26.6.1", + "jest-get-type": "^26.3.0", + "jest-jasmine2": "^26.6.1", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.1", + "jest-util": "^26.6.1", + "jest-validate": "^26.6.1", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.1" + } + }, + "jest-diff": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.1.tgz", + "integrity": "sha512-BBNy/zin2m4kG5In126O8chOBxLLS/XMTuuM2+YhgyHk87ewPzKTuTJcqj3lOWOi03NNgrl+DkMeV/exdvG9gg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^26.5.0", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.1" + } + }, + "jest-each": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.1.tgz", + "integrity": "sha512-gSn8eB3buchuq45SU7pLB7qmCGax1ZSxfaWuEFblCyNMtyokYaKFh9dRhYPujK6xYL57dLIPhLKatjmB5XWzGA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-util": "^26.6.1", + "pretty-format": "^26.6.1" + } + }, + "jest-environment-jsdom": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.1.tgz", + "integrity": "sha512-A17RiXuHYNVlkM+3QNcQ6n5EZyAc6eld8ra9TW26luounGWpku4tj03uqRgHJCI1d4uHr5rJiuCH5JFRtdmrcA==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.1", + "@jest/fake-timers": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "jest-mock": "^26.6.1", + "jest-util": "^26.6.1", + "jsdom": "^16.4.0" + } + }, + "jest-environment-node": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.1.tgz", + "integrity": "sha512-YffaCp6h0j1kbcf1NVZ7umC6CPgD67YS+G1BeornfuSkx5s3xdhuwG0DCxSiHPXyT81FfJzA1L7nXvhq50OWIg==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.1", + "@jest/fake-timers": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "jest-mock": "^26.6.1", + "jest-util": "^26.6.1" + } + }, + "jest-haste-map": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.1.tgz", + "integrity": "sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.5.0", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" + } + }, + "jest-jasmine2": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.1.tgz", + "integrity": "sha512-2uYdT32o/ZzSxYAPduAgokO8OlAL1YdG/9oxcEY138EDNpIK5XRRJDaGzTZdIBWSxk0aR8XxN44FvfXtHB+Fiw==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^26.6.1", + "@jest/source-map": "^26.5.0", + "@jest/test-result": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^26.6.1", + "is-generator-fn": "^2.0.0", + "jest-each": "^26.6.1", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-runtime": "^26.6.1", + "jest-snapshot": "^26.6.1", + "jest-util": "^26.6.1", + "pretty-format": "^26.6.1", + "throat": "^5.0.0" + } + }, + "jest-leak-detector": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.1.tgz", + "integrity": "sha512-j9ZOtJSJKlHjrs4aIxWjiQUjyrffPdiAQn2Iw0916w7qZE5Lk0T2KhIH6E9vfhzP6sw0Q0jtnLLb4vQ71o1HlA==", + "dev": true, + "requires": { + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.1" + } + }, + "jest-matcher-utils": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.1.tgz", + "integrity": "sha512-9iu3zrsYlUnl8pByhREF9rr5eYoiEb1F7ymNKg6lJr/0qD37LWS5FSW/JcoDl8UdMX2+zAzabDs7sTO+QFKjCg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^26.6.1", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.1" + } + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-mock": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.1.tgz", + "integrity": "sha512-my0lPTBu1awY8iVG62sB2sx9qf8zxNDVX+5aFgoB8Vbqjb6LqIOsfyFA8P1z6H2IsqMbvOX9oCJnK67Y3yUIMA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*" + } + }, + "jest-resolve": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.1.tgz", + "integrity": "sha512-hiHfQH6rrcpAmw9xCQ0vD66SDuU+7ZulOuKwc4jpbmFFsz0bQG/Ib92K+9/489u5rVw0btr/ZhiHqBpmkbCvuQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.1", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" + } + }, + "jest-runner": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.1.tgz", + "integrity": "sha512-DmpNGdgsbl5s0FGkmsInmqnmqCtliCSnjWA2TFAJS1m1mL5atwfPsf+uoZ8uYQ2X0uDj4NM+nPcDnUpbNTRMBA==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/environment": "^26.6.1", + "@jest/test-result": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.7.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.1", + "jest-docblock": "^26.0.0", + "jest-haste-map": "^26.6.1", + "jest-leak-detector": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-resolve": "^26.6.1", + "jest-runtime": "^26.6.1", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", + "source-map-support": "^0.5.6", + "throat": "^5.0.0" + } + }, + "jest-runtime": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.1.tgz", + "integrity": "sha512-7uOCNeezXDWgjEyzYbRN2ViY7xNZzusNVGAMmU0UHRUNXuY4j4GBHKGMqPo/cBPZA9bSYp+lwK2DRRBU5Dv6YQ==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/environment": "^26.6.1", + "@jest/fake-timers": "^26.6.1", + "@jest/globals": "^26.6.1", + "@jest/source-map": "^26.5.0", + "@jest/test-result": "^26.6.1", + "@jest/transform": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^0.4.2", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.1", + "jest-haste-map": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-mock": "^26.6.1", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.1", + "jest-snapshot": "^26.6.1", + "jest-util": "^26.6.1", + "jest-validate": "^26.6.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^15.4.1" + } + }, + "jest-snapshot": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.1.tgz", + "integrity": "sha512-JA7bZp7HRTIJYAi85pJ/OZ2eur2dqmwIToA5/6d7Mn90isGEfeF9FvuhDLLEczgKP1ihreBzrJ6Vr7zteP5JNA==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.0.0", + "chalk": "^4.0.0", + "expect": "^26.6.1", + "graceful-fs": "^4.2.4", + "jest-diff": "^26.6.1", + "jest-get-type": "^26.3.0", + "jest-haste-map": "^26.6.1", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-resolve": "^26.6.1", + "natural-compare": "^1.4.0", + "pretty-format": "^26.6.1", + "semver": "^7.3.2" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + }, + "jest-validate": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.1.tgz", + "integrity": "sha512-BEFpGbylKocnNPZULcnk+TGaz1oFZQH/wcaXlaXABbu0zBwkOGczuWgdLucUouuQqn7VadHZZeTvo8VSFDLMOA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "camelcase": "^6.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "leven": "^3.1.0", + "pretty-format": "^26.6.1" + } + }, + "jest-worker": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz", + "integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "pretty-format": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.1.tgz", + "integrity": "sha512-MeqqsP5PYcRBbGMvwzsyBdmAJ4EFX7pWFyl7x4+dMVg5pE0ZDdBIvEH2ergvIO+Gvwv1wh64YuOY9y5LuyY/GA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + } + }, + "react-is": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", + "dev": true + }, + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", "dev": true, "requires": { - "has-flag": "^4.0.0" + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" } - } - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "dependencies": { + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - } - } - }, - "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "jest": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-26.5.3.tgz", - "integrity": "sha512-uJi3FuVSLmkZrWvaDyaVTZGLL8WcfynbRnFXyAHuEtYiSZ+ijDDIMOw1ytmftK+y/+OdAtsG9QrtbF7WIBmOyA==", - "dev": true, - "requires": { - "@jest/core": "^26.5.3", - "import-local": "^3.0.2", - "jest-cli": "^26.5.3" - }, - "dependencies": { - "jest-cli": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.5.3.tgz", - "integrity": "sha512-HkbSvtugpSXBf2660v9FrNVUgxvPkssN8CRGj9gPM8PLhnaa6zziFiCEKQAkQS4uRzseww45o0TR+l6KeRYV9A==", + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "@jest/core": "^26.5.3", - "@jest/test-result": "^26.5.2", - "@jest/types": "^26.5.2", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "import-local": "^3.0.2", - "is-ci": "^2.0.0", - "jest-config": "^26.5.3", - "jest-util": "^26.5.2", - "jest-validate": "^26.5.3", - "prompts": "^2.0.1", - "yargs": "^15.4.1" + "has-flag": "^4.0.0" } } } }, "jest-changed-files": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.5.2.tgz", - "integrity": "sha512-qSmssmiIdvM5BWVtyK/nqVpN3spR5YyvkvPqz1x3BR1bwIxsWmU/MGwLoCrPNLbkG2ASAKfvmJpOduEApBPh2w==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.1.tgz", + "integrity": "sha512-NhSdZ5F6b/rIN5V46x1l31vrmukD/bJUXgYAY8VtP1SknYdJwjYDRxuLt7Z8QryIdqCjMIn2C0Cd98EZ4umo8Q==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "execa": "^4.0.0", "throat": "^5.0.0" }, "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, "execa": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", @@ -4949,14 +6260,243 @@ } }, "jest-resolve-dependencies": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.5.3.tgz", - "integrity": "sha512-+KMDeke/BFK+mIQ2IYSyBz010h7zQaVt4Xie6cLqUGChorx66vVeQVv4ErNoMwInnyYHi1Ud73tDS01UbXbfLQ==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.1.tgz", + "integrity": "sha512-MN6lufbZJ3RBfTnJesZtHu3hUCBqPdHRe2+FhIt0yiqJ3fMgzWRqMRQyN/d/QwOE7KXwAG2ekZutbPhuD7s51A==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "jest-regex-util": "^26.0.0", - "jest-snapshot": "^26.5.3" + "jest-snapshot": "^26.6.1" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "expect": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.1.tgz", + "integrity": "sha512-BRfxIBHagghMmr1D2MRY0Qv5d3Nc8HCqgbDwNXw/9izmM5eBb42a2YjLKSbsqle76ozGkAEPELQX4IdNHAKRNA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "ansi-styles": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-regex-util": "^26.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-diff": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.1.tgz", + "integrity": "sha512-BBNy/zin2m4kG5In126O8chOBxLLS/XMTuuM2+YhgyHk87ewPzKTuTJcqj3lOWOi03NNgrl+DkMeV/exdvG9gg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^26.5.0", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.1" + } + }, + "jest-haste-map": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.1.tgz", + "integrity": "sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.5.0", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" + } + }, + "jest-matcher-utils": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.1.tgz", + "integrity": "sha512-9iu3zrsYlUnl8pByhREF9rr5eYoiEb1F7ymNKg6lJr/0qD37LWS5FSW/JcoDl8UdMX2+zAzabDs7sTO+QFKjCg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^26.6.1", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.1" + } + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-resolve": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.1.tgz", + "integrity": "sha512-hiHfQH6rrcpAmw9xCQ0vD66SDuU+7ZulOuKwc4jpbmFFsz0bQG/Ib92K+9/489u5rVw0btr/ZhiHqBpmkbCvuQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.1", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" + } + }, + "jest-snapshot": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.1.tgz", + "integrity": "sha512-JA7bZp7HRTIJYAi85pJ/OZ2eur2dqmwIToA5/6d7Mn90isGEfeF9FvuhDLLEczgKP1ihreBzrJ6Vr7zteP5JNA==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.0.0", + "chalk": "^4.0.0", + "expect": "^26.6.1", + "graceful-fs": "^4.2.4", + "jest-diff": "^26.6.1", + "jest-get-type": "^26.3.0", + "jest-haste-map": "^26.6.1", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-resolve": "^26.6.1", + "natural-compare": "^1.4.0", + "pretty-format": "^26.6.1", + "semver": "^7.3.2" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + }, + "jest-worker": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz", + "integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "pretty-format": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.1.tgz", + "integrity": "sha512-MeqqsP5PYcRBbGMvwzsyBdmAJ4EFX7pWFyl7x4+dMVg5pE0ZDdBIvEH2ergvIO+Gvwv1wh64YuOY9y5LuyY/GA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + } + }, + "react-is": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", + "dev": true + }, + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "dev": true, + "requires": { + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" + } + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "jest-runner": { diff --git a/package.json b/package.json index b15d2b7a88..1f7538f7e4 100644 --- a/package.json +++ b/package.json @@ -184,7 +184,7 @@ "eslint-config-stylelint": "^13.0.0", "got": "^11.7.0", "husky": "^4.3.0", - "jest": "^26.5.3", + "jest": "^26.6.1", "jest-circus": "^26.5.3", "jest-preset-stylelint": "^3.0.0", "jest-watch-typeahead": "^0.6.1", From 42f2e4d9ae7c5cdb60ff7ca382200c074c58979a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 31 Oct 2020 15:53:47 +0000 Subject: [PATCH 39/46] Bump got from 11.7.0 to 11.8.0 (#5007) Bumps [got](https://github.com/sindresorhus/got) from 11.7.0 to 11.8.0. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v11.7.0...v11.8.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index b92e4a6b2f..853d4b56c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1388,9 +1388,9 @@ } }, "@sindresorhus/is": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-3.1.2.tgz", - "integrity": "sha512-JiX9vxoKMmu8Y3Zr2RVathBL1Cdu4Nt4MuNWemt1Nc06A0RAin9c5FArkhGsyMBWfCu4zj+9b+GxtjAnE4qqLQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.0.tgz", + "integrity": "sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ==", "dev": true }, "@sinonjs/commons": { @@ -4357,12 +4357,12 @@ } }, "got": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/got/-/got-11.7.0.tgz", - "integrity": "sha512-7en2XwH2MEqOsrK0xaKhbWibBoZqy+f1RSUoIeF1BLcnf+pyQdDsljWMfmOh+QKJwuvDIiKx38GtPh5wFdGGjg==", + "version": "11.8.0", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.0.tgz", + "integrity": "sha512-k9noyoIIY9EejuhaBNLyZ31D5328LeqnyPNXJQb2XlJZcKakLqN5m6O/ikhq/0lw56kUYS54fVm+D1x57YC9oQ==", "dev": true, "requires": { - "@sindresorhus/is": "^3.1.1", + "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", diff --git a/package.json b/package.json index 1f7538f7e4..243027b003 100644 --- a/package.json +++ b/package.json @@ -182,7 +182,7 @@ "del": "^6.0.0", "eslint": "^7.11.0", "eslint-config-stylelint": "^13.0.0", - "got": "^11.7.0", + "got": "^11.8.0", "husky": "^4.3.0", "jest": "^26.6.1", "jest-circus": "^26.5.3", From 2cddb6e17511191ed527cbf8e9db0dce18edee85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 12:33:29 +0000 Subject: [PATCH 40/46] Bump jest-circus from 26.5.3 to 26.6.1 (#5009) Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 26.5.3 to 26.6.1. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v26.6.1/packages/jest-circus) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 1152 +++++++++++++++++++++++++++++++++++++-------- package.json | 2 +- 2 files changed, 953 insertions(+), 201 deletions(-) diff --git a/package-lock.json b/package-lock.json index 853d4b56c6..5c5d4aba2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1016,40 +1016,115 @@ } }, "@jest/environment": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.5.2.tgz", - "integrity": "sha512-YjhCD/Zhkz0/1vdlS/QN6QmuUdDkpgBdK4SdiVg4Y19e29g4VQYN5Xg8+YuHjdoWGY7wJHMxc79uDTeTOy9Ngw==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.1.tgz", + "integrity": "sha512-GNvHwkOFJtNgSwdzH9flUPzF9AYAZhUg124CBoQcwcZCM9s5TLz8Y3fMtiaWt4ffbigoetjGk5PU2Dd8nLrSEw==", "dev": true, "requires": { - "@jest/fake-timers": "^26.5.2", - "@jest/types": "^26.5.2", + "@jest/fake-timers": "^26.6.1", + "@jest/types": "^26.6.1", "@types/node": "*", - "jest-mock": "^26.5.2" + "jest-mock": "^26.6.1" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + } } }, "@jest/fake-timers": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.5.2.tgz", - "integrity": "sha512-09Hn5Oraqt36V1akxQeWMVL0fR9c6PnEhpgLaYvREXZJAh2H2Y+QLCsl0g7uMoJeoWJAuz4tozk1prbR1Fc1sw==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.1.tgz", + "integrity": "sha512-T/SkMLgOquenw/nIisBRD6XAYpFir0kNuclYLkse5BpzeDUukyBr+K31xgAo9M0hgjU9ORlekAYPSzc0DKfmKg==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "@sinonjs/fake-timers": "^6.0.1", "@types/node": "*", - "jest-message-util": "^26.5.2", - "jest-mock": "^26.5.2", - "jest-util": "^26.5.2" + "jest-message-util": "^26.6.1", + "jest-mock": "^26.6.1", + "jest-util": "^26.6.1" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + } } }, "@jest/globals": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.5.3.tgz", - "integrity": "sha512-7QztI0JC2CuB+Wx1VdnOUNeIGm8+PIaqngYsZXQCkH2QV0GFqzAYc9BZfU0nuqA6cbYrWh5wkuMzyii3P7deug==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.1.tgz", + "integrity": "sha512-acxXsSguuLV/CeMYmBseefw6apO7NuXqpE+v5r3yD9ye2PY7h1nS20vY7Obk2w6S7eJO4OIAJeDnoGcLC/McEQ==", "dev": true, "requires": { - "@jest/environment": "^26.5.2", - "@jest/types": "^26.5.2", - "expect": "^26.5.3" + "@jest/environment": "^26.6.1", + "@jest/types": "^26.6.1", + "expect": "^26.6.1" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + } } }, "@jest/reporters": { @@ -1291,34 +1366,105 @@ } }, "@jest/test-sequencer": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.5.3.tgz", - "integrity": "sha512-Wqzb7aQ13L3T47xHdpUqYMOpiqz6Dx2QDDghp5AV/eUDXR7JieY+E1s233TQlNyl+PqtqgjVokmyjzX/HA51BA==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.1.tgz", + "integrity": "sha512-0csqA/XApZiNeTIPYh6koIDCACSoR6hi29T61tKJMtCZdEC+tF3PoNt7MS0oK/zKC6daBgCbqXxia5ztr/NyCQ==", "dev": true, "requires": { - "@jest/test-result": "^26.5.2", + "@jest/test-result": "^26.6.1", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.5.2", - "jest-runner": "^26.5.3", - "jest-runtime": "^26.5.3" + "jest-haste-map": "^26.6.1", + "jest-runner": "^26.6.1", + "jest-runtime": "^26.6.1" + }, + "dependencies": { + "@jest/console": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.1.tgz", + "integrity": "sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.1", + "jest-util": "^26.6.1", + "slash": "^3.0.0" + } + }, + "@jest/test-result": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.1.tgz", + "integrity": "sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + } } }, "@jest/transform": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.5.2.tgz", - "integrity": "sha512-AUNjvexh+APhhmS8S+KboPz+D3pCxPvEAGduffaAJYxIFxGi/ytZQkrqcKDUU0ERBAo5R7087fyOYr2oms1seg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.1.tgz", + "integrity": "sha512-oNFAqVtqRxZRx6vXL3I4bPKUK0BIlEeaalkwxyQGGI8oXDQBtYQBpiMe5F7qPs4QdvvFYB42gPGIMMcxXaBBxQ==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.5.2", + "jest-haste-map": "^26.6.1", "jest-regex-util": "^26.0.0", - "jest-util": "^26.5.2", + "jest-util": "^26.6.1", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", @@ -1326,6 +1472,33 @@ "write-file-atomic": "^3.0.0" }, "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -2099,19 +2272,34 @@ "dev": true }, "babel-jest": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.5.2.tgz", - "integrity": "sha512-U3KvymF3SczA3vOL/cgiUFOznfMET+XDIXiWnoJV45siAp2pLMG8i2+/MGZlAC3f/F6Q40LR4M4qDrWZ9wkK8A==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.1.tgz", + "integrity": "sha512-duMWEOKrSBYRVTTNpL2SipNIWnZOjP77auOBMPQ3zXAdnDbyZQWU8r/RxNWpUf9N6cgPFecQYelYLytTVXVDtA==", "dev": true, "requires": { - "@jest/transform": "^26.5.2", - "@jest/types": "^26.5.2", + "@jest/transform": "^26.6.1", + "@jest/types": "^26.6.1", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", "babel-preset-jest": "^26.5.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + } } }, "babel-plugin-istanbul": { @@ -3863,19 +4051,32 @@ } }, "expect": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-26.5.3.tgz", - "integrity": "sha512-kkpOhGRWGOr+TEFUnYAjfGvv35bfP+OlPtqPIJpOCR9DVtv8QV+p8zG0Edqafh80fsjeE+7RBcVUq1xApnYglw==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.1.tgz", + "integrity": "sha512-BRfxIBHagghMmr1D2MRY0Qv5d3Nc8HCqgbDwNXw/9izmM5eBb42a2YjLKSbsqle76ozGkAEPELQX4IdNHAKRNA==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "ansi-styles": "^4.0.0", "jest-get-type": "^26.3.0", - "jest-matcher-utils": "^26.5.2", - "jest-message-util": "^26.5.2", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", "jest-regex-util": "^26.0.0" }, "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -3899,6 +4100,22 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } } } }, @@ -5990,78 +6207,176 @@ } }, "jest-circus": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-26.5.3.tgz", - "integrity": "sha512-d3kCp2ASCG9aq63KZi1VyNDcWCiBwlUfEQfGuKd9aPs45L5J69SsjQjhjAqhVjX0eld8cZMJZS1VC4OuXoQ+8A==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-26.6.1.tgz", + "integrity": "sha512-UqmfiJyMzDDc9f6F5gAgcneAmTlr/+V6QLAHhrVyun5OMAAwzEFDHfucS6cckloUeXp+qAG0+FH2KdpQ8+2kuQ==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.5.2", - "@jest/test-result": "^26.5.2", - "@jest/types": "^26.5.2", - "@types/babel__traverse": "^7.0.4", + "@jest/environment": "^26.6.1", + "@jest/test-result": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/babel__traverse": "^7.0.4", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^26.5.3", + "expect": "^26.6.1", "is-generator-fn": "^2.0.0", - "jest-each": "^26.5.2", - "jest-matcher-utils": "^26.5.2", - "jest-message-util": "^26.5.2", - "jest-runner": "^26.5.3", - "jest-runtime": "^26.5.3", - "jest-snapshot": "^26.5.3", - "jest-util": "^26.5.2", - "pretty-format": "^26.5.2", + "jest-each": "^26.6.1", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-runner": "^26.6.1", + "jest-runtime": "^26.6.1", + "jest-snapshot": "^26.6.1", + "jest-util": "^26.6.1", + "pretty-format": "^26.6.1", "stack-utils": "^2.0.2", "throat": "^5.0.0" }, "dependencies": { + "@jest/console": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.1.tgz", + "integrity": "sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.1", + "jest-util": "^26.6.1", + "slash": "^3.0.0" + } + }, + "@jest/test-result": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.1.tgz", + "integrity": "sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } } } }, "jest-config": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.5.3.tgz", - "integrity": "sha512-NVhZiIuN0GQM6b6as4CI5FSCyXKxdrx5ACMCcv/7Pf+TeCajJhJc+6dwgdAVPyerUFB9pRBIz3bE7clSrRge/w==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.1.tgz", + "integrity": "sha512-mtJzIynIwW1d1nMlKCNCQiSgWaqFn8cH/fOSNY97xG7Y9tBCZbCSuW2GTX0RPmceSJGO7l27JgwC18LEg0Vg+g==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.5.3", - "@jest/types": "^26.5.2", - "babel-jest": "^26.5.2", + "@jest/test-sequencer": "^26.6.1", + "@jest/types": "^26.6.1", + "babel-jest": "^26.6.1", "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.5.2", - "jest-environment-node": "^26.5.2", + "jest-environment-jsdom": "^26.6.1", + "jest-environment-node": "^26.6.1", "jest-get-type": "^26.3.0", - "jest-jasmine2": "^26.5.3", + "jest-jasmine2": "^26.6.1", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.5.2", - "jest-util": "^26.5.2", - "jest-validate": "^26.5.3", + "jest-resolve": "^26.6.1", + "jest-util": "^26.6.1", + "jest-validate": "^26.6.1", "micromatch": "^4.0.2", - "pretty-format": "^26.5.2" + "pretty-format": "^26.6.1" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + } } }, "jest-diff": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.5.2.tgz", - "integrity": "sha512-HCSWDUGwsov5oTlGzrRM+UPJI/Dpqi9jzeV0fdRNi3Ch5bnoXhnyJMmVg2juv9081zLIy3HGPI5mcuGgXM2xRA==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.1.tgz", + "integrity": "sha512-BBNy/zin2m4kG5In126O8chOBxLLS/XMTuuM2+YhgyHk87ewPzKTuTJcqj3lOWOi03NNgrl+DkMeV/exdvG9gg==", "dev": true, "requires": { "chalk": "^4.0.0", "diff-sequences": "^26.5.0", "jest-get-type": "^26.3.0", - "pretty-format": "^26.5.2" + "pretty-format": "^26.6.1" } }, "jest-docblock": { @@ -6074,45 +6389,132 @@ } }, "jest-each": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.5.2.tgz", - "integrity": "sha512-w7D9FNe0m2D3yZ0Drj9CLkyF/mGhmBSULMQTypzAKR746xXnjUrK8GUJdlLTWUF6dd0ks3MtvGP7/xNFr9Aphg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.1.tgz", + "integrity": "sha512-gSn8eB3buchuq45SU7pLB7qmCGax1ZSxfaWuEFblCyNMtyokYaKFh9dRhYPujK6xYL57dLIPhLKatjmB5XWzGA==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "chalk": "^4.0.0", "jest-get-type": "^26.3.0", - "jest-util": "^26.5.2", - "pretty-format": "^26.5.2" + "jest-util": "^26.6.1", + "pretty-format": "^26.6.1" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + } } }, "jest-environment-jsdom": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.5.2.tgz", - "integrity": "sha512-fWZPx0bluJaTQ36+PmRpvUtUlUFlGGBNyGX1SN3dLUHHMcQ4WseNEzcGGKOw4U5towXgxI4qDoI3vwR18H0RTw==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.1.tgz", + "integrity": "sha512-A17RiXuHYNVlkM+3QNcQ6n5EZyAc6eld8ra9TW26luounGWpku4tj03uqRgHJCI1d4uHr5rJiuCH5JFRtdmrcA==", "dev": true, "requires": { - "@jest/environment": "^26.5.2", - "@jest/fake-timers": "^26.5.2", - "@jest/types": "^26.5.2", + "@jest/environment": "^26.6.1", + "@jest/fake-timers": "^26.6.1", + "@jest/types": "^26.6.1", "@types/node": "*", - "jest-mock": "^26.5.2", - "jest-util": "^26.5.2", + "jest-mock": "^26.6.1", + "jest-util": "^26.6.1", "jsdom": "^16.4.0" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + } } }, "jest-environment-node": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.5.2.tgz", - "integrity": "sha512-YHjnDsf/GKFCYMGF1V+6HF7jhY1fcLfLNBDjhAOvFGvt6d8vXvNdJGVM7uTZ2VO/TuIyEFhPGaXMX5j3h7fsrA==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.1.tgz", + "integrity": "sha512-YffaCp6h0j1kbcf1NVZ7umC6CPgD67YS+G1BeornfuSkx5s3xdhuwG0DCxSiHPXyT81FfJzA1L7nXvhq50OWIg==", "dev": true, "requires": { - "@jest/environment": "^26.5.2", - "@jest/fake-timers": "^26.5.2", - "@jest/types": "^26.5.2", + "@jest/environment": "^26.6.1", + "@jest/fake-timers": "^26.6.1", + "@jest/types": "^26.6.1", "@types/node": "*", - "jest-mock": "^26.5.2", - "jest-util": "^26.5.2" + "jest-mock": "^26.6.1", + "jest-util": "^26.6.1" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + } } }, "jest-get-type": { @@ -6122,12 +6524,12 @@ "dev": true }, "jest-haste-map": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.5.2.tgz", - "integrity": "sha512-lJIAVJN3gtO3k4xy+7i2Xjtwh8CfPcH08WYjZpe9xzveDaqGw9fVNCpkYu6M525wKFVkLmyi7ku+DxCAP1lyMA==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.1.tgz", + "integrity": "sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", @@ -6136,67 +6538,165 @@ "graceful-fs": "^4.2.4", "jest-regex-util": "^26.0.0", "jest-serializer": "^26.5.0", - "jest-util": "^26.5.2", - "jest-worker": "^26.5.0", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + } } }, "jest-jasmine2": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.5.3.tgz", - "integrity": "sha512-nFlZOpnGlNc7y/+UkkeHnvbOM+rLz4wB1AimgI9QhtnqSZte0wYjbAm8hf7TCwXlXgDwZxAXo6z0a2Wzn9FoOg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.1.tgz", + "integrity": "sha512-2uYdT32o/ZzSxYAPduAgokO8OlAL1YdG/9oxcEY138EDNpIK5XRRJDaGzTZdIBWSxk0aR8XxN44FvfXtHB+Fiw==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.5.2", + "@jest/environment": "^26.6.1", "@jest/source-map": "^26.5.0", - "@jest/test-result": "^26.5.2", - "@jest/types": "^26.5.2", + "@jest/test-result": "^26.6.1", + "@jest/types": "^26.6.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^26.5.3", + "expect": "^26.6.1", "is-generator-fn": "^2.0.0", - "jest-each": "^26.5.2", - "jest-matcher-utils": "^26.5.2", - "jest-message-util": "^26.5.2", - "jest-runtime": "^26.5.3", - "jest-snapshot": "^26.5.3", - "jest-util": "^26.5.2", - "pretty-format": "^26.5.2", + "jest-each": "^26.6.1", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-runtime": "^26.6.1", + "jest-snapshot": "^26.6.1", + "jest-util": "^26.6.1", + "pretty-format": "^26.6.1", "throat": "^5.0.0" }, "dependencies": { + "@jest/console": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.1.tgz", + "integrity": "sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.1", + "jest-util": "^26.6.1", + "slash": "^3.0.0" + } + }, + "@jest/test-result": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.1.tgz", + "integrity": "sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } } } }, "jest-leak-detector": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.5.2.tgz", - "integrity": "sha512-h7ia3dLzBFItmYERaLPEtEKxy3YlcbcRSjj0XRNJgBEyODuu+3DM2o62kvIFvs3PsaYoIIv+e+nLRI61Dj1CNw==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.1.tgz", + "integrity": "sha512-j9ZOtJSJKlHjrs4aIxWjiQUjyrffPdiAQn2Iw0916w7qZE5Lk0T2KhIH6E9vfhzP6sw0Q0jtnLLb4vQ71o1HlA==", "dev": true, "requires": { "jest-get-type": "^26.3.0", - "pretty-format": "^26.5.2" + "pretty-format": "^26.6.1" } }, "jest-matcher-utils": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.5.2.tgz", - "integrity": "sha512-W9GO9KBIC4gIArsNqDUKsLnhivaqf8MSs6ujO/JDcPIQrmY+aasewweXVET8KdrJ6ADQaUne5UzysvF/RR7JYA==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.1.tgz", + "integrity": "sha512-9iu3zrsYlUnl8pByhREF9rr5eYoiEb1F7ymNKg6lJr/0qD37LWS5FSW/JcoDl8UdMX2+zAzabDs7sTO+QFKjCg==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^26.5.2", + "jest-diff": "^26.6.1", "jest-get-type": "^26.3.0", - "pretty-format": "^26.5.2" + "pretty-format": "^26.6.1" } }, "jest-message-util": { @@ -6216,13 +6716,28 @@ } }, "jest-mock": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.5.2.tgz", - "integrity": "sha512-9SiU4b5PtO51v0MtJwVRqeGEroH66Bnwtq4ARdNP7jNXbpT7+ByeWNAk4NeT/uHfNSVDXEXgQo1XRuwEqS6Rdw==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.1.tgz", + "integrity": "sha512-my0lPTBu1awY8iVG62sB2sx9qf8zxNDVX+5aFgoB8Vbqjb6LqIOsfyFA8P1z6H2IsqMbvOX9oCJnK67Y3yUIMA==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "@types/node": "*" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + } } }, "jest-pnp-resolver": { @@ -6244,19 +6759,58 @@ "dev": true }, "jest-resolve": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.5.2.tgz", - "integrity": "sha512-XsPxojXGRA0CoDD7Vis59ucz2p3cQFU5C+19tz3tLEAlhYKkK77IL0cjYjikY9wXnOaBeEdm1rOgSJjbZWpcZg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.1.tgz", + "integrity": "sha512-hiHfQH6rrcpAmw9xCQ0vD66SDuU+7ZulOuKwc4jpbmFFsz0bQG/Ib92K+9/489u5rVw0btr/ZhiHqBpmkbCvuQ==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^26.5.2", + "jest-util": "^26.6.1", "read-pkg-up": "^7.0.1", - "resolve": "^1.17.0", + "resolve": "^1.18.1", "slash": "^3.0.0" + }, + "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + }, + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "dev": true, + "requires": { + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" + } + } } }, "jest-resolve-dependencies": { @@ -6500,65 +7054,208 @@ } }, "jest-runner": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.5.3.tgz", - "integrity": "sha512-qproP0Pq7IIule+263W57k2+8kWCszVJTC9TJWGUz0xJBr+gNiniGXlG8rotd0XxwonD5UiJloYoSO5vbUr5FQ==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.1.tgz", + "integrity": "sha512-DmpNGdgsbl5s0FGkmsInmqnmqCtliCSnjWA2TFAJS1m1mL5atwfPsf+uoZ8uYQ2X0uDj4NM+nPcDnUpbNTRMBA==", "dev": true, "requires": { - "@jest/console": "^26.5.2", - "@jest/environment": "^26.5.2", - "@jest/test-result": "^26.5.2", - "@jest/types": "^26.5.2", + "@jest/console": "^26.6.1", + "@jest/environment": "^26.6.1", + "@jest/test-result": "^26.6.1", + "@jest/types": "^26.6.1", "@types/node": "*", "chalk": "^4.0.0", "emittery": "^0.7.1", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^26.5.3", + "jest-config": "^26.6.1", "jest-docblock": "^26.0.0", - "jest-haste-map": "^26.5.2", - "jest-leak-detector": "^26.5.2", - "jest-message-util": "^26.5.2", - "jest-resolve": "^26.5.2", - "jest-runtime": "^26.5.3", - "jest-util": "^26.5.2", - "jest-worker": "^26.5.0", + "jest-haste-map": "^26.6.1", + "jest-leak-detector": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-resolve": "^26.6.1", + "jest-runtime": "^26.6.1", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", "source-map-support": "^0.5.6", "throat": "^5.0.0" + }, + "dependencies": { + "@jest/console": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.1.tgz", + "integrity": "sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.1", + "jest-util": "^26.6.1", + "slash": "^3.0.0" + } + }, + "@jest/test-result": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.1.tgz", + "integrity": "sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + } } }, "jest-runtime": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.5.3.tgz", - "integrity": "sha512-IDjalmn2s/Tc4GvUwhPHZ0iaXCdMRq5p6taW9P8RpU+FpG01O3+H8z+p3rDCQ9mbyyyviDgxy/LHPLzrIOKBkQ==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.1.tgz", + "integrity": "sha512-7uOCNeezXDWgjEyzYbRN2ViY7xNZzusNVGAMmU0UHRUNXuY4j4GBHKGMqPo/cBPZA9bSYp+lwK2DRRBU5Dv6YQ==", "dev": true, "requires": { - "@jest/console": "^26.5.2", - "@jest/environment": "^26.5.2", - "@jest/fake-timers": "^26.5.2", - "@jest/globals": "^26.5.3", + "@jest/console": "^26.6.1", + "@jest/environment": "^26.6.1", + "@jest/fake-timers": "^26.6.1", + "@jest/globals": "^26.6.1", "@jest/source-map": "^26.5.0", - "@jest/test-result": "^26.5.2", - "@jest/transform": "^26.5.2", - "@jest/types": "^26.5.2", + "@jest/test-result": "^26.6.1", + "@jest/transform": "^26.6.1", + "@jest/types": "^26.6.1", "@types/yargs": "^15.0.0", "chalk": "^4.0.0", + "cjs-module-lexer": "^0.4.2", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^26.5.3", - "jest-haste-map": "^26.5.2", - "jest-message-util": "^26.5.2", - "jest-mock": "^26.5.2", + "jest-config": "^26.6.1", + "jest-haste-map": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-mock": "^26.6.1", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.5.2", - "jest-snapshot": "^26.5.3", - "jest-util": "^26.5.2", - "jest-validate": "^26.5.3", + "jest-resolve": "^26.6.1", + "jest-snapshot": "^26.6.1", + "jest-util": "^26.6.1", + "jest-validate": "^26.6.1", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.4.1" + }, + "dependencies": { + "@jest/console": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.1.tgz", + "integrity": "sha512-cjqcXepwC5M+VeIhwT6Xpi/tT4AiNzlIx8SMJ9IihduHnsSrnWNvTBfKIpmqOOCNOPqtbBx6w2JqfoLOJguo8g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.1", + "jest-util": "^26.6.1", + "slash": "^3.0.0" + } + }, + "@jest/test-result": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.1.tgz", + "integrity": "sha512-wqAgIerIN2gSdT2A8WeA5+AFh9XQBqYGf8etK143yng3qYd0mF0ie2W5PVmgnjw4VDU6ammI9NdXrKgNhreawg==", + "dev": true, + "requires": { + "@jest/console": "^26.6.1", + "@jest/types": "^26.6.1", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, + "jest-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.1", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + } + } } }, "jest-serializer": { @@ -6572,29 +7269,58 @@ } }, "jest-snapshot": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.5.3.tgz", - "integrity": "sha512-ZgAk0Wm0JJ75WS4lGaeRfa0zIgpL0KD595+XmtwlIEMe8j4FaYHyZhP1LNOO+8fXq7HJ3hll54+sFV9X4+CGVw==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.1.tgz", + "integrity": "sha512-JA7bZp7HRTIJYAi85pJ/OZ2eur2dqmwIToA5/6d7Mn90isGEfeF9FvuhDLLEczgKP1ihreBzrJ6Vr7zteP5JNA==", "dev": true, "requires": { "@babel/types": "^7.0.0", - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.0.0", "chalk": "^4.0.0", - "expect": "^26.5.3", + "expect": "^26.6.1", "graceful-fs": "^4.2.4", - "jest-diff": "^26.5.2", + "jest-diff": "^26.6.1", "jest-get-type": "^26.3.0", - "jest-haste-map": "^26.5.2", - "jest-matcher-utils": "^26.5.2", - "jest-message-util": "^26.5.2", - "jest-resolve": "^26.5.2", + "jest-haste-map": "^26.6.1", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-resolve": "^26.6.1", "natural-compare": "^1.4.0", - "pretty-format": "^26.5.2", + "pretty-format": "^26.6.1", "semver": "^7.3.2" }, "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "jest-message-util": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.1", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + } + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -6618,23 +7344,36 @@ } }, "jest-validate": { - "version": "26.5.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.5.3.tgz", - "integrity": "sha512-LX07qKeAtY+lsU0o3IvfDdN5KH9OulEGOMN1sFo6PnEf5/qjS1LZIwNk9blcBeW94pQUI9dLN9FlDYDWI5tyaA==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.1.tgz", + "integrity": "sha512-BEFpGbylKocnNPZULcnk+TGaz1oFZQH/wcaXlaXABbu0zBwkOGczuWgdLucUouuQqn7VadHZZeTvo8VSFDLMOA==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "camelcase": "^6.0.0", "chalk": "^4.0.0", "jest-get-type": "^26.3.0", "leven": "^3.1.0", - "pretty-format": "^26.5.2" + "pretty-format": "^26.6.1" }, "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, "camelcase": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.1.0.tgz", - "integrity": "sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", "dev": true } } @@ -6670,9 +7409,9 @@ } }, "jest-worker": { - "version": "26.5.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.5.0.tgz", - "integrity": "sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz", + "integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==", "dev": true, "requires": { "@types/node": "*", @@ -9070,17 +9809,30 @@ } }, "pretty-format": { - "version": "26.5.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz", - "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.1.tgz", + "integrity": "sha512-MeqqsP5PYcRBbGMvwzsyBdmAJ4EFX7pWFyl7x4+dMVg5pE0ZDdBIvEH2ergvIO+Gvwv1wh64YuOY9y5LuyY/GA==", "dev": true, "requires": { - "@jest/types": "^26.5.2", + "@jest/types": "^26.6.1", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", - "react-is": "^16.12.0" + "react-is": "^17.0.1" }, "dependencies": { + "@jest/types": { + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -9202,9 +9954,9 @@ } }, "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", "dev": true }, "read-cache": { diff --git a/package.json b/package.json index 243027b003..eb188f8243 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,7 @@ "got": "^11.8.0", "husky": "^4.3.0", "jest": "^26.6.1", - "jest-circus": "^26.5.3", + "jest-circus": "^26.6.1", "jest-preset-stylelint": "^3.0.0", "jest-watch-typeahead": "^0.6.1", "lint-staged": "^10.4.0", From d7db50291d8f337563beef3ee7d296ba62207e22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2020 13:03:47 +0000 Subject: [PATCH 41/46] Bump remark-cli from 8.0.1 to 9.0.0 (#4996) Bumps [remark-cli](https://github.com/remarkjs/remark) from 8.0.1 to 9.0.0. - [Release notes](https://github.com/remarkjs/remark/releases) - [Changelog](https://github.com/remarkjs/remark/blob/main/changelog.md) - [Commits](https://github.com/remarkjs/remark/compare/remark-cli@8.0.1...remark-cli@9.0.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 112 +++++++++++++++++++++++++++++++++++++++------- package.json | 2 +- 2 files changed, 98 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c5d4aba2f..438fc0c491 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1810,6 +1810,15 @@ "integrity": "sha512-alvcho1kRUnnD1Gcl4J+hK0eencvzq9rmzvFPRmP5rPHx9VVsJj6bKLTATPVf9ktgv4ujzh7T+XWKp+jhuODig==", "dev": true }, + "@types/mdast": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz", + "integrity": "sha512-SXPBMnFVQg1s00dlMCc/jCdvPqdE4mXaMMCeRlxLDmTAEoegHT53xKtkDnzDTOcmMHUfcjyf36/YYZ6SxRdnsw==", + "dev": true, + "requires": { + "@types/unist": "*" + } + }, "@types/micromatch": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/micromatch/-/micromatch-4.0.1.tgz", @@ -2737,9 +2746,9 @@ "dev": true }, "chokidar": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", - "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "dev": true, "requires": { "anymatch": "~3.1.1", @@ -2749,7 +2758,7 @@ "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" + "readdirp": "~3.5.0" } }, "ci-info": { @@ -8276,12 +8285,39 @@ "unist-util-visit": "^2.0.0" } }, + "mdast-util-from-markdown": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.0.tgz", + "integrity": "sha512-x9b9ekG2IfeqHSUPhn4+o8SeXqual0/ZHzzugV/cC21L6s1KyKAwIHKBJ1NN9ZstIlY8YAefELRSWfJMby4a9Q==", + "dev": true, + "requires": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^1.0.0", + "micromark": "~2.10.0", + "parse-entities": "^2.0.0" + } + }, "mdast-util-heading-style": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/mdast-util-heading-style/-/mdast-util-heading-style-1.0.6.tgz", "integrity": "sha512-8ZuuegRqS0KESgjAGW8zTx4tJ3VNIiIaGFNEzFpRSAQBavVc7AvOo9I4g3crcZBfYisHs4seYh0rAVimO6HyOw==", "dev": true }, + "mdast-util-to-markdown": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.5.1.tgz", + "integrity": "sha512-7WS59irdm7lwd8iyfu+kLF+ktfzlvxLJzI/SwysF1EFFGpkU/G60Q61k7xZ420gsMVkXZ3MlcL3bTYCz5QwDeg==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^1.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "stringify-entities": "^3.0.0", + "zwitch": "^1.0.0" + } + }, "mdast-util-to-string": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz", @@ -8334,6 +8370,16 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, + "micromark": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.10.1.tgz", + "integrity": "sha512-fUuVF8sC1X7wsCS29SYQ2ZfIZYbTymp0EYr6sab3idFjigFFjGa5UwoniPlV9tAgntjuapW1t9U+S0yDYeGKHQ==", + "dev": true, + "requires": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, "micromatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", @@ -10022,9 +10068,9 @@ } }, "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", - "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -10084,14 +10130,45 @@ } }, "remark-cli": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/remark-cli/-/remark-cli-8.0.1.tgz", - "integrity": "sha512-UaYeFI5qUAzkthUd8/MLBQD5OKM6jLN8GRvF6v+KF7xO/i1jQ+X2VqUSQAxWFYxZ8R25gM56GVjeoKOZ0EIr8A==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-cli/-/remark-cli-9.0.0.tgz", + "integrity": "sha512-y6kCXdwZoMoh0Wo4Och1tDW50PmMc86gW6GpF08v9d+xUCEJE2wwXdQ+TnTaUamRnfFdU+fE+eNf2PJ53cyq8g==", "dev": true, "requires": { "markdown-extensions": "^1.1.0", - "remark": "^12.0.0", + "remark": "^13.0.0", "unified-args": "^8.0.0" + }, + "dependencies": { + "remark": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/remark/-/remark-13.0.0.tgz", + "integrity": "sha512-HDz1+IKGtOyWN+QgBiAT0kn+2s6ovOxHyPAFGKVE81VSzJ+mq7RwHFledEvB5F1p4iJvOah/LOKdFuzvRnNLCA==", + "dev": true, + "requires": { + "remark-parse": "^9.0.0", + "remark-stringify": "^9.0.0", + "unified": "^9.1.0" + } + }, + "remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "dev": true, + "requires": { + "mdast-util-from-markdown": "^0.8.0" + } + }, + "remark-stringify": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.0.tgz", + "integrity": "sha512-8x29DpTbVzEc6Dwb90qhxCtbZ6hmj3BxWWDpMhA+1WM4dOEGH5U5/GFe3Be5Hns5MvPSFAr1e2KSVtKZkK5nUw==", + "dev": true, + "requires": { + "mdast-util-to-markdown": "^0.5.0" + } + } } }, "remark-frontmatter": { @@ -11769,12 +11846,11 @@ }, "dependencies": { "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -12473,6 +12549,12 @@ "camelcase": "^5.0.0", "decamelize": "^1.2.0" } + }, + "zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true } } } diff --git a/package.json b/package.json index eb188f8243..4f9e8f9845 100644 --- a/package.json +++ b/package.json @@ -193,7 +193,7 @@ "npm-run-all": "^4.1.5", "postcss-import": "^12.0.1", "prettier": "^2.1.2", - "remark-cli": "^8.0.1", + "remark-cli": "^9.0.0", "typescript": "^4.0.3" }, "engines": { From 078e9a6d5637cd62d5ff008ccbdd8f85acdc4d2d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2020 11:07:16 +0000 Subject: [PATCH 42/46] Bump lint-staged from 10.4.0 to 10.5.1 (#5014) Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.4.0 to 10.5.1. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v10.4.0...v10.5.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 43 ++++++++++++++++++++++++++----------------- package.json | 2 +- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 438fc0c491..cc0d48839f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2959,9 +2959,9 @@ } }, "commander": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.1.0.tgz", - "integrity": "sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", + "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", "dev": true }, "common-tags": { @@ -7674,20 +7674,20 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, "lint-staged": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.4.0.tgz", - "integrity": "sha512-uaiX4U5yERUSiIEQc329vhCTDDwUcSvKdRLsNomkYLRzijk3v8V9GWm2Nz0RMVB87VcuzLvtgy6OsjoH++QHIg==", + "version": "10.5.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.5.1.tgz", + "integrity": "sha512-fTkTGFtwFIJJzn/PbUO3RXyEBHIhbfYBE7+rJyLcOXabViaO/h6OslgeK6zpeUtzkDrzkgyAYDTLAwx6JzDTHw==", "dev": true, "requires": { "chalk": "^4.1.0", "cli-truncate": "^2.1.0", - "commander": "^6.0.0", + "commander": "^6.2.0", "cosmiconfig": "^7.0.0", - "debug": "^4.1.1", + "debug": "^4.2.0", "dedent": "^0.7.0", "enquirer": "^2.3.6", - "execa": "^4.0.3", - "listr2": "^2.6.0", + "execa": "^4.1.0", + "listr2": "^3.2.2", "log-symbols": "^4.0.0", "micromatch": "^4.0.2", "normalize-path": "^3.0.0", @@ -7697,9 +7697,9 @@ }, "dependencies": { "execa": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", - "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "requires": { "cross-spawn": "^7.0.0", @@ -8055,9 +8055,9 @@ } }, "listr2": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-2.6.2.tgz", - "integrity": "sha512-6x6pKEMs8DSIpA/tixiYY2m/GcbgMplMVmhQAaLFxEtNSKLeWTGjtmU57xvv6QCm2XcqzyNXL/cTSVf4IChCRA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.2.2.tgz", + "integrity": "sha512-AajqcZEUikF2ioph6PfH3dIuxJclhr3i3kHgTOP0xeXdWQohrvJAAmqVcV43/GI987HFY/vzT73jYXoa4esDHg==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -8066,7 +8066,7 @@ "indent-string": "^4.0.0", "log-update": "^4.0.0", "p-map": "^4.0.0", - "rxjs": "^6.6.2", + "rxjs": "^6.6.3", "through": "^2.3.8" }, "dependencies": { @@ -8078,6 +8078,15 @@ "requires": { "aggregate-error": "^3.0.0" } + }, + "rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } } } }, diff --git a/package.json b/package.json index 4f9e8f9845..bf74b3991e 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,7 @@ "jest-circus": "^26.6.1", "jest-preset-stylelint": "^3.0.0", "jest-watch-typeahead": "^0.6.1", - "lint-staged": "^10.4.0", + "lint-staged": "^10.5.1", "np": "^6.5.0", "npm-run-all": "^4.1.5", "postcss-import": "^12.0.1", From e2ea56974ac3a087e1bfa3abac352819f3c5bb46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2020 11:07:35 +0000 Subject: [PATCH 43/46] Bump typescript from 4.0.3 to 4.0.5 (#5016) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.3 to 4.0.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.3...v4.0.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc0d48839f..7e06fdbc04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11811,9 +11811,9 @@ } }, "typescript": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", - "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.5.tgz", + "integrity": "sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==", "dev": true }, "unherit": { diff --git a/package.json b/package.json index bf74b3991e..d7e1c3910c 100644 --- a/package.json +++ b/package.json @@ -194,7 +194,7 @@ "postcss-import": "^12.0.1", "prettier": "^2.1.2", "remark-cli": "^9.0.0", - "typescript": "^4.0.3" + "typescript": "^4.0.5" }, "engines": { "node": ">=10.13.0" From 60eb7b6003ea5d24867ff61517b378eac97cea50 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2020 11:07:50 +0000 Subject: [PATCH 44/46] Bump eslint from 7.11.0 to 7.12.1 (#5017) Bumps [eslint](https://github.com/eslint/eslint) from 7.11.0 to 7.12.1. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.11.0...v7.12.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e06fdbc04..993960b6b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -329,9 +329,9 @@ } }, "@eslint/eslintrc": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", - "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.1.tgz", + "integrity": "sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -3596,13 +3596,13 @@ } }, "eslint": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", - "integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.12.1.tgz", + "integrity": "sha512-HlMTEdr/LicJfN08LB3nM1rRYliDXOmfoO4vj39xN6BLpFzF00hbwBoqHk8UcJ2M/3nlARZWy/mslvGEuZFvsg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.1.3", + "@eslint/eslintrc": "^0.2.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", diff --git a/package.json b/package.json index d7e1c3910c..0d2f7dd3b6 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ "benchmark": "^2.1.4", "common-tags": "^1.8.0", "del": "^6.0.0", - "eslint": "^7.11.0", + "eslint": "^7.12.1", "eslint-config-stylelint": "^13.0.0", "got": "^11.8.0", "husky": "^4.3.0", From 785b59dc6fc46616226c18404a641366001bc89f Mon Sep 17 00:00:00 2001 From: Zach Barnes Date: Tue, 3 Nov 2020 10:09:56 -0600 Subject: [PATCH 45/46] Add ignoreAtRules to property-no-unknown (#4965) --- lib/rules/property-no-unknown/README.md | 21 ++++++++ .../property-no-unknown/__tests__/index.js | 50 +++++++++++++++++++ lib/rules/property-no-unknown/index.js | 19 ++++++- 3 files changed, 88 insertions(+), 2 deletions(-) diff --git a/lib/rules/property-no-unknown/README.md b/lib/rules/property-no-unknown/README.md index 61a30ee911..f5f82d4e40 100644 --- a/lib/rules/property-no-unknown/README.md +++ b/lib/rules/property-no-unknown/README.md @@ -127,6 +127,27 @@ The following patterns are _not_ considered violations: } ``` +### `ignoreAtRules: ["/regex/", /regex/, "string"]` + +Ignores properties nested within specified at-rules. + +Given: + +``` +["supports"] +``` + +The following patterns are _not_ considered violations: + + +```css +@supports (display: grid) { + a { + my-property: 1; + } +} +``` + ### `checkPrefixed: true | false` (default: `false`) If `true`, this rule will check vendor-prefixed properties. diff --git a/lib/rules/property-no-unknown/__tests__/index.js b/lib/rules/property-no-unknown/__tests__/index.js index 2861598661..9e901babe5 100644 --- a/lib/rules/property-no-unknown/__tests__/index.js +++ b/lib/rules/property-no-unknown/__tests__/index.js @@ -360,3 +360,53 @@ testRule({ }, ], }); + +testRule({ + ruleName, + config: [true, { ignoreAtRules: ['supports', /^my-/] }], + + accept: [ + { + code: '@supports (display: grid) { my-property: 1; }', + }, + { + code: '@my-at-rule { foo: 1; }', + }, + { + code: '@supports (display:grid) { @media (min-width: 10px) { foo: 1; } }', + }, + { + code: '@supports (display:grid) { @media (min-width: 10px) { a { foo: 1; } } }', + }, + { + code: '@my-other-at-rule { a { foo: 1; } }', + }, + ], + + reject: [ + { + code: '@media screen { a { foo: 1; } }', + message: messages.rejected('foo'), + line: 1, + column: 21, + }, + { + code: '@not-my-at-rule { foo: 1; }', + message: messages.rejected('foo'), + line: 1, + column: 19, + }, + { + code: 'a { foo: 1; }', + message: messages.rejected('foo'), + line: 1, + column: 5, + }, + { + code: '@not-my-at-rule foobar { foo: 1; }', + message: messages.rejected('foo'), + line: 1, + column: 26, + }, + ], +}); diff --git a/lib/rules/property-no-unknown/index.js b/lib/rules/property-no-unknown/index.js index 1b368cd7f7..3651a1bc27 100644 --- a/lib/rules/property-no-unknown/index.js +++ b/lib/rules/property-no-unknown/index.js @@ -33,6 +33,7 @@ function rule(actual, options) { ignoreProperties: [_.isString, _.isRegExp], checkPrefixed: _.isBoolean, ignoreSelectors: [_.isString, _.isRegExp], + ignoreAtRules: [_.isString, _.isRegExp], }, optional: true, }, @@ -44,7 +45,9 @@ function rule(actual, options) { const shouldCheckPrefixed = _.get(options, 'checkPrefixed'); - root.walkDecls((decl) => { + root.walkDecls(checkStatement); + + function checkStatement(decl) { const prop = decl.prop; if (!isStandardSyntaxProperty(prop)) { @@ -73,6 +76,18 @@ function rule(actual, options) { return; } + let node = decl.parent; + + while (node && node.type !== 'root') { + const { type, name } = node; + + if (type === 'atrule' && optionsMatches(options, 'ignoreAtRules', name)) { + return; + } + + node = node.parent; + } + if (allValidProperties.has(prop.toLowerCase())) { return; } @@ -83,7 +98,7 @@ function rule(actual, options) { result, ruleName, }); - }); + } }; } From 5a8465770b4ec17bb1b47f359d1a17132a204a71 Mon Sep 17 00:00:00 2001 From: Richard Hallows Date: Tue, 3 Nov 2020 16:11:34 +0000 Subject: [PATCH 46/46] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d496c5643f..39494e6eb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project are documented in this file. - Added: disable comments that are reported as errors for various reasons are now reported as standard lint errors rather than a separate class of errors that must be handled specially ([#4973](https://github.com/stylelint/stylelint/pull/4973)). - Added: configured pattern in `*-pattern` rules violation message ([#4975](https://github.com/stylelint/stylelint/pull/4975)). - Added: `comment-pattern` rule ([#4962](https://github.com/stylelint/stylelint/pull/4962)). +- Added: `ignoreAtRules[]` to `property-no-unknown` ([#4965](https://github.com/stylelint/stylelint/pull/4965)). - Deprecated: `StylelintStandaloneReturnValue.reportedDisables`, `.descriptionlessDisables`, `.needlessDisables`, and `.invalidScopeDisables`. `.reportedDisables` will always be empty and the other properties will always be undefined, since these errors now show up in `.results` instead ([#4973](https://github.com/stylelint/stylelint/pull/4973)). ## 13.7.2