Files
Nikolay Vitkov bb976f7b9e Update node_module dependecies
Add one more deps "@typescript-eslint/utils" to top level to be used in our own custom rules (also needed override if I didn't).

Bug: none
Change-Id: I130415d1ec5f096ca51200df3eb688dadd963d0f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6343232
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2025-03-12 06:49:46 -07:00

45 lines
1.3 KiB
JavaScript

// NOTICE: This file is generated by Rollup. To modify it,
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
'use strict';
const process = require('node:process');
const cosmiconfig = require('cosmiconfig');
const FileCache = require('./utils/FileCache.cjs');
const augmentConfig = require('./augmentConfig.cjs');
const IS_TEST = process.env.NODE_ENV === 'test';
const STOP_DIR = IS_TEST ? process.cwd() : undefined;
/**
* @type {import('stylelint').PublicApi['_createLinter']}
*/
function createStylelint(options = {}) {
if (!options.quietDeprecationWarnings) {
const emitDeprecationWarning = require('./utils/emitDeprecationWarning.cjs').default;
emitDeprecationWarning(
'The CommonJS Node.js API is deprecated.',
'COMMONJS_NODEJS_API',
'See https://stylelint.io/migration-guide/to-16',
);
}
const cwd = options.cwd || process.cwd();
return {
_options: { ...options, cwd },
_extendExplorer: cosmiconfig.cosmiconfig('', {
transform: augmentConfig.augmentConfigExtended(cwd),
stopDir: STOP_DIR,
searchStrategy: 'global', // for backward compatibility
}),
_specifiedConfigCache: new Map(),
_postcssResultCache: new Map(),
_fileCache: new FileCache(options.cacheLocation, options.cacheStrategy, cwd),
};
}
module.exports = createStylelint;