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:
1 parent
20129a1ac7
commit
ac4f232e5e
787 files changed
+82341
-121690
No files matched your search
+39
-43
@@ -15,56 +15,52 @@ const nonConstructorGlobalFunctionNames = ["Symbol", "BigInt"];
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../types').Rule.RuleModule} */
|
||||
/** @type {import('../shared/types').Rule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: "problem",
|
||||
meta: {
|
||||
type: "problem",
|
||||
|
||||
docs: {
|
||||
description:
|
||||
"Disallow `new` operators with global non-constructor functions",
|
||||
recommended: true,
|
||||
url: "https://eslint.org/docs/latest/rules/no-new-native-nonconstructor",
|
||||
},
|
||||
docs: {
|
||||
description: "Disallow `new` operators with global non-constructor functions",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/no-new-native-nonconstructor"
|
||||
},
|
||||
|
||||
schema: [],
|
||||
schema: [],
|
||||
|
||||
messages: {
|
||||
noNewNonconstructor:
|
||||
"`{{name}}` cannot be called as a constructor.",
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
noNewNonconstructor: "`{{name}}` cannot be called as a constructor."
|
||||
}
|
||||
},
|
||||
|
||||
create(context) {
|
||||
const sourceCode = context.sourceCode;
|
||||
create(context) {
|
||||
|
||||
return {
|
||||
"Program:exit"(node) {
|
||||
const globalScope = sourceCode.getScope(node);
|
||||
const sourceCode = context.sourceCode;
|
||||
|
||||
for (const nonConstructorName of nonConstructorGlobalFunctionNames) {
|
||||
const variable = globalScope.set.get(nonConstructorName);
|
||||
return {
|
||||
"Program:exit"(node) {
|
||||
const globalScope = sourceCode.getScope(node);
|
||||
|
||||
if (variable && variable.defs.length === 0) {
|
||||
variable.references.forEach(ref => {
|
||||
const idNode = ref.identifier;
|
||||
const parent = idNode.parent;
|
||||
for (const nonConstructorName of nonConstructorGlobalFunctionNames) {
|
||||
const variable = globalScope.set.get(nonConstructorName);
|
||||
|
||||
if (
|
||||
parent &&
|
||||
parent.type === "NewExpression" &&
|
||||
parent.callee === idNode
|
||||
) {
|
||||
context.report({
|
||||
node: idNode,
|
||||
messageId: "noNewNonconstructor",
|
||||
data: { name: nonConstructorName },
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
if (variable && variable.defs.length === 0) {
|
||||
variable.references.forEach(ref => {
|
||||
const idNode = ref.identifier;
|
||||
const parent = idNode.parent;
|
||||
|
||||
if (parent && parent.type === "NewExpression" && parent.callee === idNode) {
|
||||
context.report({
|
||||
node: idNode,
|
||||
messageId: "noNewNonconstructor",
|
||||
data: { name: nonConstructorName }
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user