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:
+39
-48
@@ -16,61 +16,52 @@ const astUtils = require("./utils/ast-utils");
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../types').Rule.RuleModule} */
|
||||
/** @type {import('../shared/types').Rule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: "suggestion",
|
||||
meta: {
|
||||
type: "suggestion",
|
||||
|
||||
docs: {
|
||||
description: "Disallow `Object` constructors",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/no-new-object",
|
||||
},
|
||||
docs: {
|
||||
description: "Disallow `Object` constructors",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/no-new-object"
|
||||
},
|
||||
|
||||
deprecated: {
|
||||
message:
|
||||
"The new rule flags more situations where object literal syntax can be used, and it does not report a problem when the `Object` constructor is invoked with an argument.",
|
||||
url: "https://eslint.org/blog/2023/09/eslint-v8.50.0-released/",
|
||||
deprecatedSince: "8.50.0",
|
||||
availableUntil: "11.0.0",
|
||||
replacedBy: [
|
||||
{
|
||||
rule: {
|
||||
name: "no-object-constructor",
|
||||
url: "https://eslint.org/docs/rules/no-object-constructor",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
deprecated: true,
|
||||
|
||||
schema: [],
|
||||
replacedBy: [
|
||||
"no-object-constructor"
|
||||
],
|
||||
|
||||
messages: {
|
||||
preferLiteral: "The object literal notation {} is preferable.",
|
||||
},
|
||||
},
|
||||
schema: [],
|
||||
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode;
|
||||
messages: {
|
||||
preferLiteral: "The object literal notation {} is preferable."
|
||||
}
|
||||
},
|
||||
|
||||
return {
|
||||
NewExpression(node) {
|
||||
const variable = astUtils.getVariableByName(
|
||||
sourceCode.getScope(node),
|
||||
node.callee.name,
|
||||
);
|
||||
create(context) {
|
||||
|
||||
if (variable && variable.identifiers.length > 0) {
|
||||
return;
|
||||
}
|
||||
const sourceCode = context.sourceCode;
|
||||
|
||||
if (node.callee.name === "Object") {
|
||||
context.report({
|
||||
node,
|
||||
messageId: "preferLiteral",
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
return {
|
||||
NewExpression(node) {
|
||||
const variable = astUtils.getVariableByName(
|
||||
sourceCode.getScope(node),
|
||||
node.callee.name
|
||||
);
|
||||
|
||||
if (variable && variable.identifiers.length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.callee.name === "Object") {
|
||||
context.report({
|
||||
node,
|
||||
messageId: "preferLiteral"
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user