@eslint/eslintrc
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -132,2 +132,5 @@ /** | ||
/** @type {WeakMap<object, Plugin>} */ | ||
const normalizedPlugins = new WeakMap(); | ||
/** | ||
@@ -409,3 +412,11 @@ * Check if a given string is a file path. | ||
function normalizePlugin(plugin) { | ||
return { | ||
// first check the cache | ||
let normalizedPlugin = normalizedPlugins.get(plugin); | ||
if (normalizedPlugin) { | ||
return normalizedPlugin; | ||
} | ||
normalizedPlugin = { | ||
configs: plugin.configs || {}, | ||
@@ -416,2 +427,7 @@ environments: plugin.environments || {}, | ||
}; | ||
// save the reference for later | ||
normalizedPlugins.set(plugin, normalizedPlugin); | ||
return normalizedPlugin; | ||
} | ||
@@ -418,0 +434,0 @@ |
{ | ||
"name": "@eslint/eslintrc", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "The legacy ESLintRC config file format for ESLint", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
652261
8796