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
2025-11-18 10:23:55 -03:00
parent 20129a1ac7
commit ac4f232e5e
787 changed files with 82341 additions and 121690 deletions
+88 -98
View File
@@ -14,117 +14,107 @@ 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 confusing multiline expressions",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-unexpected-multiline",
},
docs: {
description: "Disallow confusing multiline expressions",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-unexpected-multiline"
},
schema: [],
messages: {
function:
"Unexpected newline between function and ( of function call.",
property:
"Unexpected newline between object and [ of property access.",
taggedTemplate:
"Unexpected newline between template tag and template literal.",
division:
"Unexpected newline between numerator and division operator.",
},
},
schema: [],
messages: {
function: "Unexpected newline between function and ( of function call.",
property: "Unexpected newline between object and [ of property access.",
taggedTemplate: "Unexpected newline between template tag and template literal.",
division: "Unexpected newline between numerator and division operator."
}
},
create(context) {
const REGEX_FLAG_MATCHER = /^[gimsuy]+$/u;
create(context) {
const sourceCode = context.sourceCode;
const REGEX_FLAG_MATCHER = /^[gimsuy]+$/u;
/**
* Check to see if there is a newline between the node and the following open bracket
* line's expression
* @param {ASTNode} node The node to check.
* @param {string} messageId The error messageId to use.
* @returns {void}
* @private
*/
function checkForBreakAfter(node, messageId) {
const openParen = sourceCode.getTokenAfter(
node,
astUtils.isNotClosingParenToken,
);
const nodeExpressionEnd = sourceCode.getTokenBefore(openParen);
const sourceCode = context.sourceCode;
if (openParen.loc.start.line !== nodeExpressionEnd.loc.end.line) {
context.report({
node,
loc: openParen.loc,
messageId,
});
}
}
/**
* Check to see if there is a newline between the node and the following open bracket
* line's expression
* @param {ASTNode} node The node to check.
* @param {string} messageId The error messageId to use.
* @returns {void}
* @private
*/
function checkForBreakAfter(node, messageId) {
const openParen = sourceCode.getTokenAfter(node, astUtils.isNotClosingParenToken);
const nodeExpressionEnd = sourceCode.getTokenBefore(openParen);
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
if (openParen.loc.start.line !== nodeExpressionEnd.loc.end.line) {
context.report({
node,
loc: openParen.loc,
messageId
});
}
}
return {
MemberExpression(node) {
if (!node.computed || node.optional) {
return;
}
checkForBreakAfter(node.object, "property");
},
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
TaggedTemplateExpression(node) {
const { quasi } = node;
return {
// handles common tags, parenthesized tags, and typescript's generic type arguments
const tokenBefore = sourceCode.getTokenBefore(quasi);
MemberExpression(node) {
if (!node.computed || node.optional) {
return;
}
checkForBreakAfter(node.object, "property");
},
if (tokenBefore.loc.end.line !== quasi.loc.start.line) {
context.report({
node,
loc: {
start: quasi.loc.start,
end: {
line: quasi.loc.start.line,
column: quasi.loc.start.column + 1,
},
},
messageId: "taggedTemplate",
});
}
},
TaggedTemplateExpression(node) {
const { quasi } = node;
CallExpression(node) {
if (node.arguments.length === 0 || node.optional) {
return;
}
checkForBreakAfter(node.callee, "function");
},
// handles common tags, parenthesized tags, and typescript's generic type arguments
const tokenBefore = sourceCode.getTokenBefore(quasi);
"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(
node,
) {
const secondSlash = sourceCode.getTokenAfter(
node,
token => token.value === "/",
);
const tokenAfterOperator =
sourceCode.getTokenAfter(secondSlash);
if (tokenBefore.loc.end.line !== quasi.loc.start.line) {
context.report({
node,
loc: {
start: quasi.loc.start,
end: {
line: quasi.loc.start.line,
column: quasi.loc.start.column + 1
}
},
messageId: "taggedTemplate"
});
}
},
if (
tokenAfterOperator.type === "Identifier" &&
REGEX_FLAG_MATCHER.test(tokenAfterOperator.value) &&
secondSlash.range[1] === tokenAfterOperator.range[0]
) {
checkForBreakAfter(node.left, "division");
}
},
};
},
CallExpression(node) {
if (node.arguments.length === 0 || node.optional) {
return;
}
checkForBreakAfter(node.callee, "function");
},
"BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(node) {
const secondSlash = sourceCode.getTokenAfter(node, token => token.value === "/");
const tokenAfterOperator = sourceCode.getTokenAfter(secondSlash);
if (
tokenAfterOperator.type === "Identifier" &&
REGEX_FLAG_MATCHER.test(tokenAfterOperator.value) &&
secondSlash.range[1] === tokenAfterOperator.range[0]
) {
checkForBreakAfter(node.left, "division");
}
}
};
}
};