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
+80 -110
View File
@@ -12,127 +12,97 @@ const astUtils = require("./utils/ast-utils");
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "dot-location",
url: "https://eslint.style/rules/dot-location",
},
},
],
},
type: "layout",
meta: {
deprecated: true,
replacedBy: [],
type: "layout",
docs: {
description: "Enforce consistent newlines before and after dots",
recommended: false,
url: "https://eslint.org/docs/latest/rules/dot-location",
},
docs: {
description: "Enforce consistent newlines before and after dots",
recommended: false,
url: "https://eslint.org/docs/latest/rules/dot-location"
},
schema: [
{
enum: ["object", "property"],
},
],
schema: [
{
enum: ["object", "property"]
}
],
fixable: "code",
fixable: "code",
messages: {
expectedDotAfterObject:
"Expected dot to be on same line as object.",
expectedDotBeforeProperty:
"Expected dot to be on same line as property.",
},
},
messages: {
expectedDotAfterObject: "Expected dot to be on same line as object.",
expectedDotBeforeProperty: "Expected dot to be on same line as property."
}
},
create(context) {
const config = context.options[0];
create(context) {
// default to onObject if no preference is passed
const onObject = config === "object" || !config;
const config = context.options[0];
const sourceCode = context.sourceCode;
// default to onObject if no preference is passed
const onObject = config === "object" || !config;
/**
* Reports if the dot between object and property is on the correct location.
* @param {ASTNode} node The `MemberExpression` node.
* @returns {void}
*/
function checkDotLocation(node) {
const property = node.property;
const dotToken = sourceCode.getTokenBefore(property);
const sourceCode = context.sourceCode;
if (onObject) {
// `obj` expression can be parenthesized, but those paren tokens are not a part of the `obj` node.
const tokenBeforeDot = sourceCode.getTokenBefore(dotToken);
/**
* Reports if the dot between object and property is on the correct location.
* @param {ASTNode} node The `MemberExpression` node.
* @returns {void}
*/
function checkDotLocation(node) {
const property = node.property;
const dotToken = sourceCode.getTokenBefore(property);
if (!astUtils.isTokenOnSameLine(tokenBeforeDot, dotToken)) {
context.report({
node,
loc: dotToken.loc,
messageId: "expectedDotAfterObject",
*fix(fixer) {
if (
dotToken.value.startsWith(".") &&
astUtils.isDecimalIntegerNumericToken(
tokenBeforeDot,
)
) {
yield fixer.insertTextAfter(
tokenBeforeDot,
` ${dotToken.value}`,
);
} else {
yield fixer.insertTextAfter(
tokenBeforeDot,
dotToken.value,
);
}
yield fixer.remove(dotToken);
},
});
}
} else if (!astUtils.isTokenOnSameLine(dotToken, property)) {
context.report({
node,
loc: dotToken.loc,
messageId: "expectedDotBeforeProperty",
*fix(fixer) {
yield fixer.remove(dotToken);
yield fixer.insertTextBefore(property, dotToken.value);
},
});
}
}
if (onObject) {
/**
* Checks the spacing of the dot within a member expression.
* @param {ASTNode} node The node to check.
* @returns {void}
*/
function checkNode(node) {
if (!node.computed) {
checkDotLocation(node);
}
}
// `obj` expression can be parenthesized, but those paren tokens are not a part of the `obj` node.
const tokenBeforeDot = sourceCode.getTokenBefore(dotToken);
return {
MemberExpression: checkNode,
};
},
if (!astUtils.isTokenOnSameLine(tokenBeforeDot, dotToken)) {
context.report({
node,
loc: dotToken.loc,
messageId: "expectedDotAfterObject",
*fix(fixer) {
if (dotToken.value.startsWith(".") && astUtils.isDecimalIntegerNumericToken(tokenBeforeDot)) {
yield fixer.insertTextAfter(tokenBeforeDot, ` ${dotToken.value}`);
} else {
yield fixer.insertTextAfter(tokenBeforeDot, dotToken.value);
}
yield fixer.remove(dotToken);
}
});
}
} else if (!astUtils.isTokenOnSameLine(dotToken, property)) {
context.report({
node,
loc: dotToken.loc,
messageId: "expectedDotBeforeProperty",
*fix(fixer) {
yield fixer.remove(dotToken);
yield fixer.insertTextBefore(property, dotToken.value);
}
});
}
}
/**
* Checks the spacing of the dot within a member expression.
* @param {ASTNode} node The node to check.
* @returns {void}
*/
function checkNode(node) {
if (!node.computed) {
checkDotLocation(node);
}
}
return {
MemberExpression: checkNode
};
}
};