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:
+54
-54
@@ -8,66 +8,66 @@
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../types').Rule.RuleModule} */
|
||||
/** @type {import('../shared/types').Rule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: "layout",
|
||||
meta: {
|
||||
type: "layout",
|
||||
|
||||
defaultOptions: ["never"],
|
||||
docs: {
|
||||
description: "Require or disallow Unicode byte order mark (BOM)",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/unicode-bom"
|
||||
},
|
||||
|
||||
docs: {
|
||||
description: "Require or disallow Unicode byte order mark (BOM)",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/latest/rules/unicode-bom",
|
||||
},
|
||||
fixable: "whitespace",
|
||||
|
||||
fixable: "whitespace",
|
||||
schema: [
|
||||
{
|
||||
enum: ["always", "never"]
|
||||
}
|
||||
],
|
||||
messages: {
|
||||
expected: "Expected Unicode BOM (Byte Order Mark).",
|
||||
unexpected: "Unexpected Unicode BOM (Byte Order Mark)."
|
||||
}
|
||||
},
|
||||
|
||||
schema: [
|
||||
{
|
||||
enum: ["always", "never"],
|
||||
},
|
||||
],
|
||||
messages: {
|
||||
expected: "Expected Unicode BOM (Byte Order Mark).",
|
||||
unexpected: "Unexpected Unicode BOM (Byte Order Mark).",
|
||||
},
|
||||
},
|
||||
create(context) {
|
||||
|
||||
create(context) {
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
return {
|
||||
Program: function checkUnicodeBOM(node) {
|
||||
const sourceCode = context.sourceCode,
|
||||
location = { column: 0, line: 1 };
|
||||
const [requireBOM] = context.options;
|
||||
return {
|
||||
|
||||
if (!sourceCode.hasBOM && requireBOM === "always") {
|
||||
context.report({
|
||||
node,
|
||||
loc: location,
|
||||
messageId: "expected",
|
||||
fix(fixer) {
|
||||
return fixer.insertTextBeforeRange(
|
||||
[0, 1],
|
||||
"\uFEFF",
|
||||
);
|
||||
},
|
||||
});
|
||||
} else if (sourceCode.hasBOM && requireBOM === "never") {
|
||||
context.report({
|
||||
node,
|
||||
loc: location,
|
||||
messageId: "unexpected",
|
||||
fix(fixer) {
|
||||
return fixer.removeRange([-1, 0]);
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
Program: function checkUnicodeBOM(node) {
|
||||
|
||||
const sourceCode = context.sourceCode,
|
||||
location = { column: 0, line: 1 },
|
||||
requireBOM = context.options[0] || "never";
|
||||
|
||||
if (!sourceCode.hasBOM && (requireBOM === "always")) {
|
||||
context.report({
|
||||
node,
|
||||
loc: location,
|
||||
messageId: "expected",
|
||||
fix(fixer) {
|
||||
return fixer.insertTextBeforeRange([0, 1], "\uFEFF");
|
||||
}
|
||||
});
|
||||
} else if (sourceCode.hasBOM && (requireBOM === "never")) {
|
||||
context.report({
|
||||
node,
|
||||
loc: location,
|
||||
messageId: "unexpected",
|
||||
fix(fixer) {
|
||||
return fixer.removeRange([-1, 0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user