Update Stylelint and Postcss
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I961be18530d3ccbc4efed0c2cda9bd603b14e27b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3372931
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
diff --git a/node_modules/stylelint/lib/createStylelint.js b/node_modules/stylelint/lib/createStylelint.js
index 4a0b486..ffe0a04 100644
--- a/node_modules/stylelint/lib/createStylelint.js
+++ b/node_modules/stylelint/lib/createStylelint.js
@@ -22,12 +22,14 @@
* @returns {StylelintInternalApi}
*/
function createStylelint(options = {}) {
+ const cwd = options.cwd || process.cwd();
+
/** @type {StylelintInternalApi} */
// @ts-expect-error -- TS2740: Type '{ _options: LinterOptions; }' is missing the following properties from type 'InternalApi'
- const stylelint = { _options: options };
+ const stylelint = { _options: { ...options, cwd } };
stylelint._extendExplorer = cosmiconfig('', {
- transform: augmentConfig.augmentConfigExtended.bind(null, stylelint),
+ transform: augmentConfig.augmentConfigExtended(cwd),
stopDir: STOP_DIR,
});