build: update npm install command to use --legacy-peer-deps

This change modifies the build scripts to use --legacy-peer-deps flag when installing npm dependencies to resolve potential peer dependency conflicts during the build process. The change is applied to both bash (build.sh) and batch (build.bat) build scripts.
This commit is contained in:
Luiz Costa committed 2025-11-18 10:23:55 -03:00
1 parent 20129a1ac7
commit ac4f232e5e
787 files changed
+82341 -121690

No files matched your search

+57 -67
View File
@@ -5,88 +5,78 @@
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "problem",
meta: {
type: "problem",
docs: {
description:
"Disallow duplicate arguments in `function` definitions",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-dupe-args",
},
docs: {
description: "Disallow duplicate arguments in `function` definitions",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-dupe-args"
},
schema: [],
schema: [],
messages: {
unexpected: "Duplicate param '{{name}}'.",
},
},
messages: {
unexpected: "Duplicate param '{{name}}'."
}
},
create(context) {
const sourceCode = context.sourceCode;
create(context) {
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
const sourceCode = context.sourceCode;
/**
* Checks whether or not a given definition is a parameter's.
* @param {eslint-scope.DefEntry} def A definition to check.
* @returns {boolean} `true` if the definition is a parameter's.
*/
function isParameter(def) {
return def.type === "Parameter";
}
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Determines if a given node has duplicate parameters.
* @param {ASTNode} node The node to check.
* @returns {void}
* @private
*/
function checkParams(node) {
const variables = sourceCode.getDeclaredVariables(node);
/**
* Checks whether or not a given definition is a parameter's.
* @param {eslint-scope.DefEntry} def A definition to check.
* @returns {boolean} `true` if the definition is a parameter's.
*/
function isParameter(def) {
return def.type === "Parameter";
}
for (let i = 0; i < variables.length; ++i) {
const variable = variables[i];
/**
* Determines if a given node has duplicate parameters.
* @param {ASTNode} node The node to check.
* @returns {void}
* @private
*/
function checkParams(node) {
const variables = sourceCode.getDeclaredVariables(node);
// Checks and reports duplications.
const defs = variable.defs.filter(isParameter);
const loc = {
start: astUtils.getOpeningParenOfParams(node, sourceCode)
.loc.start,
end: sourceCode.getTokenBefore(node.body).loc.end,
};
for (let i = 0; i < variables.length; ++i) {
const variable = variables[i];
if (defs.length >= 2) {
context.report({
loc,
messageId: "unexpected",
data: { name: variable.name },
});
}
}
}
// Checks and reports duplications.
const defs = variable.defs.filter(isParameter);
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
if (defs.length >= 2) {
context.report({
node,
messageId: "unexpected",
data: { name: variable.name }
});
}
}
}
return {
FunctionDeclaration: checkParams,
FunctionExpression: checkParams,
};
},
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
return {
FunctionDeclaration: checkParams,
FunctionExpression: checkParams
};
}
};